@benhigham/stylelint-config 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -3
- package/package.json +1 -3
- package/src/index.js +1 -11
package/README.md
CHANGED
|
@@ -17,7 +17,6 @@ This configuration:
|
|
|
17
17
|
- Requires proper use of custom media queries and nesting
|
|
18
18
|
- Enforces BEM naming conventions with SUIT CSS methodology
|
|
19
19
|
- Ensures browser compatibility with [Baseline](https://web.dev/baseline) requirements
|
|
20
|
-
- Includes accessibility checks for better a11y compliance
|
|
21
20
|
- Detects and prevents indistinguishable colors and out-of-gamut colors
|
|
22
21
|
- Provides special handling for CSS modules
|
|
23
22
|
|
|
@@ -68,14 +67,12 @@ This configuration includes several plugins:
|
|
|
68
67
|
- [`stylelint-selector-bem-pattern`](https://github.com/simonsmith/stylelint-selector-bem-pattern): Enforces BEM naming convention
|
|
69
68
|
- [`stylelint-no-browser-hacks`](https://github.com/stylelint/stylelint-no-browser-hacks): Disallows browser hacks
|
|
70
69
|
- [`stylelint-no-unsupported-browser-features`](https://github.com/ismay/stylelint-no-unsupported-browser-features): Warns about unsupported browser features
|
|
71
|
-
- [`stylelint-a11y`](https://github.com/YozhikM/stylelint-a11y): Ensures CSS is accessible
|
|
72
70
|
|
|
73
71
|
### Key Rules
|
|
74
72
|
|
|
75
73
|
- **Browser Compatibility**: Enforces only widely supported CSS features
|
|
76
74
|
- **SCSS Best Practices**: Limits nesting depth, enforces consistent naming patterns
|
|
77
75
|
- **BEM Pattern**: Uses SUIT CSS methodology for class naming
|
|
78
|
-
- **Accessibility**: Ensures focus styles, supports reduced motion, and more
|
|
79
76
|
- **CSS Modules**: Special handling for `.module.scss` files with relaxed naming rules
|
|
80
77
|
|
|
81
78
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@benhigham/stylelint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "My personal Stylelint configuration.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/benhigham/stylelint-config#readme",
|
|
@@ -50,7 +50,6 @@
|
|
|
50
50
|
"verify"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"stylelint-a11y": "^1.2.3",
|
|
54
53
|
"stylelint-config-recess-order": "^6.0.0",
|
|
55
54
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
56
55
|
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
|
@@ -58,7 +57,6 @@
|
|
|
58
57
|
"stylelint-gamut": "^1.3.4",
|
|
59
58
|
"stylelint-high-performance-animation": "^1.11.0",
|
|
60
59
|
"stylelint-media-use-custom-media": "^4.0.0",
|
|
61
|
-
"stylelint-no-browser-hacks": "^1.3.0",
|
|
62
60
|
"stylelint-no-indistinguishable-colors": "^2.3.1",
|
|
63
61
|
"stylelint-no-unresolved-module": "^2.3.0",
|
|
64
62
|
"stylelint-no-unsupported-browser-features": "^8.0.4",
|
package/src/index.js
CHANGED
|
@@ -14,14 +14,11 @@ const config = {
|
|
|
14
14
|
'stylelint-media-use-custom-media',
|
|
15
15
|
'stylelint-use-nesting',
|
|
16
16
|
'stylelint-plugin-require-baseline',
|
|
17
|
-
'stylelint-no-browser-hacks',
|
|
18
17
|
'stylelint-no-unsupported-browser-features',
|
|
19
|
-
'stylelint-a11y',
|
|
20
18
|
],
|
|
21
19
|
rules: {
|
|
22
20
|
// Browser compatibility
|
|
23
|
-
'plugin/require-baseline': [true, { available: '
|
|
24
|
-
'plugin/no-browser-hacks': true,
|
|
21
|
+
'plugin/require-baseline': [true, { available: 'newly' }],
|
|
25
22
|
'plugin/no-unsupported-browser-features': true,
|
|
26
23
|
|
|
27
24
|
// SCSS-specific rules
|
|
@@ -65,13 +62,6 @@ const config = {
|
|
|
65
62
|
'gamut/color-no-out-gamut-range': true,
|
|
66
63
|
'plugin/no-low-performance-animation-properties': true,
|
|
67
64
|
'plugin/no-unresolved-module': { modules: ['node_modules'] },
|
|
68
|
-
|
|
69
|
-
// Accessibility
|
|
70
|
-
'a11y/media-prefers-reduced-motion': true,
|
|
71
|
-
'a11y/no-outline-none': true,
|
|
72
|
-
'a11y/selector-pseudo-class-focus': true,
|
|
73
|
-
'a11y/no-obsolete-attribute': true,
|
|
74
|
-
'a11y/no-obsolete-element': true,
|
|
75
65
|
},
|
|
76
66
|
overrides: [
|
|
77
67
|
{
|