@open-xchange/linter-presets 0.11.2 → 0.11.3
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/CHANGELOG.md +4 -0
- package/dist/stylelint/index.js +10 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/stylelint/index.js
CHANGED
|
@@ -25,6 +25,11 @@ export function configure(options) {
|
|
|
25
25
|
const key = rule.split("/")[0];
|
|
26
26
|
(rules[key] ?? rules.base)[rule] = value;
|
|
27
27
|
}
|
|
28
|
+
// predefined rules for SCSS (used in ".scss" and ".vue" files)
|
|
29
|
+
rules.scss = {
|
|
30
|
+
"scss/double-slash-comment-empty-line-before": null,
|
|
31
|
+
...rules.scss,
|
|
32
|
+
};
|
|
28
33
|
return {
|
|
29
34
|
// ignore certain files and folders
|
|
30
35
|
ignoreFiles,
|
|
@@ -64,6 +69,7 @@ export function configure(options) {
|
|
|
64
69
|
"@stylistic/declaration-colon-newline-after": null,
|
|
65
70
|
"@stylistic/indentation": [stylistic.indent, { ignore: ["inside-parens"] }],
|
|
66
71
|
"@stylistic/max-line-length": null,
|
|
72
|
+
"@stylistic/no-empty-first-line": null,
|
|
67
73
|
"@stylistic/selector-list-comma-newline-after": null,
|
|
68
74
|
"@stylistic/string-quotes": (stylistic.quotes === "off") ? null : [stylistic.quotes, { avoidEscape: true }],
|
|
69
75
|
// custom rules
|
|
@@ -75,27 +81,19 @@ export function configure(options) {
|
|
|
75
81
|
{
|
|
76
82
|
files: ["**/*.scss"],
|
|
77
83
|
extends: ["stylelint-config-standard-scss"],
|
|
78
|
-
rules:
|
|
79
|
-
"scss/double-slash-comment-empty-line-before": null,
|
|
80
|
-
...rules.scss,
|
|
81
|
-
},
|
|
84
|
+
rules: rules.scss,
|
|
82
85
|
},
|
|
83
86
|
// ".less" files
|
|
84
87
|
{
|
|
85
88
|
files: ["**/*.less"],
|
|
86
89
|
extends: ["stylelint-config-standard-less"],
|
|
87
|
-
rules:
|
|
88
|
-
...rules.less,
|
|
89
|
-
},
|
|
90
|
+
rules: rules.less,
|
|
90
91
|
},
|
|
91
92
|
// ".vue" files (for now, only with SCSS)
|
|
92
93
|
{
|
|
93
94
|
files: ["**/*.vue"],
|
|
94
|
-
extends: ["stylelint-config-standard-
|
|
95
|
-
rules:
|
|
96
|
-
"scss/double-slash-comment-empty-line-before": null,
|
|
97
|
-
...rules.scss,
|
|
98
|
-
},
|
|
95
|
+
extends: ["stylelint-config-standard-scss", "stylelint-config-standard-vue/scss"],
|
|
96
|
+
rules: rules.scss,
|
|
99
97
|
},
|
|
100
98
|
],
|
|
101
99
|
};
|