@d-zero/stylelint-config 5.0.0-dev.89 → 5.0.0-dev.91

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/base.js ADDED
@@ -0,0 +1,184 @@
1
+ module.exports = {
2
+ extends: ['stylelint-config-standard', 'stylelint-config-recess-order'],
3
+ plugins: ['stylelint-scss', 'stylelint-order'],
4
+ rules: {
5
+ 'order/order': [
6
+ 'dollar-variables',
7
+ 'custom-properties',
8
+ {
9
+ type: 'at-rule',
10
+ name: 'custom-media',
11
+ },
12
+ {
13
+ type: 'at-rule',
14
+ name: 'extend',
15
+ },
16
+ {
17
+ type: 'at-rule',
18
+ name: 'mixin',
19
+ },
20
+ 'declarations',
21
+ {
22
+ type: 'at-rule',
23
+ name: 'supports',
24
+ },
25
+ {
26
+ type: 'at-rule',
27
+ name: 'media',
28
+ hasBlock: true,
29
+ },
30
+ 'rules',
31
+ ],
32
+ 'at-rule-disallowed-list': null,
33
+ 'at-rule-empty-line-before': [
34
+ 'always',
35
+ {
36
+ except: ['blockless-after-same-name-blockless', 'first-nested'],
37
+ ignore: ['after-comment'],
38
+ },
39
+ ],
40
+ 'at-rule-no-vendor-prefix': true,
41
+ 'at-rule-no-unknown': [
42
+ true,
43
+ {
44
+ ignoreAtRules: ['mixin', 'extend', 'for', 'if', 'include', 'use', 'forward'],
45
+ },
46
+ ],
47
+ 'color-hex-length': 'short',
48
+ 'color-named': 'never',
49
+ 'color-no-invalid-hex': true,
50
+ 'comment-empty-line-before': [
51
+ 'always',
52
+ {
53
+ ignore: ['stylelint-commands'],
54
+ },
55
+ ],
56
+ 'comment-no-empty': true,
57
+ 'comment-whitespace-inside': 'always',
58
+ 'comment-word-disallowed-list': ['/^TODO:/'],
59
+ 'custom-property-empty-line-before': 'never',
60
+ 'declaration-block-no-duplicate-properties': true,
61
+ 'declaration-block-no-redundant-longhand-properties': [
62
+ true,
63
+ {
64
+ ignoreShorthands: ['flex', 'grid-template'],
65
+ },
66
+ ],
67
+ 'declaration-block-no-shorthand-property-overrides': true,
68
+ 'declaration-block-single-line-max-declarations': 80,
69
+ 'declaration-empty-line-before': 'never',
70
+ 'declaration-no-important': true,
71
+ 'declaration-property-value-disallowed-list': {
72
+ '/^(?:color|background|background-color|border|border-color|outline|outline-color)$/':
73
+ ['/#[0-9a-f]{3}/', '/(?:rgb|hsl)a?\\(.+?\\)/'],
74
+ content: ['/^\\"\\\\[0-9a-fA-F]{1,6}\\"$/'],
75
+ flex: ['/calc/'],
76
+ '/^(?:max-|min-)?(?:width|height)|^flex/': [
77
+ '/[1-9]*\\.[0-9]+(?:%|vw|vh)/',
78
+ '/(?:^|[^0-9])[0-9](?:%|vw|vh)/',
79
+ '/(?:^|[^0-9])[0-9]{2}(?:%|vw|vh)/',
80
+ '/1[0-9][1-9](?:%|vw|vh)/',
81
+ '/1[1-9][0-9](?:%|vw|vh)/',
82
+ '/[2-9][0-9][0-9](?:%|vw|vh)/',
83
+ '/[0-9]{4,}(?:%|vw|vh)/',
84
+ ],
85
+ },
86
+ 'declaration-property-value-allowed-list': {
87
+ 'font-size': [
88
+ 'inherit',
89
+ '$root-font-size',
90
+ '$base-font-size',
91
+ '1em',
92
+ '/^calc\\((?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\/ (?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\* (?:1em|100vw)\\)$/',
93
+ '/^(?:[0-9]*\\.)?[0-9]+rem/',
94
+ '/^clamp\\(/',
95
+ ],
96
+ },
97
+ 'font-family-name-quotes': 'always-where-required',
98
+ 'font-family-no-duplicate-names': true,
99
+ 'font-weight-notation': 'named-where-possible',
100
+ 'function-disallowed-list': null,
101
+ 'function-calc-no-unspaced-operator': true,
102
+ 'function-linear-gradient-no-nonstandard-direction': true,
103
+ 'function-name-case': 'lower',
104
+ 'function-no-unknown': [
105
+ true,
106
+ {
107
+ ignoreFunctions: ['a', 'lighten', 'darken', 'resolve'],
108
+ },
109
+ ],
110
+ 'function-url-scheme-allowed-list': null,
111
+ 'function-url-no-scheme-relative': true,
112
+ 'function-url-quotes': 'always',
113
+ 'keyframe-declaration-no-important': true,
114
+ 'length-zero-no-unit': true,
115
+ 'max-nesting-depth': 8,
116
+ 'media-feature-name-no-unknown': true,
117
+ 'media-feature-name-no-vendor-prefix': true,
118
+ 'no-duplicate-selectors': true,
119
+ 'no-descending-specificity': null,
120
+ 'no-empty-source': true,
121
+ 'no-invalid-double-slash-comments': true,
122
+ 'no-unknown-animations': true,
123
+ 'number-max-precision': 4,
124
+ 'property-disallowed-list': null,
125
+ 'property-no-unknown': true,
126
+ 'property-no-vendor-prefix': [
127
+ true,
128
+ {
129
+ severity: 'warning',
130
+ message: 'Autoprefixerを利用するのでベンダープレフィックスは不要です',
131
+ },
132
+ ],
133
+ 'rule-empty-line-before': [
134
+ 'always-multi-line',
135
+ {
136
+ except: ['after-single-line-comment', 'first-nested'],
137
+ ignore: ['after-comment'],
138
+ },
139
+ ],
140
+ 'selector-attribute-operator-disallowed-list': null,
141
+ 'selector-attribute-quotes': 'always',
142
+ 'selector-max-compound-selectors': 8,
143
+ 'selector-max-specificity': '0,10,10',
144
+ 'selector-max-id': 0,
145
+ 'selector-max-universal': 1,
146
+ 'selector-no-vendor-prefix': true,
147
+ 'selector-pseudo-class-disallowed-list': ['link'],
148
+ 'selector-pseudo-element-colon-notation': 'double',
149
+ 'selector-type-case': 'lower',
150
+ 'selector-type-no-unknown': true,
151
+ 'shorthand-property-no-redundant-values': null,
152
+ 'string-no-newline': true,
153
+ 'time-min-milliseconds': 100,
154
+ 'unit-disallowed-list': [
155
+ 'ex',
156
+ 'ch',
157
+ 'mm',
158
+ 'q',
159
+ 'cm',
160
+ 'in',
161
+ 'pt',
162
+ 'pc',
163
+ 'vm',
164
+ 's',
165
+ 'grad',
166
+ 'rad',
167
+ 'turn',
168
+ ],
169
+ 'unit-no-unknown': true,
170
+ 'value-keyword-case': [
171
+ 'lower',
172
+ {
173
+ ignoreProperties: ['/^\\$font-family-/'],
174
+ },
175
+ ],
176
+ 'value-no-vendor-prefix': true,
177
+ },
178
+ overrides: [
179
+ {
180
+ files: ['__assets/**/*.scss'],
181
+ customSyntax: 'postcss-scss',
182
+ },
183
+ ],
184
+ };
package/index.js ADDED
@@ -0,0 +1,27 @@
1
+ const base = require('./base');
2
+
3
+ module.exports = {
4
+ ...base,
5
+ ignoreFiles: [
6
+ '__assets/**/*.{js,jsx,ts,tsx,html,pug}',
7
+ '__assets/css/_syntax-rules.scss',
8
+ 'htdocs/**/*',
9
+ 'docs/**/*.md',
10
+ ],
11
+ rules: {
12
+ ...base.rules,
13
+ 'scss/dollar-variable-pattern':
14
+ '^(?:[a-z]{2,}-[a-z0-9-]+|_[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$',
15
+ 'scss/percent-placeholder-pattern': '^[a-z]{2,}(-[a-z0-9-]+)?$',
16
+ 'custom-media-pattern': '[a-z][a-z-]*',
17
+ 'custom-property-pattern': '[a-z][a-z-]*',
18
+ 'selector-class-pattern': [
19
+ '^c-[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)?$',
20
+ {
21
+ resolveNestedSelectors: true,
22
+ },
23
+ ],
24
+ 'selector-id-pattern': '^$',
25
+ 'selector-nested-pattern': '^[^.]+.*',
26
+ },
27
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-zero/stylelint-config",
3
- "version": "5.0.0-dev.89+925fa30",
3
+ "version": "5.0.0-dev.91+8b15f42",
4
4
  "description": "Configurations of Stylelint",
5
5
  "repository": "https://github.com/d-zero-dev/node-dev-env.git",
6
6
  "author": "D-ZERO Co., Ltd.",
@@ -9,10 +9,16 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
+ "type": "commonjs",
13
+ "exports": {
14
+ ".": "./index.js",
15
+ "./base": "./base.js"
16
+ },
12
17
  "files": [
13
- ".stylelintrc.json"
18
+ "base.js",
19
+ "index.js"
14
20
  ],
15
- "main": ".stylelintrc.json",
21
+ "main": "index.js",
16
22
  "dependencies": {
17
23
  "stylelint": "16.1.0",
18
24
  "stylelint-config-recess-order": "4.4.0",
@@ -20,5 +26,5 @@
20
26
  "stylelint-order": "6.0.4",
21
27
  "stylelint-scss": "6.0.0"
22
28
  },
23
- "gitHead": "925fa30b4143c9626d26e9faaba152098d1d10d2"
29
+ "gitHead": "8b15f4231cde1c9049f5ab3a01e41f4f522c6687"
24
30
  }
