-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.stylelintrc.cjs
61 lines (57 loc) · 1.83 KB
/
.stylelintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const { propertyGroups } = require("stylelint-config-clean-order");
const propertiesOrder = propertyGroups.map((properties) => ({
noEmptyLineBetween: true,
emptyLineBefore: "never", // Don't add empty lines between order groups.
properties,
}));
module.exports = {
extends: [
// "stylelint-config-standard", // standard stylelint rules for css
"stylelint-config-standard-scss", // for scss , this will use standard config too but for scss so you can delete the first line
"stylelint-config-html",
"stylelint-config-clean-order", // alternative : stylelint-config-recess-order / stylelint-config-property-sort-order-smacss
],
plugins: ["stylelint-high-performance-animation"],
overrides: [
{
files: ["*.scss", "**/*.scss", "*.sass", "**/*.sass"],
customSyntax: "postcss-scss",
},
{
files: ["*.html", "**/*.html"],
customSyntax: "postcss-html",
},
{
files: ["*.md", "**/*.md"],
customSyntax: "postcss-markdown",
},
],
ignoreFiles: ["**/_reset.scss", "**/index.html", "**/LICENSE"],
rules: {
"custom-property-pattern": null,
"selector-class-pattern": null,
// Don't add empty lines between order groups.
"order/properties-order": [
propertiesOrder,
{
severity: "warning",
unspecified: "bottomAlphabetical",
},
],
//? for tailwind
// "scss/at-rule-no-unknown": [
// true,
// {
// ignoreAtRules: ["tailwind"],
// },
// ],
// activate no-low-performance-animation
"plugin/no-low-performance-animation-properties": true,
},
// lower the security level for all rule
defaultSeverity: "warning",
// Automatically fix, where possible, problems reported by rules.
fix: true,
//Store the results of processed files so that Stylelint only operates on the changed ones (improve speed & performance).
cache: true,
};