stylelint-config-crisp 1.0.0 → 1.0.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/README.md +55 -0
- package/index.js +35 -18
- package/package.json +2 -3
package/README.md
CHANGED
|
@@ -15,6 +15,61 @@ Just extend this configuration in your Stylelint config object:
|
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
## Documentation
|
|
19
|
+
|
|
20
|
+
This is a list of configured syntaxes, plugins and rules used by Stylelint Config Crisp, and what they do.
|
|
21
|
+
|
|
22
|
+
### Custom syntaxes
|
|
23
|
+
- [postcss-html](https://github.com/ota-meshi/postcss-html): allows to parse `<style>` tags from Vue files
|
|
24
|
+
|
|
25
|
+
### Configurations
|
|
26
|
+
- [@stylistic/stylelint-config](https://github.com/stylelint-stylistic/stylelint-config): A backport of stylistic rules that were deprecated in [Stylelint 15.0.0](https://github.com/stylelint/stylelint/blob/15.0.0/docs/migration-guide/to-15.md)
|
|
27
|
+
- [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss): Standard rules specific to SCSS syntax
|
|
28
|
+
|
|
29
|
+
### Plugins
|
|
30
|
+
- [stylelint-order](https://github.com/hudochenkov/stylelint-order): Order-related linting rules
|
|
31
|
+
|
|
32
|
+
### Rules
|
|
33
|
+
|
|
34
|
+
#### General rules
|
|
35
|
+
- [alpha-value-notation](https://stylelint.io/user-guide/rules/alpha-value-notation/): Alpha-values must use the number notation (instead of the percentage notation)
|
|
36
|
+
- [block-no-empty](https://stylelint.io/user-guide/rules/block-no-empty/): Disallows empty blocks
|
|
37
|
+
- [color-function-notation](https://stylelint.io/user-guide/rules/color-function-notation/): Color functions must use legacy notation (`rgba(12, 122, 231, 0.2)` instead of `rgb(12 122 231 / 0.2)`)
|
|
38
|
+
- [color-hex-length](https://stylelint.io/user-guide/rules/color-hex-length/): Hex colors must use long notation
|
|
39
|
+
- [color-no-invalid-hex](https://stylelint.io/user-guide/rules/color-no-invalid-hex/): Disallows invalid hex colors
|
|
40
|
+
- [declaration-block-no-redundant-longhand-properties](https://stylelint.io/user-guide/rules/declaration-block-no-redundant-longhand-properties/): Disallows redundant longhand properties
|
|
41
|
+
* `inset` shorthand is ignored (prefer using the longhand properties `top`, `right`, `bottom` and `left` altogether)
|
|
42
|
+
* `overflow` shorthand is ignored (prefer using the longhand properties `overflow-x` and `overflow-y` altogether)
|
|
43
|
+
- [declaration-block-single-line-max-declarations](https://stylelint.io/user-guide/rules/declaration-block-single-line-max-declarations/): Allows only 1 declaration per line
|
|
44
|
+
- [declaration-property-value-disallowed-list](https://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list/): A list of disallowed property and value pairs within declaration
|
|
45
|
+
* `^border: none` is disallowed (prefer `0`, for consistency)
|
|
46
|
+
- [number-max-precision](https://stylelint.io/user-guide/rules/number-max-precision/): Allows a maximum of 5 decimal places in numbers
|
|
47
|
+
- [selector-class-pattern](https://stylelint.io/user-guide/rules/selector-class-pattern/): Rule is **disabled** as it conflicts with our BEM notation in class selectors
|
|
48
|
+
- [selector-pseudo-class-no-unknown](https://stylelint.io/user-guide/rules/selector-pseudo-class-no-unknown/): Disallows unknown pseudo-class selectors
|
|
49
|
+
- [selector-pseudo-element-colon-notation](https://stylelint.io/user-guide/rules/selector-pseudo-element-colon-notation/): Pseudo-elements must use the single colon notation
|
|
50
|
+
|
|
51
|
+
#### SCSS rules
|
|
52
|
+
- [scss/at-rule-conditional-no-parentheses](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-rule-conditional-no-parentheses): Rule is **disabled** to allow parentheses in conditional at-rules (if, elsif, while)
|
|
53
|
+
- [scss/dollar-variable-empty-line-before](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/dollar-variable-empty-line-before): Rule is **disabled** to allow empty lines between logical variable blocks
|
|
54
|
+
- [scss/no-global-function-names](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/no-global-function-names): Rule is **disabled** to keep using global function names, instead of the new built-in module system
|
|
55
|
+
- [scss/operator-no-newline-after](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/operator-no-newline-after): Rule is **disabled** to allow linebreaks after Sass operators
|
|
56
|
+
|
|
57
|
+
#### Stylistic rules
|
|
58
|
+
- [@stylistic/block-closing-brace-newline-after](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/block-closing-brace-newline-after): Requires a newline after the closing brace of blocks
|
|
59
|
+
* `if` and `else` at-rules are ignored
|
|
60
|
+
- [@stylistic/color-hex-case](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/color-hex-case): Enforces lowercase for hex colors
|
|
61
|
+
- [@stylistic/declaration-colon-newline-after](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/declaration-colon-newline-after): Rule is **disabled** to allow multi-line decleration without newline after the colon
|
|
62
|
+
- [@stylistic/indentation](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/indentation): Enforces 2-spaces indentation
|
|
63
|
+
* Indentation inside parentheses is ignored, as we increment the indentation for multi-line expressions
|
|
64
|
+
- [@stylistic/number-leading-zero](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/number-leading-zero): Requires a leading zero for fractional numbers less than 1
|
|
65
|
+
- [@stylistic/property-case](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/property-case): Enforces lowercase for properties
|
|
66
|
+
- [@stylistic/selector-pseudo-class-case](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/selector-pseudo-class-case): Enforces lowercase for pseudo-class selectors
|
|
67
|
+
- [@stylistic/selector-pseudo-element-case](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/selector-pseudo-element-case): Enforces lowercase for pseudo-element selectors
|
|
68
|
+
- [@stylistic/string-quotes](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/string-quotes): Enforces double quotes around strings
|
|
69
|
+
- [@stylistic/unit-case](https://github.com/stylelint-stylistic/stylelint-stylistic/tree/main/lib/rules/unit-case): Enforces lowercase for units
|
|
70
|
+
|
|
71
|
+
#### Order rules
|
|
72
|
+
- [order/order](https://github.com/hudochenkov/stylelint-order/tree/master/rules/order): Enforces the order of content within declaration blocks: dollar variables, then declarations, then nested rules
|
|
18
73
|
|
|
19
74
|
## License
|
|
20
75
|
|
package/index.js
CHANGED
|
@@ -12,14 +12,16 @@ module.exports = {
|
|
|
12
12
|
],
|
|
13
13
|
|
|
14
14
|
plugins: [
|
|
15
|
-
"stylelint-
|
|
15
|
+
"stylelint-order"
|
|
16
16
|
],
|
|
17
17
|
|
|
18
18
|
rules: {
|
|
19
|
+
// General rules
|
|
20
|
+
"alpha-value-notation": "number",
|
|
21
|
+
"block-no-empty": true,
|
|
19
22
|
"color-function-notation": "legacy",
|
|
20
23
|
"color-hex-length": "long",
|
|
21
|
-
"
|
|
22
|
-
|
|
24
|
+
"color-no-invalid-hex": true,
|
|
23
25
|
"declaration-block-no-redundant-longhand-properties": [
|
|
24
26
|
true,
|
|
25
27
|
|
|
@@ -30,6 +32,16 @@ module.exports = {
|
|
|
30
32
|
]
|
|
31
33
|
}
|
|
32
34
|
],
|
|
35
|
+
"declaration-block-single-line-max-declarations": 1,
|
|
36
|
+
"declaration-property-value-disallowed-list": {
|
|
37
|
+
"border": ["none"],
|
|
38
|
+
"border-top": ["none"],
|
|
39
|
+
"border-right": ["none"],
|
|
40
|
+
"border-bottom": ["none"],
|
|
41
|
+
"border-left": ["none"]
|
|
42
|
+
}
|
|
43
|
+
"number-max-precision": 5,
|
|
44
|
+
"selector-class-pattern": null,
|
|
33
45
|
"selector-pseudo-class-no-unknown": [
|
|
34
46
|
true,
|
|
35
47
|
|
|
@@ -39,25 +51,15 @@ module.exports = {
|
|
|
39
51
|
]
|
|
40
52
|
}
|
|
41
53
|
],
|
|
42
|
-
|
|
43
|
-
"alpha-value-notation": "number",
|
|
44
|
-
"number-max-precision": 5,
|
|
45
54
|
"selector-pseudo-element-colon-notation": "single",
|
|
46
55
|
|
|
47
|
-
|
|
56
|
+
// SCSS rules
|
|
57
|
+
"scss/at-rule-conditional-no-parentheses": null,
|
|
48
58
|
"scss/dollar-variable-empty-line-before": null,
|
|
49
59
|
"scss/no-global-function-names": null,
|
|
50
|
-
"scss/
|
|
60
|
+
"scss/operator-no-newline-after": null,
|
|
51
61
|
|
|
52
|
-
|
|
53
|
-
"@stylistic/declaration-block-trailing-semicolon": "always",
|
|
54
|
-
"@stylistic/selector-pseudo-class-case": "lower",
|
|
55
|
-
"@stylistic/selector-pseudo-element-case": "lower",
|
|
56
|
-
"@stylistic/property-case": "lower",
|
|
57
|
-
"@stylistic/unit-case": "lower",
|
|
58
|
-
"@stylistic/color-hex-case": "lower",
|
|
59
|
-
"@stylistic/number-leading-zero": "always",
|
|
60
|
-
"@stylistic/string-quotes": "double",
|
|
62
|
+
// Stylistic rules
|
|
61
63
|
"@stylistic/block-closing-brace-newline-after": [
|
|
62
64
|
"always",
|
|
63
65
|
|
|
@@ -65,13 +67,28 @@ module.exports = {
|
|
|
65
67
|
"ignoreAtRules": ["if", "else"]
|
|
66
68
|
}
|
|
67
69
|
],
|
|
68
|
-
|
|
70
|
+
"@stylistic/color-hex-case": "lower",
|
|
71
|
+
"@stylistic/declaration-colon-newline-after": null,
|
|
72
|
+
"@stylistic/declaration-block-trailing-semicolon": "always",
|
|
69
73
|
"@stylistic/indentation": [
|
|
70
74
|
2,
|
|
71
75
|
|
|
72
76
|
{
|
|
73
77
|
"ignore": ["inside-parens"]
|
|
74
78
|
}
|
|
79
|
+
],
|
|
80
|
+
"@stylistic/number-leading-zero": "always",
|
|
81
|
+
"@stylistic/property-case": "lower",
|
|
82
|
+
"@stylistic/selector-pseudo-class-case": "lower",
|
|
83
|
+
"@stylistic/selector-pseudo-element-case": "lower",
|
|
84
|
+
"@stylistic/string-quotes": "double",
|
|
85
|
+
"@stylistic/unit-case": "lower",
|
|
86
|
+
|
|
87
|
+
// Order rules
|
|
88
|
+
"order/order": [
|
|
89
|
+
"dollar-variables",
|
|
90
|
+
"declarations",
|
|
91
|
+
"rules"
|
|
75
92
|
]
|
|
76
93
|
}
|
|
77
94
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stylelint-config-crisp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Custom Stylelint Rules for Crisp",
|
|
5
5
|
"author": "Crisp IM SAS",
|
|
6
6
|
"main": "index.js",
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@stylistic/stylelint-config": "1.0.1",
|
|
17
17
|
"postcss-html": "1.5.0",
|
|
18
|
-
"stylelint-config-standard": "35.0.0",
|
|
19
18
|
"stylelint-config-standard-scss": "12.0.0",
|
|
20
|
-
"stylelint-
|
|
19
|
+
"stylelint-order": "6.0.4"
|
|
21
20
|
},
|
|
22
21
|
"peerDependencies": {
|
|
23
22
|
"stylelint": "16.0.2"
|