package/.stylelintrc.json DELETED
@@ -1,204 +0,0 @@
1
- {
2
- "extends": ["stylelint-config-standard", "stylelint-config-recess-order"],
3
- "ignoreFiles": [
4
- "__assets/**/*.{js,jsx,ts,tsx,html,pug}",
5
- "__assets/css/_syntax-rules.scss",
6
- "htdocs/**/*",
7
- "docs/**/*.md"
8
- ],
9
- "plugins": ["stylelint-scss", "stylelint-order"],
10
- "rules": {
11
- "order/order": [
12
- "dollar-variables",
13
- "custom-properties",
14
- {
15
- "type": "at-rule",
16
- "name": "custom-media"
17
- },
18
- {
19
- "type": "at-rule",
20
- "name": "extend"
21
- },
22
- {
23
- "type": "at-rule",
24
- "name": "mixin"
25
- },
26
- "declarations",
27
- {
28
- "type": "at-rule",
29
- "name": "supports"
30
- },
31
- {
32
- "type": "at-rule",
33
- "name": "media",
34
- "hasBlock": true
35
- },
36
- "rules"
37
- ],
38
- "scss/dollar-variable-pattern": "^(?:[a-z]{2,}-[a-z0-9-]+|_[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$",
39
- "scss/percent-placeholder-pattern": "^[a-z]{2,}(-[a-z0-9-]+)?$",
40
- "at-rule-disallowed-list": null,
41
- "at-rule-empty-line-before": [
42
- "always",
43
- {
44
- "except": ["blockless-after-same-name-blockless", "first-nested"],
45
- "ignore": ["after-comment"]
46
- }
47
- ],
48
- "at-rule-no-vendor-prefix": true,
49
- "at-rule-no-unknown": [
50
- true,
51
- {
52
- "ignoreAtRules": ["mixin", "extend", "for", "if", "include", "use", "forward"]
53
- }
54
- ],
55
- "color-hex-length": "short",
56
- "color-named": "never",
57
- "color-no-invalid-hex": true,
58
- "comment-empty-line-before": [
59
- "always",
60
- {
61
- "ignore": ["stylelint-commands"]
62
- }
63
- ],
64
- "comment-no-empty": true,
65
- "comment-whitespace-inside": "always",
66
- "comment-word-disallowed-list": ["/^TODO:/"],
67
- "custom-media-pattern": "[a-z][a-z-]*",
68
- "custom-property-empty-line-before": "never",
69
- "custom-property-pattern": "[a-z][a-z-]*",
70
- "declaration-block-no-duplicate-properties": true,
71
- "declaration-block-no-redundant-longhand-properties": [
72
- true,
73
- {
74
- "ignoreShorthands": ["flex", "grid-template"]
75
- }
76
- ],
77
- "declaration-block-no-shorthand-property-overrides": true,
78
- "declaration-block-single-line-max-declarations": 80,
79
- "declaration-empty-line-before": "never",
80
- "declaration-no-important": true,
81
- "declaration-property-value-disallowed-list": {
82
- "/^(?:color|background|background-color|border|border-color|outline|outline-color)$/": [
83
- "/#[0-9a-f]{3}/",
84
- "/(?:rgb|hsl)a?\\(.+?\\)/"
85
- ],
86
- "content": ["/^\\\"\\\\[0-9a-fA-F]{1,6}\\\"$/"],
87
- "flex": ["/calc/"],
88
- "/^(?:max-|min-)?(?:width|height)|^flex/": [
89
- "/[1-9]*\\.[0-9]+(?:%|vw|vh)/",
90
- "/(?:^|[^0-9])[0-9](?:%|vw|vh)/",
91
- "/(?:^|[^0-9])[0-9]{2}(?:%|vw|vh)/",
92
- "/1[0-9][1-9](?:%|vw|vh)/",
93
- "/1[1-9][0-9](?:%|vw|vh)/",
94
- "/[2-9][0-9][0-9](?:%|vw|vh)/",
95
- "/[0-9]{4,}(?:%|vw|vh)/"
96
- ]
97
- },
98
- "declaration-property-value-allowed-list": {
99
- "font-size": [
100
- "inherit",
101
- "$root-font-size",
102
- "$base-font-size",
103
- "1em",
104
- "/^calc\\((?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\/ (?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\* (?:1em|100vw)\\)$/",
105
- "/^(?:[0-9]*\\.)?[0-9]+rem/",
106
- "/^clamp\\(/"
107
- ]
108
- },
109
- "font-family-name-quotes": "always-where-required",
110
- "font-family-no-duplicate-names": true,
111
- "font-weight-notation": "named-where-possible",
112
- "function-disallowed-list": null,
113
- "function-calc-no-unspaced-operator": true,
114
- "function-linear-gradient-no-nonstandard-direction": true,
115
- "function-name-case": "lower",
116
- "function-no-unknown": [
117
- true,
118
- {
119
- "ignoreFunctions": ["a", "lighten", "darken", "resolve"]
120
- }
121
- ],
122
- "function-url-scheme-allowed-list": null,
123
- "function-url-no-scheme-relative": true,
124
- "function-url-quotes": "always",
125
- "keyframe-declaration-no-important": true,
126
- "length-zero-no-unit": true,
127
- "max-nesting-depth": 8,
128
- "media-feature-name-no-unknown": true,
129
- "media-feature-name-no-vendor-prefix": true,
130
- "no-duplicate-selectors": true,
131
- "no-descending-specificity": null,
132
- "no-empty-source": true,
133
- "no-invalid-double-slash-comments": true,
134
- "no-unknown-animations": true,
135
- "number-max-precision": 4,
136
- "property-disallowed-list": null,
137
- "property-no-unknown": true,
138
- "property-no-vendor-prefix": [
139
- true,
140
- {
141
- "severity": "warning",
142
- "message": "Autoprefixerを利用するのでベンダープレフィックスは不要です"
143
- }
144
- ],
145
- "rule-empty-line-before": [
146
- "always-multi-line",
147
- {
148
- "except": ["after-single-line-comment", "first-nested"],
149
- "ignore": ["after-comment"]
150
- }
151
- ],
152
- "selector-attribute-operator-disallowed-list": null,
153
- "selector-attribute-quotes": "always",
154
- "selector-class-pattern": [
155
- "^c-[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)?$",
156
- {
157
- "resolveNestedSelectors": true
158
- }
159
- ],
160
- "selector-id-pattern": "^$",
161
- "selector-max-compound-selectors": 8,
162
- "selector-max-specificity": "0,10,10",
163
- "selector-nested-pattern": "^[^.]+.*",
164
- "selector-max-id": 0,
165
- "selector-max-universal": 1,
166
- "selector-no-vendor-prefix": true,
167
- "selector-pseudo-class-disallowed-list": ["link"],
168
- "selector-pseudo-element-colon-notation": "double",
169
- "selector-type-case": "lower",
170
- "selector-type-no-unknown": true,
171
- "shorthand-property-no-redundant-values": null,
172
- "string-no-newline": true,
173
- "time-min-milliseconds": 100,
174
- "unit-disallowed-list": [
175
- "ex",
176
- "ch",
177
- "mm",
178
- "q",
179
- "cm",
180
- "in",
181
- "pt",
182
- "pc",
183
- "vm",
184
- "s",
185
- "grad",
186
- "rad",
187
- "turn"
188
- ],
189
- "unit-no-unknown": true,
190
- "value-keyword-case": [
191
- "lower",
192
- {
193
- "ignoreProperties": ["/^\\$font-family-/"]
194
- }
195
- ],
196
- "value-no-vendor-prefix": true
197
- },
198
- "overrides": [
199
- {
200
- "files": ["__assets/**/*.scss"],
201
- "customSyntax": "postcss-scss"
202
- }
203
- ]
204
- }