@enke.dev/lint 0.8.0 → 0.8.1
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/package.json +1 -1
- package/stylelint.config.js +25 -24
package/package.json
CHANGED
package/stylelint.config.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
2
|
+
* Prepares a Stylelint configuration
|
|
3
|
+
* @param options to configure options
|
|
4
|
+
* @returns an options object to be used for Stylelint
|
|
4
5
|
*/
|
|
5
|
-
export const defineConfig =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
export const defineConfig = ({ cssCustomPropertyPrefix }) => ({
|
|
7
|
+
extends: ['stylelint-config-standard-scss', 'stylelint-config-rational-order'],
|
|
8
|
+
rules: {
|
|
9
|
+
'custom-property-pattern': [
|
|
10
|
+
`^-?${cssCustomPropertyPrefix}-[a-z0-9]*(-[a-z0-9]+)*$`,
|
|
11
|
+
{
|
|
12
|
+
message: `Custom properties should be written in lowercase with hyphens starting with \`--${cssCustomPropertyPrefix}-\` (or internals with a triple-slash \`---${cssCustomPropertyPrefix}-\`)`,
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
'declaration-empty-line-before': null,
|
|
16
|
+
'rule-empty-line-before': [
|
|
17
|
+
'always-multi-line',
|
|
18
|
+
{ except: ['after-single-line-comment', 'first-nested'] },
|
|
19
|
+
],
|
|
20
|
+
'plugin/rational-order': [
|
|
21
|
+
true,
|
|
22
|
+
{
|
|
23
|
+
'border-in-box-model': false,
|
|
24
|
+
'empty-line-between-groups': true,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
27
28
|
});
|