@mikey-pro/stylelint-config 7.3.0 → 8.0.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.
Files changed (2) hide show
  1. package/index.js +76 -2
  2. package/package.json +17 -3
package/index.js CHANGED
@@ -1,5 +1,14 @@
1
- module.exports = {
2
- extends: ['stylelint-config-standard', 'stylelint-config-standard-scss'],
1
+ const config = {
2
+ extends: [
3
+ 'stylelint-config-standard',
4
+ 'stylelint-config-standard-scss',
5
+ 'stylelint-config-recommended-vue',
6
+ ],
7
+ plugins: [
8
+ 'stylelint-scss',
9
+ 'stylelint-order',
10
+ 'stylelint-declaration-strict-value'
11
+ ],
3
12
  ignoreFiles: [
4
13
  '**/*.js',
5
14
  '**/*.cjs',
@@ -8,4 +17,69 @@ module.exports = {
8
17
  '**/*.json',
9
18
  '**/*.pi',
10
19
  ],
20
+ rules: {
21
+ // Custom property naming
22
+ 'custom-property-pattern': '^--[a-z0-9-]+$',
23
+ 'selector-class-pattern': '^[a-z][a-zA-Z0-9-]*$',
24
+
25
+ // Modern CSS practices
26
+ 'declaration-no-important': true,
27
+ 'shorthand-property-no-redundant-values': true,
28
+ 'number-max-precision': 4,
29
+ 'value-no-vendor-prefix': true,
30
+ 'property-no-vendor-prefix': true,
31
+
32
+ // SCSS specific rules
33
+ 'scss/at-extend-no-missing-placeholder': true,
34
+ 'scss/selector-no-redundant-nesting-selector': true,
35
+ 'scss/no-duplicate-mixins': true,
36
+
37
+ // Unit and calculation consistency
38
+ 'unit-disallowed-list': ['pt'],
39
+ 'function-calc-no-unspaced-operator': true,
40
+
41
+ // Media query handling
42
+ 'media-feature-name-no-vendor-prefix': true,
43
+ 'media-query-list-comma-newline-after': 'always-multi-line',
44
+
45
+ // Modern layout rules
46
+ 'declaration-property-value-disallowed-list': {
47
+ 'position': ['fixed'],
48
+ '/^grid/': ['auto'],
49
+ },
50
+
51
+ // Color handling
52
+ 'color-function-notation': 'modern',
53
+ 'color-named': 'never',
54
+
55
+ // Z-index handling
56
+ 'declaration-strict-value': [
57
+ ['/color/', 'z-index'],
58
+ {
59
+ ignoreKeywords: ['transparent', 'inherit', 'currentColor']
60
+ }
61
+ ],
62
+
63
+ // Specificity and maintainability
64
+ 'max-nesting-depth': 3,
65
+ 'selector-max-compound-selectors': 4,
66
+ 'selector-max-specificity': '0,4,2',
67
+
68
+ // Animations and transitions
69
+ 'time-min-milliseconds': 100,
70
+ 'declaration-property-value-allowed-list': {
71
+ 'transition': ['/^\\d+ms/', '/^\\d+s/'],
72
+ 'animation': ['/^\\d+ms/', '/^\\d+s/']
73
+ },
74
+
75
+ // Add order rules
76
+ 'order/properties-alphabetical-order': true,
77
+ }
11
78
  };
79
+
80
+ export default config;
81
+
82
+ // Support CommonJS environments
83
+ if (typeof module !== 'undefined' && module.exports) {
84
+ module.exports = config;
85
+ }
package/package.json CHANGED
@@ -1,11 +1,25 @@
1
1
  {
2
2
  "name": "@mikey-pro/stylelint-config",
3
- "version": "7.3.0",
3
+ "version": "8.0.0",
4
4
  "description": "Mikey Pro Stylelint configuration",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
- "stylelint-config-standard": "^36.0.0",
8
- "stylelint-config-standard-scss": "^13.1.0"
7
+ "stylelint-config-recommended-vue": "^1.6.0",
8
+ "stylelint-config-standard": "^37.0.0",
9
+ "stylelint-config-standard-scss": "^14.0.0",
10
+ "stylelint-declaration-strict-value": "^1.10.4",
11
+ "stylelint-order": "^6.0.4",
12
+ "stylelint-scss": "^6.2.1",
13
+ "postcss": "^8.5.1",
14
+ "postcss-scss": "^4.0.9"
15
+ },
16
+ "peerDependencies": {
17
+ "stylelint": "^16.2.1"
18
+ },
19
+ "type": "module",
20
+ "engines": {
21
+ "node": ">=18.0.0",
22
+ "npm": ">=9.0.0"
9
23
  },
10
24
  "files": [
11
25
  "index.js",