Skip to content

Commit

Permalink
chore(lint): Apply stricter rules in stylelint (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
aifrak authored Jun 16, 2023
1 parent 21edb4a commit b71f185
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
extends:
- stylelint-config-standard
- stylelint-config-recommended
- stylelint-config-recommended-scss
- stylelint-config-sass-guidelines
- stylelint-config-idiomatic-order
- "@ronilaukkarinen/stylelint-a11y/recommended"
Expand All @@ -18,15 +19,30 @@ plugins:
- stylelint-use-logical-spec
- stylelint-use-nesting

reportDescriptionlessDisables: true
reportInvalidScopeDisables: true
reportNeedlessDisables: true

rules:
# Rules from core
alpha-value-notation: number
hue-degree-notation: number
font-weight-notation: numeric
color-function-notation: modern
color-no-hex: true
font-family-name-quotes: always-unless-keyword
font-weight-notation:
- numeric
- ignore:
- relative
function-url-no-scheme-relative: true
hue-degree-notation: number
selector-max-id: 0

# Rules from plugins
a11y/font-size-is-readable: true
a11y/media-prefers-color-scheme: true
a11y/no-obsolete-attribute: true
a11y/no-obsolete-element: true
a11y/no-text-align-justify: true
color-format/format:
format: hsl
csstools/use-nesting: always
Expand All @@ -37,9 +53,7 @@ rules:
order/properties-alphabetical-order: null
plugin/declaration-block-no-ignored-properties: true
plugin/no-low-performance-animation-properties: true
plugin/no-unsupported-browser-features:
- true
- severity: warning
plugin/no-unsupported-browser-features: true
scale-unlimited/declaration-strict-value:
- - /color/
- fill
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
"https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json": "cspell.yml"
},

// Stylelint:
"stylelint.validate": ["css", "scss"],

// Override languages:
"[dockerfile]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
Expand Down
36 changes: 36 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"stylelint-color-format": "^1.1.0",
"stylelint-config-idiomatic-order": "^9.0.0",
"stylelint-config-recommended": "^12.0.0",
"stylelint-config-recommended-scss": "^12.0.0",
"stylelint-config-sass-guidelines": "^10.0.0",
"stylelint-config-standard": "^33.0.0",
"stylelint-csstree-validator": "^3.0.0",
Expand Down
1 change: 1 addition & 0 deletions spellcheck/dictionaries/workspace.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ calver
codecov
conventionalcommits
Dependabot
Descriptionless
dockercompose
dockerfiles
dotfiles
Expand Down

0 comments on commit b71f185

Please sign in to comment.