4.11.0 • Published 3 months ago

@w0s/stylelint-config v4.11.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

stylelint-config

npm version Workflow status

Stylelint configuration file used on my personal website (w0s.jp).

Features

It is based on stylelint-config-standard with its own rule settings.

šŸ™‚: No problem, šŸ™: Warning, 😨: Error

  • Do not use ID selector.
    • 😨 #foo {}
    • šŸ™‚ .foo {}
  • Do not use multiple universal selectors. However, this excludes the use of a next-sibling combinator (+).
    • šŸ™‚ * {}
    • 😨 * > * {}
    • šŸ™‚ * + * {} (This is used in the "owl selector" in stack layout)
  • CSS nesting must use the & nesting selector.
    • 😨 .foo { .bar {} }
    • šŸ™‚ .foo { &.bar {} }
  • Disallow !important within declarations.
    • šŸ™ color: #000 !important
    • šŸ™‚ color: #000
  • The order of properties within declaration blocks follows stylelint-config-concentric-order.
    • 😨 .foo { padding: 1em; margin: 1em }
    • šŸ™‚ .foo { margin: 1em; padding: 1em }
  • Multi-keyword syntax is recommended for the display property. The stylelint-display-multi-keyword plugin is used.
    • šŸ™ display: block
    • šŸ™‚ display: block flow
  • Use of CSS physical properties and values is not recommended. Use logical properties and values. The stylelint-plugin-logical-css plugin is used.
    • šŸ™ margin-top: 1em
    • šŸ™‚ margin-block-start: 1em
    • šŸ™ text-align: right
    • šŸ™‚ text-align: end
    • šŸ™‚ overflow-x: visible (The overflow-* logical properties is not well supported by browsers)
  • Use of CSS physical utils is not recommended. Use logical utils. The stylelint-plugin-logical-css plugin is used.
    • šŸ™ inline-size: 100lvw
    • šŸ™‚ inline-size: 100lvi
  • Disallow default viewport-percentage units. The stylelint-no-default-viewport plugin is used.
    • 😨 inline-size: 10vi
    • šŸ™‚ inline-size: 10lvi
  • The font-weight value must be numbers.
    • 😨 font-weight: normal
    • šŸ™‚ font-weight: 500 /* Windows + Yu Gothic measures to be greater than 400 */
  • For the root element, color and background-color must be specified as a set. See stylelint-root-colors for details.
    • 😨 :root { color: #000 }
    • šŸ™‚ :root { background-color: #fff; color: #000 }

See source code for other details.

Usage

{
  "extends": ["@w0s/stylelint-config"]
}
4.11.0

3 months ago

4.10.0

4 months ago

4.9.0

5 months ago

4.8.0

10 months ago

4.7.0

1 year ago

4.6.0

1 year ago

4.5.1

1 year ago

4.5.0

1 year ago

4.4.0

1 year ago

4.3.0

1 year ago

4.1.0

1 year ago

4.2.0

1 year ago

4.1.1

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

2.0.2

1 year ago

3.0.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.2

3 years ago