@kununu/stylelint-config 1.0.5-beta.0 → 2.1.0-beta.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/README.md +21 -9
- package/index.js +72 -59
- package/package.json +7 -21
package/README.md
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
# @kununu/stylelint-config
|
|
2
2
|
|
|
3
|
-
> kununu
|
|
3
|
+
> kununu style linter configuration
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
These configurations are for [stylelint](https://stylelint.io/) linter.
|
|
6
6
|
|
|
7
7
|
## 📦 Installation
|
|
8
8
|
|
|
9
|
-
Add @kununu/stylelint-config npm package as dev dependency to your project:
|
|
9
|
+
Add @kununu/stylelint-config npm package as a dev dependency to your project:
|
|
10
|
+
|
|
10
11
|
```console
|
|
11
|
-
|
|
12
|
+
npm install @kununu/stylelint-config --save-dev
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
## 💻 Usage
|
|
@@ -23,14 +24,25 @@ Create a `.stylelintrc` file with the following configuration:
|
|
|
23
24
|
|
|
24
25
|
See [docs](https://stylelint.io/user-guide/configuration) to find more detailed information on stylelint configuration and usage.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
And add
|
|
28
|
+
|
|
29
|
+
```console
|
|
30
|
+
|
|
31
|
+
"lint": "stylelint '**/*.scss'",
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
to your npm file.
|
|
35
|
+
|
|
36
|
+
## ⚡️ Editor Plugins
|
|
27
37
|
|
|
28
|
-
At kununu, [@kununu/
|
|
38
|
+
At kununu, [@kununu/stylelint-config](https://www.npmjs.com/package/@kununu/stylelint-config) linter runs on every commit, but finding a lint error after push can be frustrating and a waste time. In order to avoid it, editor plugins are available to warn you and validate your code.
|
|
29
39
|
|
|
30
40
|
There's what we use and recommend:
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
### Atom
|
|
43
|
+
|
|
33
44
|
- [linter-stylelint](https://atom.io/packages/linter-stylelint)
|
|
34
45
|
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
### Visual Code Studio
|
|
47
|
+
|
|
48
|
+
- [stylelint](https://marketplace.visualstudio.com/items?itemName=hex-ci.stylelint-plus)
|
package/index.js
CHANGED
|
@@ -1,70 +1,83 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
extends: [
|
|
3
|
+
'stylelint-config-standard-scss',
|
|
4
4
|
],
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
plugins: [
|
|
6
|
+
'stylelint-scss',
|
|
7
|
+
'stylelint-order',
|
|
8
|
+
'stylelint-config-rational-order/plugin',
|
|
9
9
|
],
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"rule-empty-line-before": ["always", {"except": ["after-single-line-comment", "first-nested"]}],
|
|
33
|
-
"selector-attribute-brackets-space-inside": "never",
|
|
34
|
-
"selector-attribute-operator-space-after": "never",
|
|
35
|
-
"selector-attribute-operator-space-before": "never",
|
|
36
|
-
"selector-attribute-quotes": "always",
|
|
37
|
-
"selector-combinator-space-after": "always",
|
|
38
|
-
"selector-max-id": [0, {"severity": "warning"}],
|
|
39
|
-
"selector-no-vendor-prefix": true,
|
|
40
|
-
"selector-pseudo-class-no-unknown": [true, {
|
|
41
|
-
"ignorePseudoClasses": ["global", "export", "import", "local"]
|
|
42
|
-
}],
|
|
43
|
-
"selector-pseudo-class-parentheses-space-inside": "never",
|
|
44
|
-
"selector-pseudo-element-colon-notation": "single",
|
|
45
|
-
"string-quotes": "single",
|
|
46
|
-
"value-no-vendor-prefix": true,
|
|
47
|
-
"scss/at-rule-no-unknown": true,
|
|
48
|
-
"order/order": [
|
|
10
|
+
rules: {
|
|
11
|
+
'at-rule-no-unknown': null,
|
|
12
|
+
'at-rule-no-vendor-prefix': true,
|
|
13
|
+
'color-hex-case': 'lower',
|
|
14
|
+
'color-hex-length': 'long',
|
|
15
|
+
'color-named': 'never',
|
|
16
|
+
'comment-empty-line-before': ['always', {except: ['first-nested'], ignore: ['after-comment', 'stylelint-commands']}],
|
|
17
|
+
'comment-whitespace-inside': 'always',
|
|
18
|
+
'declaration-block-trailing-semicolon': 'always',
|
|
19
|
+
'declaration-colon-space-after': 'always',
|
|
20
|
+
'declaration-colon-space-before': 'never',
|
|
21
|
+
'function-url-quotes': 'always',
|
|
22
|
+
indentation: 2,
|
|
23
|
+
'media-feature-colon-space-after': 'always',
|
|
24
|
+
'media-feature-colon-space-before': 'never',
|
|
25
|
+
'media-feature-name-no-vendor-prefix': true,
|
|
26
|
+
'media-feature-parentheses-space-inside': 'never',
|
|
27
|
+
'media-feature-range-operator-space-after': 'always',
|
|
28
|
+
'media-feature-range-operator-space-before': 'always',
|
|
29
|
+
'no-duplicate-selectors': true,
|
|
30
|
+
'number-leading-zero': 'never',
|
|
31
|
+
'order/order': [
|
|
49
32
|
{
|
|
50
|
-
|
|
51
|
-
|
|
33
|
+
name: 'extend',
|
|
34
|
+
type: 'at-rule',
|
|
52
35
|
},
|
|
53
36
|
{
|
|
54
|
-
|
|
55
|
-
|
|
37
|
+
name: 'include',
|
|
38
|
+
type: 'at-rule',
|
|
56
39
|
},
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
'declarations',
|
|
41
|
+
'rules',
|
|
59
42
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
43
|
+
name: 'media',
|
|
44
|
+
type: 'at-rule',
|
|
45
|
+
},
|
|
63
46
|
],
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
47
|
+
'order/properties-order': [],
|
|
48
|
+
'plugin/rational-order': [true, {
|
|
49
|
+
'border-in-box-model': false,
|
|
50
|
+
'empty-line-between-groups': false,
|
|
51
|
+
}],
|
|
52
|
+
'property-no-unknown': [
|
|
53
|
+
true,
|
|
54
|
+
{
|
|
55
|
+
ignoreSelectors: [':export'],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
'property-no-vendor-prefix': true,
|
|
59
|
+
'rule-empty-line-before': ['always', {except: ['after-single-line-comment', 'first-nested']}],
|
|
60
|
+
'scss/at-rule-no-unknown': true,
|
|
61
|
+
'selector-attribute-brackets-space-inside': 'never',
|
|
62
|
+
'selector-attribute-operator-space-after': 'never',
|
|
63
|
+
'selector-attribute-operator-space-before': 'never',
|
|
64
|
+
'selector-attribute-quotes': 'always',
|
|
65
|
+
'selector-combinator-space-after': 'always',
|
|
66
|
+
'selector-max-id': [0, {severity: 'warning'}],
|
|
67
|
+
'selector-no-vendor-prefix': true,
|
|
68
|
+
'selector-pseudo-class-no-unknown': [true, {
|
|
69
|
+
ignorePseudoClasses: ['global', 'export', 'import', 'local'],
|
|
70
|
+
}],
|
|
71
|
+
'selector-pseudo-class-parentheses-space-inside': 'never',
|
|
72
|
+
'selector-pseudo-element-colon-notation': 'single',
|
|
73
|
+
'string-quotes': 'single',
|
|
74
|
+
'value-no-vendor-prefix': true,
|
|
75
|
+
'selector-class-pattern': '^[a-z][a-zA-Z0-9]+$',
|
|
76
|
+
'color-function-notation': 'legacy',
|
|
77
|
+
'alpha-value-notation': 'number',
|
|
78
|
+
'max-line-length': [120, {
|
|
79
|
+
'ignore': ['non-comments'],
|
|
80
|
+
'ignorePattern': '/box-shadow:/'
|
|
68
81
|
}]
|
|
69
|
-
}
|
|
82
|
+
},
|
|
70
83
|
};
|
package/package.json
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kununu/stylelint-config",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "2.1.0-beta.1",
|
|
4
4
|
"description": "kununu's stylelint config",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"publish": "npm publish",
|
|
8
|
-
"publish:beta": "npm publish --tag=beta",
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/kununu/theme.git"
|
|
14
|
-
},
|
|
5
|
+
"author": "kununu",
|
|
6
|
+
"license": "ISC",
|
|
15
7
|
"keywords": [
|
|
16
8
|
"stylelint",
|
|
17
9
|
"stylelintconfig",
|
|
@@ -21,17 +13,11 @@
|
|
|
21
13
|
"scss",
|
|
22
14
|
"sass"
|
|
23
15
|
],
|
|
24
|
-
"author": "kununu",
|
|
25
|
-
"license": "ISC",
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/kununu/theme/issues"
|
|
28
|
-
},
|
|
29
|
-
"homepage": "https://github.com/kununu/theme#readme",
|
|
30
16
|
"dependencies": {
|
|
31
|
-
"stylelint": "
|
|
17
|
+
"stylelint": "14.1.0",
|
|
32
18
|
"stylelint-config-rational-order": "0.1.2",
|
|
33
|
-
"stylelint-config-standard": "
|
|
34
|
-
"stylelint-order": "
|
|
35
|
-
"stylelint-scss": "
|
|
19
|
+
"stylelint-config-standard-scss": "3.0.0",
|
|
20
|
+
"stylelint-order": "5.0.0",
|
|
21
|
+
"stylelint-scss": "4.1.0"
|
|
36
22
|
}
|
|
37
23
|
}
|