Replace from Code Climate to Super-Linter (#18587)
parent
3f14260574
commit
84266f87e7
|
@ -26,13 +26,11 @@ plugins:
|
||||||
bundler-audit:
|
bundler-audit:
|
||||||
enabled: true
|
enabled: true
|
||||||
eslint:
|
eslint:
|
||||||
enabled: true
|
enabled: false
|
||||||
channel: eslint-7
|
|
||||||
rubocop:
|
rubocop:
|
||||||
enabled: true
|
enabled: false
|
||||||
channel: rubocop-1-9-1
|
|
||||||
sass-lint:
|
sass-lint:
|
||||||
enabled: true
|
enabled: false
|
||||||
exclude_patterns:
|
exclude_patterns:
|
||||||
- spec/
|
- spec/
|
||||||
- vendor/asset/
|
- vendor/asset/
|
||||||
|
|
|
@ -12,7 +12,7 @@ module.exports = {
|
||||||
ATTACHMENT_HOST: false,
|
ATTACHMENT_HOST: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
parser: 'babel-eslint',
|
parser: '@babel/eslint-parser',
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
'react',
|
'react',
|
||||||
|
@ -27,7 +27,7 @@ module.exports = {
|
||||||
experimentalObjectRestSpread: true,
|
experimentalObjectRestSpread: true,
|
||||||
jsx: true,
|
jsx: true,
|
||||||
},
|
},
|
||||||
ecmaVersion: 2018,
|
ecmaVersion: 2021,
|
||||||
},
|
},
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
---
|
||||||
|
#################################
|
||||||
|
#################################
|
||||||
|
## Super Linter GitHub Actions ##
|
||||||
|
#################################
|
||||||
|
#################################
|
||||||
|
name: Lint Code Base
|
||||||
|
|
||||||
|
#
|
||||||
|
# Documentation:
|
||||||
|
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
||||||
|
#
|
||||||
|
|
||||||
|
#############################
|
||||||
|
# Start the job on all push #
|
||||||
|
#############################
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches-ignore: [main]
|
||||||
|
# Remove the line above to run when pushing to master
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
###############
|
||||||
|
# Set the Job #
|
||||||
|
###############
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
statuses: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
# Name the Job
|
||||||
|
name: Lint Code Base
|
||||||
|
# Set the agent to run on
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
##################
|
||||||
|
# Load all steps #
|
||||||
|
##################
|
||||||
|
steps:
|
||||||
|
##########################
|
||||||
|
# Checkout the code base #
|
||||||
|
##########################
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
# Full git history is needed to get a proper list of changed files within `super-linter`
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Intall dependencies
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
|
||||||
|
################################
|
||||||
|
# Run Linter against code base #
|
||||||
|
################################
|
||||||
|
- name: Lint Code Base
|
||||||
|
uses: github/super-linter@v4
|
||||||
|
env:
|
||||||
|
CSS_FILE_NAME: stylelint.config.js
|
||||||
|
DEFAULT_BRANCH: main
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js
|
||||||
|
LINTER_RULES_PATH: .
|
||||||
|
RUBY_CONFIG_FILE: .rubocop.yml
|
||||||
|
VALIDATE_ALL_CODEBASE: false
|
||||||
|
VALIDATE_CSS: true
|
||||||
|
VALIDATE_JAVASCRIPT_ES: true
|
||||||
|
VALIDATE_RUBY: true
|
|
@ -1,37 +0,0 @@
|
||||||
# Linter Documentation:
|
|
||||||
# https://github.com/sasstools/sass-lint/tree/v1.13.1/docs/options
|
|
||||||
|
|
||||||
files:
|
|
||||||
include: app/javascript/styles/**/*.scss
|
|
||||||
ignore:
|
|
||||||
- app/javascript/styles/mastodon/reset.scss
|
|
||||||
|
|
||||||
rules:
|
|
||||||
# Disallows
|
|
||||||
no-color-literals: 0
|
|
||||||
no-css-comments: 0
|
|
||||||
no-duplicate-properties: 0
|
|
||||||
no-ids: 0
|
|
||||||
no-important: 0
|
|
||||||
no-mergeable-selectors: 0
|
|
||||||
no-misspelled-properties: 0
|
|
||||||
no-qualifying-elements: 0
|
|
||||||
no-transition-all: 0
|
|
||||||
no-vendor-prefixes: 0
|
|
||||||
|
|
||||||
# Nesting
|
|
||||||
force-element-nesting: 0
|
|
||||||
force-attribute-nesting: 0
|
|
||||||
force-pseudo-nesting: 0
|
|
||||||
|
|
||||||
# Name Formats
|
|
||||||
class-name-format: 0
|
|
||||||
leading-zero: 0
|
|
||||||
|
|
||||||
# Style Guide
|
|
||||||
attribute-quotes: 0
|
|
||||||
hex-length: 0
|
|
||||||
indentation: 0
|
|
||||||
nesting-depth: 0
|
|
||||||
property-sort-order: 0
|
|
||||||
quotes: 0
|
|
|
@ -1,6 +1,7 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mastodon-font-display';
|
font-family: mastodon-font-display;
|
||||||
src: local('Montserrat'),
|
src:
|
||||||
|
local('Montserrat'),
|
||||||
url('../fonts/montserrat/Montserrat-Regular.woff2') format('woff2'),
|
url('../fonts/montserrat/Montserrat-Regular.woff2') format('woff2'),
|
||||||
url('../fonts/montserrat/Montserrat-Regular.woff') format('woff'),
|
url('../fonts/montserrat/Montserrat-Regular.woff') format('woff'),
|
||||||
url('../fonts/montserrat/Montserrat-Regular.ttf') format('truetype');
|
url('../fonts/montserrat/Montserrat-Regular.ttf') format('truetype');
|
||||||
|
@ -10,8 +11,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mastodon-font-display';
|
font-family: mastodon-font-display;
|
||||||
src: local('Montserrat Medium'),
|
src:
|
||||||
|
local('Montserrat Medium'),
|
||||||
url('../fonts/montserrat/Montserrat-Medium.ttf') format('truetype');
|
url('../fonts/montserrat/Montserrat-Medium.ttf') format('truetype');
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mastodon-font-monospace';
|
font-family: mastodon-font-monospace;
|
||||||
src: local('Roboto Mono'),
|
src:
|
||||||
|
local('Roboto Mono'),
|
||||||
url('../fonts/roboto-mono/robotomono-regular-webfont.woff2') format('woff2'),
|
url('../fonts/roboto-mono/robotomono-regular-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto-mono/robotomono-regular-webfont.woff') format('woff'),
|
url('../fonts/roboto-mono/robotomono-regular-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto-mono/robotomono-regular-webfont.ttf') format('truetype'),
|
url('../fonts/roboto-mono/robotomono-regular-webfont.ttf') format('truetype'),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mastodon-font-sans-serif';
|
font-family: mastodon-font-sans-serif;
|
||||||
src: local('Roboto Italic'),
|
src:
|
||||||
|
local('Roboto Italic'),
|
||||||
url('../fonts/roboto/roboto-italic-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-italic-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-italic-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-italic-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
|
||||||
|
@ -11,8 +12,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mastodon-font-sans-serif';
|
font-family: mastodon-font-sans-serif;
|
||||||
src: local('Roboto Bold'),
|
src:
|
||||||
|
local('Roboto Bold'),
|
||||||
url('../fonts/roboto/roboto-bold-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-bold-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-bold-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-bold-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
|
||||||
|
@ -23,8 +25,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mastodon-font-sans-serif';
|
font-family: mastodon-font-sans-serif;
|
||||||
src: local('Roboto Medium'),
|
src:
|
||||||
|
local('Roboto Medium'),
|
||||||
url('../fonts/roboto/roboto-medium-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-medium-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-medium-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-medium-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
|
||||||
|
@ -35,8 +38,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'mastodon-font-sans-serif';
|
font-family: mastodon-font-sans-serif;
|
||||||
src: local('Roboto'),
|
src:
|
||||||
|
local('Roboto'),
|
||||||
url('../fonts/roboto/roboto-regular-webfont.woff2') format('woff2'),
|
url('../fonts/roboto/roboto-regular-webfont.woff2') format('woff2'),
|
||||||
url('../fonts/roboto/roboto-regular-webfont.woff') format('woff'),
|
url('../fonts/roboto/roboto-regular-webfont.woff') format('woff'),
|
||||||
url('../fonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
|
url('../fonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
|
||||||
|
|
|
@ -542,10 +542,10 @@ html {
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple_form {
|
.simple_form {
|
||||||
input[type=text],
|
input[type="text"],
|
||||||
input[type=number],
|
input[type="number"],
|
||||||
input[type=email],
|
input[type="email"],
|
||||||
input[type=password],
|
input[type="password"],
|
||||||
textarea {
|
textarea {
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: lighten($ui-base-color, 12%);
|
border-color: lighten($ui-base-color, 12%);
|
||||||
|
|
|
@ -41,7 +41,7 @@ $small-breakpoint: 960px;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: .85em;
|
margin-bottom: 0.85em;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
@ -73,7 +73,7 @@ $small-breakpoint: 960px;
|
||||||
h6 {
|
h6 {
|
||||||
font-family: $font-display, sans-serif;
|
font-family: $font-display, sans-serif;
|
||||||
margin-top: 1.275em;
|
margin-top: 1.275em;
|
||||||
margin-bottom: .85em;
|
margin-bottom: 0.85em;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: $secondary-text-color;
|
color: $secondary-text-color;
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ $small-breakpoint: 960px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0;
|
height: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-bottom: 1px solid rgba($ui-base-lighter-color, .6);
|
border-bottom: 1px solid rgba($ui-base-lighter-color, 0.6);
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
|
||||||
&.spacer {
|
&.spacer {
|
||||||
|
|
|
@ -183,12 +183,9 @@ $content-width: 840px;
|
||||||
|
|
||||||
&-heading {
|
&-heading {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
padding-bottom: 36px;
|
padding-bottom: 36px;
|
||||||
border-bottom: 1px solid lighten($ui-base-color, 8%);
|
border-bottom: 1px solid lighten($ui-base-color, 8%);
|
||||||
|
|
||||||
margin: -15px -15px 40px 0;
|
margin: -15px -15px 40px 0;
|
||||||
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -294,7 +291,7 @@ $content-width: 840px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0;
|
height: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-bottom: 1px solid rgba($ui-base-lighter-color, .6);
|
border-bottom: 1px solid rgba($ui-base-lighter-color, 0.6);
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
|
|
||||||
&.spacer {
|
&.spacer {
|
||||||
|
|
|
@ -16,7 +16,7 @@ body {
|
||||||
text-rendering: optimizelegibility;
|
text-rendering: optimizelegibility;
|
||||||
font-feature-settings: "kern";
|
font-feature-settings: "kern";
|
||||||
text-size-adjust: none;
|
text-size-adjust: none;
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0%);
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
|
||||||
&.system-font {
|
&.system-font {
|
||||||
|
@ -31,7 +31,7 @@ body {
|
||||||
// Droid Sans => Older Androids (<4.0)
|
// Droid Sans => Older Androids (<4.0)
|
||||||
// Helvetica Neue => Older macOS <10.11
|
// Helvetica Neue => Older macOS <10.11
|
||||||
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
|
// $font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
|
||||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", $font-sans-serif, sans-serif;
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", $font-sans-serif, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.app-body {
|
&.app-body {
|
||||||
|
@ -202,7 +202,7 @@ button {
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-bottom: .85em;
|
margin-bottom: 0.85em;
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
|
@ -341,7 +341,6 @@
|
||||||
&__sensitive-button {
|
&__sensitive-button {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
||||||
|
@ -349,7 +348,7 @@
|
||||||
color: $highlight-text-color;
|
color: $highlight-text-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=checkbox] {
|
input[type="checkbox"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -709,7 +708,7 @@
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
margin: -.2ex .15em .2ex;
|
margin: -0.2ex 0.15em 0.2ex;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|
||||||
|
@ -1313,9 +1312,9 @@
|
||||||
|
|
||||||
.account__avatar {
|
.account__avatar {
|
||||||
@include avatar-radius;
|
@include avatar-radius;
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
background-size: 36px 36px;
|
background-size: 36px 36px;
|
||||||
|
@ -1328,6 +1327,7 @@
|
||||||
|
|
||||||
&-composite {
|
&-composite {
|
||||||
@include avatar-radius;
|
@include avatar-radius;
|
||||||
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -1365,6 +1365,7 @@ a .account__avatar {
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@include avatar-radius;
|
@include avatar-radius;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
@ -1381,6 +1382,7 @@ a .account__avatar {
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@include avatar-radius;
|
@include avatar-radius;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
@ -3980,6 +3982,7 @@ a.status-card.compact:hover {
|
||||||
|
|
||||||
&__menu {
|
&__menu {
|
||||||
@include search-popout;
|
@include search-popout;
|
||||||
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: $ui-secondary-color;
|
background: $ui-secondary-color;
|
||||||
}
|
}
|
||||||
|
@ -4878,7 +4881,7 @@ a.status-card.compact:hover {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
transition: opacity .2s ease-in-out;
|
transition: opacity 0.2s ease-in-out;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -4933,7 +4936,6 @@ a.status-card.compact:hover {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
display: none;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -5274,7 +5276,6 @@ a.status-card.compact:hover {
|
||||||
display: block;
|
display: block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
|
||||||
color: $inverted-text-color;
|
color: $inverted-text-color;
|
||||||
background: $simple-background-color;
|
background: $simple-background-color;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
@ -5406,7 +5407,6 @@ a.status-card.compact:hover {
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
resize: none;
|
resize: none;
|
||||||
border: 0;
|
|
||||||
outline: 0;
|
outline: 0;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 1px solid $ui-secondary-color;
|
border: 1px solid $ui-secondary-color;
|
||||||
|
@ -5857,6 +5857,7 @@ a.status-card.compact:hover {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End Media Gallery */
|
/* End Media Gallery */
|
||||||
|
|
||||||
.detailed,
|
.detailed,
|
||||||
|
@ -5869,7 +5870,6 @@ a.status-card.compact:hover {
|
||||||
.video-player__volume__handle {
|
.video-player__volume__handle {
|
||||||
bottom: 23px;
|
bottom: 23px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.audio-player {
|
.audio-player {
|
||||||
|
@ -5991,7 +5991,7 @@ a.status-card.compact:hover {
|
||||||
background: linear-gradient(0deg, rgba($base-shadow-color, 0.85) 0, rgba($base-shadow-color, 0.45) 60%, transparent);
|
background: linear-gradient(0deg, rgba($base-shadow-color, 0.85) 0, rgba($base-shadow-color, 0.45) 60%, transparent);
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity .1s ease;
|
transition: opacity 0.1s ease;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -6066,7 +6066,6 @@ a.status-card.compact:hover {
|
||||||
.player-button {
|
.player-button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
@ -6237,7 +6236,7 @@ a.status-card.compact:hover {
|
||||||
box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.2);
|
box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.2);
|
||||||
|
|
||||||
.no-reduce-motion & {
|
.no-reduce-motion & {
|
||||||
transition: opacity .1s ease;
|
transition: opacity 0.1s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
|
@ -6405,14 +6404,13 @@ a.status-card.compact:hover {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
cursor: default;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
input[type=radio],
|
input[type="radio"],
|
||||||
input[type=checkbox] {
|
input[type="checkbox"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6505,13 +6503,15 @@ noscript {
|
||||||
.navigation-bar__actions {
|
.navigation-bar__actions {
|
||||||
& > .icon-button.close {
|
& > .icon-button.close {
|
||||||
will-change: opacity transform;
|
will-change: opacity transform;
|
||||||
transition: opacity $duration * 0.5 $delay,
|
transition:
|
||||||
|
opacity $duration * 0.5 $delay,
|
||||||
transform $duration $delay;
|
transform $duration $delay;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .compose__action-bar .icon-button {
|
& > .compose__action-bar .icon-button {
|
||||||
will-change: opacity transform;
|
will-change: opacity transform;
|
||||||
transition: opacity $duration * 0.5 $delay + $duration * 0.5,
|
transition:
|
||||||
|
opacity $duration * 0.5 $delay + $duration * 0.5,
|
||||||
transform $duration $delay;
|
transform $duration $delay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7286,7 +7286,7 @@ noscript {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 0.625rem;
|
width: 0.625rem;
|
||||||
height: 0.625rem;
|
height: 0.625rem;
|
||||||
margin: -.1ex .15em .1ex;
|
margin: -0.1ex 0.15em 0.1ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
|
@ -7549,7 +7549,6 @@ noscript {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
pointer-events: 0;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-left: 2px solid $highlight-text-color;
|
border-left: 2px solid $highlight-text-color;
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 21px;
|
|
||||||
color: $primary-text-color;
|
color: $primary-text-color;
|
||||||
font-family: $font-display, sans-serif;
|
font-family: $font-display, sans-serif;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 12px 4px;
|
padding: 12px 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: color .1s ease-out;
|
transition: color 0.1s ease-out;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -243,7 +243,7 @@
|
||||||
padding-top: 70px;
|
padding-top: 70px;
|
||||||
|
|
||||||
.emoji-mart-no-results-label {
|
.emoji-mart-no-results-label {
|
||||||
margin-top: .2em;
|
margin-top: 0.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.emoji-mart-emoji:hover::before {
|
.emoji-mart-emoji:hover::before {
|
||||||
|
|
|
@ -352,7 +352,7 @@ code {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=checkbox] {
|
input[type="checkbox"] {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
|
@ -368,11 +368,11 @@ code {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text],
|
input[type="text"],
|
||||||
input[type=number],
|
input[type="number"],
|
||||||
input[type=email],
|
input[type="email"],
|
||||||
input[type=password],
|
input[type="password"],
|
||||||
input[type=url],
|
input[type="url"],
|
||||||
textarea {
|
textarea {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -410,10 +410,10 @@ code {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text],
|
input[type="text"],
|
||||||
input[type=number],
|
input[type="number"],
|
||||||
input[type=email],
|
input[type="email"],
|
||||||
input[type=password] {
|
input[type="password"] {
|
||||||
&:focus:invalid:not(:placeholder-shown),
|
&:focus:invalid:not(:placeholder-shown),
|
||||||
&:required:invalid:not(:placeholder-shown) {
|
&:required:invalid:not(:placeholder-shown) {
|
||||||
border-color: lighten($error-red, 12%);
|
border-color: lighten($error-red, 12%);
|
||||||
|
@ -425,10 +425,10 @@ code {
|
||||||
color: lighten($error-red, 12%);
|
color: lighten($error-red, 12%);
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text],
|
input[type="text"],
|
||||||
input[type=number],
|
input[type="number"],
|
||||||
input[type=email],
|
input[type="email"],
|
||||||
input[type=password],
|
input[type="password"],
|
||||||
textarea,
|
textarea,
|
||||||
select {
|
select {
|
||||||
border-color: lighten($error-red, 12%);
|
border-color: lighten($error-red, 12%);
|
||||||
|
@ -1000,7 +1000,7 @@ code {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text] {
|
input[type="text"] {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
|
@ -64,8 +64,8 @@
|
||||||
max-width: calc(100% - 45px - 25px);
|
max-width: calc(100% - 45px - 25px);
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=radio],
|
input[type="radio"],
|
||||||
input[type=checkbox] {
|
input[type="checkbox"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text] {
|
input[type="text"] {
|
||||||
display: block;
|
display: block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -109,7 +109,6 @@
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
flex: 0 0 auto;
|
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
@ -198,7 +197,7 @@
|
||||||
|
|
||||||
&:active,
|
&:active,
|
||||||
&:focus {
|
&:focus {
|
||||||
background-color: rgba($dark-text-color, .1);
|
background-color: rgba($dark-text-color, 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ a.button.logo-button {
|
||||||
|
|
||||||
.embed,
|
.embed,
|
||||||
.public-layout {
|
.public-layout {
|
||||||
.status__content[data-spoiler=folded] {
|
.status__content[data-spoiler="folded"] {
|
||||||
.e-content {
|
.e-content {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ $highlight-text-color: $ui-highlight-color !default;
|
||||||
$action-button-color: $ui-base-lighter-color !default;
|
$action-button-color: $ui-base-lighter-color !default;
|
||||||
$passive-text-color: $gold-star !default;
|
$passive-text-color: $gold-star !default;
|
||||||
$active-passive-text-color: $success-green !default;
|
$active-passive-text-color: $success-green !default;
|
||||||
|
|
||||||
// For texts on inverted backgrounds
|
// For texts on inverted backgrounds
|
||||||
$inverted-text-color: $ui-base-color !default;
|
$inverted-text-color: $ui-base-color !default;
|
||||||
$lighter-text-color: $ui-base-lighter-color !default;
|
$lighter-text-color: $ui-base-lighter-color !default;
|
||||||
|
@ -48,6 +49,7 @@ $cjk-langs: ja, ko, zh-CN, zh-HK, zh-TW;
|
||||||
|
|
||||||
// Variables for components
|
// Variables for components
|
||||||
$media-modal-media-max-width: 100%;
|
$media-modal-media-max-width: 100%;
|
||||||
|
|
||||||
// put margins on top and bottom of image to avoid the screen covered by image.
|
// put margins on top and bottom of image to avoid the screen covered by image.
|
||||||
$media-modal-media-max-height: 80%;
|
$media-modal-media-max-height: 80%;
|
||||||
|
|
||||||
|
|
14
package.json
14
package.json
|
@ -13,10 +13,10 @@
|
||||||
"test": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:jest",
|
"test": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:jest",
|
||||||
"test:lint": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:lint:sass",
|
"test:lint": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:lint:sass",
|
||||||
"test:lint:js": "eslint --ext=js . --cache",
|
"test:lint:js": "eslint --ext=js . --cache",
|
||||||
"test:lint:sass": "sass-lint -v",
|
"test:lint:sass": "stylelint '**/*.scss'",
|
||||||
"test:jest": "cross-env NODE_ENV=test jest",
|
"test:jest": "cross-env NODE_ENV=test jest",
|
||||||
"format": "prettier --write '**/*.{json,yml}",
|
"format": "prettier --write '**/*.{json,yml}'",
|
||||||
"format-check": "prettier --write '**/*.{json,yml}"
|
"format-check": "prettier --write '**/*.{json,yml}'"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -43,7 +43,6 @@
|
||||||
"babel-plugin-preval": "^5.1.0",
|
"babel-plugin-preval": "^5.1.0",
|
||||||
"babel-plugin-react-intl": "^6.2.0",
|
"babel-plugin-react-intl": "^6.2.0",
|
||||||
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
||||||
"babel-runtime": "^6.26.0",
|
|
||||||
"blurhash": "^1.1.5",
|
"blurhash": "^1.1.5",
|
||||||
"classnames": "^2.3.1",
|
"classnames": "^2.3.1",
|
||||||
"color-blend": "^3.0.1",
|
"color-blend": "^3.0.1",
|
||||||
|
@ -84,6 +83,7 @@
|
||||||
"offline-plugin": "^5.0.7",
|
"offline-plugin": "^5.0.7",
|
||||||
"path-complete-extname": "^1.0.0",
|
"path-complete-extname": "^1.0.0",
|
||||||
"pg": "^8.5.0",
|
"pg": "^8.5.0",
|
||||||
|
"postcss": "^8.4.14",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"postcss-object-fit-images": "^1.1.2",
|
"postcss-object-fit-images": "^1.1.2",
|
||||||
"promise.prototype.finally": "^3.1.3",
|
"promise.prototype.finally": "^3.1.3",
|
||||||
|
@ -137,9 +137,9 @@
|
||||||
"ws": "^8.6.0"
|
"ws": "^8.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/eslint-parser": "^7.18.2",
|
||||||
"@testing-library/jest-dom": "^5.16.4",
|
"@testing-library/jest-dom": "^5.16.4",
|
||||||
"@testing-library/react": "^12.1.5",
|
"@testing-library/react": "^12.1.5",
|
||||||
"babel-eslint": "^10.1.0",
|
|
||||||
"babel-jest": "^28.1.0",
|
"babel-jest": "^28.1.0",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-plugin-import": "~2.26.0",
|
"eslint-plugin-import": "~2.26.0",
|
||||||
|
@ -148,11 +148,13 @@
|
||||||
"eslint-plugin-react": "~7.30.0",
|
"eslint-plugin-react": "~7.30.0",
|
||||||
"jest": "^28.1.0",
|
"jest": "^28.1.0",
|
||||||
"jest-environment-jsdom": "^28.1.0",
|
"jest-environment-jsdom": "^28.1.0",
|
||||||
|
"postcss-scss": "^4.0.4",
|
||||||
"prettier": "^2.6.2",
|
"prettier": "^2.6.2",
|
||||||
"raf": "^3.4.1",
|
"raf": "^3.4.1",
|
||||||
"react-intl-translations-manager": "^5.0.3",
|
"react-intl-translations-manager": "^5.0.3",
|
||||||
"react-test-renderer": "^16.14.0",
|
"react-test-renderer": "^16.14.0",
|
||||||
"sass-lint": "^1.13.1",
|
"stylelint": "^14.8.5",
|
||||||
|
"stylelint-config-standard-scss": "^4.0.0",
|
||||||
"webpack-dev-server": "^3.11.3",
|
"webpack-dev-server": "^3.11.3",
|
||||||
"yargs": "^17.5.1"
|
"yargs": "^17.5.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: ['stylelint-config-standard-scss'],
|
||||||
|
ignoreFiles: [
|
||||||
|
'app/javascript/styles/mastodon/reset.scss',
|
||||||
|
'node_modules/**/*',
|
||||||
|
'vendor/**/*',
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'at-rule-empty-line-before': null,
|
||||||
|
'color-function-notation': null,
|
||||||
|
'color-hex-length': null,
|
||||||
|
'declaration-block-no-redundant-longhand-properties': null,
|
||||||
|
'max-line-length': null,
|
||||||
|
'no-descending-specificity': null,
|
||||||
|
'no-duplicate-selectors': null,
|
||||||
|
'number-max-precision': 8,
|
||||||
|
'property-no-unknown': null,
|
||||||
|
'property-no-vendor-prefix': null,
|
||||||
|
'selector-class-pattern': null,
|
||||||
|
'selector-id-pattern': null,
|
||||||
|
'string-quotes': null,
|
||||||
|
'value-keyword-case': null,
|
||||||
|
'value-no-vendor-prefix': null,
|
||||||
|
|
||||||
|
'scss/dollar-variable-empty-line-before': null,
|
||||||
|
'scss/no-global-function-names': null,
|
||||||
|
},
|
||||||
|
};
|
Loading…
Reference in New Issue