@wistia/eslint-config 0.41.2 → 0.43.0
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 +20 -34
- package/configs/eslint/cypress.cjs +0 -9
- package/configs/stylelint/default.cjs +0 -8
- package/configs/stylelint/scss.cjs +0 -9
- package/configs/stylelint/styled-components.cjs +0 -15
- package/rules/eslint/cypress.cjs +0 -40
- package/rules/stylelint/css.cjs +0 -172
- package/rules/stylelint/scss.cjs +0 -80
- package/rules/stylelint/styled-components.cjs +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Wistia's ESLint configurations",
|
|
5
5
|
"packageManager": "yarn@4.9.2",
|
|
6
6
|
"main": "react.js",
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"exports": {
|
|
12
12
|
"./package.json": "./package.json",
|
|
13
13
|
".": "./configs/eslint/default.cjs",
|
|
14
|
-
"./cypress": "./configs/eslint/cypress.cjs",
|
|
15
14
|
"./functional-programming": "./configs/eslint/functional-programming.cjs",
|
|
16
15
|
"./jest": "./configs/eslint/jest.cjs",
|
|
17
16
|
"./node": "./configs/eslint/node.cjs",
|
|
@@ -21,9 +20,6 @@
|
|
|
21
20
|
"./storybook": "./configs/eslint/storybook.cjs",
|
|
22
21
|
"./strict": "./configs/eslint/strict.cjs",
|
|
23
22
|
"./styled-components": "./configs/eslint/styled-components.cjs",
|
|
24
|
-
"./stylelint": "./configs/stylelint/default.cjs",
|
|
25
|
-
"./stylelint/scss": "./configs/stylelint/scss.cjs",
|
|
26
|
-
"./stylelint/styled-components": "./configs/stylelint/styled-components.cjs",
|
|
27
23
|
"./testing-library": "./configs/eslint/testing-library.cjs",
|
|
28
24
|
"./typescript": "./configs/eslint/typescript.cjs",
|
|
29
25
|
"./typescript-react": "./configs/eslint/typescript-react.cjs",
|
|
@@ -37,8 +33,7 @@
|
|
|
37
33
|
"prepare": "husky",
|
|
38
34
|
"release": "changeset publish",
|
|
39
35
|
"test": "vitest run",
|
|
40
|
-
"test:export": "check-export-map"
|
|
41
|
-
"test:stylelint": "stylelint --print-config ./test/index.mjs"
|
|
36
|
+
"test:export": "check-export-map"
|
|
42
37
|
},
|
|
43
38
|
"engines": {
|
|
44
39
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
@@ -54,60 +49,51 @@
|
|
|
54
49
|
"author": "Wistia Engineering",
|
|
55
50
|
"license": "UNLICENSED",
|
|
56
51
|
"dependencies": {
|
|
57
|
-
"@babel/core": "^7.
|
|
58
|
-
"@babel/eslint-parser": "^7.
|
|
52
|
+
"@babel/core": "^7.28.4",
|
|
53
|
+
"@babel/eslint-parser": "^7.28.4",
|
|
59
54
|
"@babel/preset-react": "^7.27.1",
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@typescript-eslint/
|
|
63
|
-
"@typescript-eslint/parser": "^8.34.1",
|
|
55
|
+
"@rushstack/eslint-patch": "^1.14.0",
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
57
|
+
"@typescript-eslint/parser": "^8.46.2",
|
|
64
58
|
"confusing-browser-globals": "^1.0.11",
|
|
65
59
|
"eslint": "^8.57.1",
|
|
66
|
-
"eslint-config-prettier": "^10.1.
|
|
67
|
-
"eslint-import-resolver-typescript": "^4.4.
|
|
68
|
-
"eslint-plugin-cypress": "^3.6.0",
|
|
60
|
+
"eslint-config-prettier": "^10.1.8",
|
|
61
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
69
62
|
"eslint-plugin-filenames": "^1.3.2",
|
|
70
63
|
"eslint-plugin-fp": "^2.3.0",
|
|
71
|
-
"eslint-plugin-import": "^2.
|
|
64
|
+
"eslint-plugin-import": "^2.32.0",
|
|
72
65
|
"eslint-plugin-jest": "^28.14.0",
|
|
73
66
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
74
67
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
75
68
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
76
|
-
"eslint-plugin-n": "^17.
|
|
69
|
+
"eslint-plugin-n": "^17.23.1",
|
|
77
70
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
78
71
|
"eslint-plugin-no-snapshot-testing": "^1.0.61",
|
|
79
72
|
"eslint-plugin-no-typeof-window-undefined": "^0.0.2",
|
|
80
73
|
"eslint-plugin-observers": "^1.0.1",
|
|
81
|
-
"eslint-plugin-prettier": "^5.5.
|
|
74
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
82
75
|
"eslint-plugin-promise": "^7.2.1",
|
|
83
76
|
"eslint-plugin-react": "^7.37.5",
|
|
84
77
|
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
85
|
-
"eslint-plugin-react-hooks": "^
|
|
78
|
+
"eslint-plugin-react-hooks": "^7.0.0",
|
|
86
79
|
"eslint-plugin-react-hooks-ssr": "^0.1.5",
|
|
87
80
|
"eslint-plugin-sonarjs": "^1.0.4",
|
|
88
81
|
"eslint-plugin-ssr-friendly": "^1.3.0",
|
|
89
82
|
"eslint-plugin-storybook": "^0.12.0",
|
|
90
83
|
"eslint-plugin-styled-components-a11y": "^2.2.1",
|
|
91
|
-
"eslint-plugin-testing-library": "^7.
|
|
84
|
+
"eslint-plugin-testing-library": "^7.13.3",
|
|
92
85
|
"eslint-plugin-vitest": "^0.5.4",
|
|
93
86
|
"eslint-plugin-vitest-globals": "^1.5.0",
|
|
94
|
-
"
|
|
95
|
-
"postcss-scss": "^4.0.9",
|
|
96
|
-
"postcss-styled-syntax": "^0.7.1",
|
|
97
|
-
"prettier": "^3.5.3",
|
|
98
|
-
"stylelint": "^16.21.0",
|
|
99
|
-
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
|
100
|
-
"stylelint-prettier": "^5.0.3",
|
|
101
|
-
"stylelint-scss": "^6.12.1"
|
|
87
|
+
"prettier": "^3.6.2"
|
|
102
88
|
},
|
|
103
89
|
"devDependencies": {
|
|
104
90
|
"@changesets/changelog-github": "^0.5.1",
|
|
105
|
-
"@changesets/cli": "^2.29.
|
|
106
|
-
"@commitlint/cli": "^
|
|
107
|
-
"@commitlint/config-conventional": "^
|
|
91
|
+
"@changesets/cli": "^2.29.7",
|
|
92
|
+
"@commitlint/cli": "^20.1.0",
|
|
93
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
108
94
|
"check-export-map": "^1.3.1",
|
|
109
95
|
"husky": "^9.1.7",
|
|
110
|
-
"typescript": "^5.
|
|
111
|
-
"vitest": "^
|
|
96
|
+
"typescript": "^5.9.3",
|
|
97
|
+
"vitest": "^4.0.1"
|
|
112
98
|
}
|
|
113
99
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
plugins: ['stylelint-prettier', 'stylelint-scss', '@jantimon/stylelint-enforce-pseudo-ampersand'],
|
|
3
|
-
extends: ['../../rules/stylelint/css.cjs', '../../rules/stylelint/scss.cjs'].map(require.resolve),
|
|
4
|
-
customSyntax: require('postcss-scss'),
|
|
5
|
-
rules: {
|
|
6
|
-
// prettier configuration
|
|
7
|
-
'prettier/prettier': true,
|
|
8
|
-
},
|
|
9
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
plugins: [
|
|
3
|
-
'stylelint-prettier',
|
|
4
|
-
'stylelint-declaration-block-no-ignored-properties',
|
|
5
|
-
'@jantimon/stylelint-enforce-pseudo-ampersand',
|
|
6
|
-
],
|
|
7
|
-
extends: ['../../rules/stylelint/css.cjs', '../../rules/stylelint/styled-components.cjs'].map(
|
|
8
|
-
require.resolve,
|
|
9
|
-
),
|
|
10
|
-
customSyntax: require('postcss-styled-syntax'),
|
|
11
|
-
rules: {
|
|
12
|
-
// prettier configuration
|
|
13
|
-
'prettier/prettier': true,
|
|
14
|
-
},
|
|
15
|
-
};
|
package/rules/eslint/cypress.cjs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// only add cypress rules
|
|
2
|
-
// see: https://github.com/cypress-io/eslint-plugin-cypress#rules
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
plugins: ['eslint-plugin-no-only-tests', 'eslint-plugin-cypress'],
|
|
6
|
-
|
|
7
|
-
rules: {
|
|
8
|
-
// Prevent focused tests (.only)
|
|
9
|
-
// https://github.com/levibuzolic/eslint-plugin-no-only-tests#usage
|
|
10
|
-
'no-only-tests/no-only-tests': 'error',
|
|
11
|
-
|
|
12
|
-
// Prevent assigning return values of cy calls
|
|
13
|
-
// https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-assigning-return-values.md
|
|
14
|
-
'cypress/no-assigning-return-values': 'error',
|
|
15
|
-
|
|
16
|
-
// Prevent waiting for arbitrary time periods
|
|
17
|
-
// https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-unnecessary-waiting.md
|
|
18
|
-
'cypress/no-unnecessary-waiting': 'error',
|
|
19
|
-
|
|
20
|
-
// Prevent using async/await in Cypress test case
|
|
21
|
-
// https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-async-tests.md
|
|
22
|
-
'cypress/no-async-tests': 'error',
|
|
23
|
-
|
|
24
|
-
// Disallow using `force: true` with action commands
|
|
25
|
-
// https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-force.md
|
|
26
|
-
'cypress/no-force': 'error',
|
|
27
|
-
|
|
28
|
-
// Ensure screenshots are preceded by an assertion
|
|
29
|
-
// https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/assertion-before-screenshot.md
|
|
30
|
-
'cypress/assertion-before-screenshot': 'error',
|
|
31
|
-
|
|
32
|
-
// Only allow data-\* attribute selectors (require-data-selectors)
|
|
33
|
-
// https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/require-data-selectors.md
|
|
34
|
-
'cypress/require-data-selectors': 'error',
|
|
35
|
-
|
|
36
|
-
// Disallow `cy.pause()` parent command
|
|
37
|
-
// https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-pause.md
|
|
38
|
-
'cypress/no-pause': 'error',
|
|
39
|
-
},
|
|
40
|
-
};
|
package/rules/stylelint/css.cjs
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
// only add rules pertaining to css
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
rules: {
|
|
5
|
-
// https://github.com/stylelint/stylelint-config-recommended/blob/main/index.js#L5
|
|
6
|
-
'annotation-no-unknown': true,
|
|
7
|
-
'at-rule-no-unknown': true,
|
|
8
|
-
'block-no-empty': true,
|
|
9
|
-
'color-no-invalid-hex': true,
|
|
10
|
-
'comment-no-empty': true,
|
|
11
|
-
'custom-property-no-missing-var-function': true,
|
|
12
|
-
'declaration-block-no-duplicate-custom-properties': true,
|
|
13
|
-
'declaration-block-no-duplicate-properties': [
|
|
14
|
-
true,
|
|
15
|
-
{
|
|
16
|
-
ignore: ['consecutive-duplicates-with-different-values'],
|
|
17
|
-
},
|
|
18
|
-
],
|
|
19
|
-
'declaration-block-no-shorthand-property-overrides': true,
|
|
20
|
-
'font-family-no-duplicate-names': true,
|
|
21
|
-
'font-family-no-missing-generic-family-keyword': true,
|
|
22
|
-
'function-calc-no-unspaced-operator': true,
|
|
23
|
-
'function-linear-gradient-no-nonstandard-direction': true,
|
|
24
|
-
'function-no-unknown': true,
|
|
25
|
-
'keyframe-block-no-duplicate-selectors': true,
|
|
26
|
-
'keyframe-declaration-no-important': true,
|
|
27
|
-
'media-feature-name-no-unknown': true,
|
|
28
|
-
'named-grid-areas-no-invalid': true,
|
|
29
|
-
'no-descending-specificity': true,
|
|
30
|
-
'no-duplicate-at-import-rules': true,
|
|
31
|
-
'no-duplicate-selectors': true,
|
|
32
|
-
'no-empty-source': true,
|
|
33
|
-
'no-invalid-double-slash-comments': true,
|
|
34
|
-
'no-invalid-position-at-import-rule': true,
|
|
35
|
-
'no-irregular-whitespace': true,
|
|
36
|
-
'property-no-unknown': true,
|
|
37
|
-
'selector-anb-no-unmatchable': true,
|
|
38
|
-
'selector-pseudo-class-no-unknown': true,
|
|
39
|
-
'selector-pseudo-element-no-unknown': true,
|
|
40
|
-
'selector-type-no-unknown': [
|
|
41
|
-
true,
|
|
42
|
-
{
|
|
43
|
-
ignore: ['custom-elements'],
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
'string-no-newline': true,
|
|
47
|
-
'unit-no-unknown': true,
|
|
48
|
-
|
|
49
|
-
// https://github.com/stylelint/stylelint-config-standard/blob/main/index.js#L5
|
|
50
|
-
'alpha-value-notation': [
|
|
51
|
-
'percentage',
|
|
52
|
-
{
|
|
53
|
-
exceptProperties: [
|
|
54
|
-
'opacity',
|
|
55
|
-
'fill-opacity',
|
|
56
|
-
'flood-opacity',
|
|
57
|
-
'stop-opacity',
|
|
58
|
-
'stroke-opacity',
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
'at-rule-empty-line-before': [
|
|
63
|
-
'always',
|
|
64
|
-
{
|
|
65
|
-
except: ['blockless-after-same-name-blockless', 'first-nested'],
|
|
66
|
-
ignore: ['after-comment'],
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
'property-no-vendor-prefix': [
|
|
70
|
-
true,
|
|
71
|
-
{
|
|
72
|
-
/* non-standard but supported across mobile browsers */
|
|
73
|
-
ignoreProperties: [/appearance/, /text-size-adjust/],
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
'color-function-notation': 'modern',
|
|
77
|
-
'color-hex-length': 'long',
|
|
78
|
-
'comment-empty-line-before': [
|
|
79
|
-
'always',
|
|
80
|
-
{
|
|
81
|
-
except: ['first-nested'],
|
|
82
|
-
ignore: ['stylelint-commands'],
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
'comment-whitespace-inside': 'always',
|
|
86
|
-
'custom-property-empty-line-before': [
|
|
87
|
-
'always',
|
|
88
|
-
{
|
|
89
|
-
except: ['after-custom-property', 'first-nested'],
|
|
90
|
-
ignore: ['after-comment', 'inside-single-line-block'],
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
'custom-media-pattern': [
|
|
94
|
-
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
|
95
|
-
{
|
|
96
|
-
message: (name) => `Expected custom media query name "${name}" to be kebab-case`,
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
'custom-property-pattern': [
|
|
100
|
-
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
|
101
|
-
{
|
|
102
|
-
message: (name) => `Expected custom property name "${name}" to be kebab-case`,
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
'declaration-block-no-redundant-longhand-properties': true,
|
|
106
|
-
'declaration-empty-line-before': [
|
|
107
|
-
'always',
|
|
108
|
-
{
|
|
109
|
-
except: ['after-declaration', 'first-nested'],
|
|
110
|
-
ignore: ['after-comment', 'inside-single-line-block'],
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
'font-family-name-quotes': 'always-where-recommended',
|
|
114
|
-
'function-name-case': 'lower',
|
|
115
|
-
'function-url-quotes': 'always',
|
|
116
|
-
'hue-degree-notation': 'angle',
|
|
117
|
-
'import-notation': 'url',
|
|
118
|
-
'keyframe-selector-notation': 'percentage-unless-within-keyword-only-block',
|
|
119
|
-
'keyframes-name-pattern': [
|
|
120
|
-
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
|
121
|
-
{
|
|
122
|
-
message: (name) => `Expected keyframe name "${name}" to be kebab-case`,
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
'length-zero-no-unit': [
|
|
126
|
-
true,
|
|
127
|
-
{
|
|
128
|
-
ignore: ['custom-properties'],
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
'media-feature-name-no-vendor-prefix': true,
|
|
132
|
-
'media-feature-range-notation': 'prefix',
|
|
133
|
-
'number-max-precision': 4,
|
|
134
|
-
'property-no-vendor-prefix': true,
|
|
135
|
-
'rule-empty-line-before': [
|
|
136
|
-
'always-multi-line',
|
|
137
|
-
{
|
|
138
|
-
except: ['first-nested'],
|
|
139
|
-
ignore: ['after-comment'],
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
'selector-attribute-quotes': 'always',
|
|
143
|
-
'selector-class-pattern': [
|
|
144
|
-
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
|
145
|
-
{
|
|
146
|
-
message: (selector) => `Expected class selector "${selector}" to be kebab-case`,
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
|
-
'selector-id-pattern': [
|
|
150
|
-
'^([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
|
151
|
-
{
|
|
152
|
-
message: (selector) => `Expected id selector "${selector}" to be kebab-case`,
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
'selector-no-vendor-prefix': true,
|
|
156
|
-
'selector-not-notation': 'complex',
|
|
157
|
-
'selector-pseudo-element-colon-notation': 'double',
|
|
158
|
-
'selector-type-case': 'lower',
|
|
159
|
-
'shorthand-property-no-redundant-values': true,
|
|
160
|
-
'value-keyword-case': 'lower',
|
|
161
|
-
'value-no-vendor-prefix': [
|
|
162
|
-
true,
|
|
163
|
-
{
|
|
164
|
-
// `-webkit-box` is allowed as standard. See https://www.w3.org/TR/css-overflow-3/#webkit-line-clamp
|
|
165
|
-
ignoreValues: ['box', 'inline-box'],
|
|
166
|
-
},
|
|
167
|
-
],
|
|
168
|
-
|
|
169
|
-
// https://github.com/jantimon/stylelint-enforce-pseudo-ampersand?tab=readme-ov-file#usage
|
|
170
|
-
'jantimon/stylelint-enforce-pseudo-ampersand': 'always',
|
|
171
|
-
},
|
|
172
|
-
};
|
package/rules/stylelint/scss.cjs
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// only add rules pertaining to scss
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
rules: {
|
|
5
|
-
// adjust/disable some rules from css that cause issues
|
|
6
|
-
'at-rule-no-unknown': null,
|
|
7
|
-
'at-rule-empty-line-before': [
|
|
8
|
-
'always',
|
|
9
|
-
{
|
|
10
|
-
except: ['blockless-after-blockless', 'first-nested'],
|
|
11
|
-
ignore: ['after-comment'],
|
|
12
|
-
ignoreAtRules: ['else'],
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
'function-no-unknown': null,
|
|
16
|
-
'import-notation': 'string',
|
|
17
|
-
'no-invalid-position-at-import-rule': [
|
|
18
|
-
true,
|
|
19
|
-
{
|
|
20
|
-
ignoreAtRules: ['use', 'forward'],
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
|
|
24
|
-
// unfortunately these conflict with sass functions; hopefully someday we will be able to enable
|
|
25
|
-
'color-function-notation': null,
|
|
26
|
-
'alpha-value-notation': null,
|
|
27
|
-
|
|
28
|
-
'scss/at-else-closing-brace-newline-after': 'always-last-in-chain',
|
|
29
|
-
'scss/at-else-closing-brace-space-after': 'always-intermediate',
|
|
30
|
-
'scss/at-else-empty-line-before': 'never',
|
|
31
|
-
'scss/at-else-if-parentheses-space-before': 'always',
|
|
32
|
-
'scss/at-function-parentheses-space-before': 'never',
|
|
33
|
-
'scss/at-function-pattern': [
|
|
34
|
-
'^(-?[a-z][a-z0-9]*)(-[a-z0-9]+)*$',
|
|
35
|
-
{
|
|
36
|
-
message: 'Expected function name to be kebab-case',
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
'scss/at-if-closing-brace-newline-after': 'always-last-in-chain',
|
|
40
|
-
'scss/at-if-closing-brace-space-after': 'always-intermediate',
|
|
41
|
-
'scss/at-mixin-argumentless-call-parentheses': 'never',
|
|
42
|
-
'scss/at-mixin-parentheses-space-before': 'never',
|
|
43
|
-
'scss/at-rule-conditional-no-parentheses': true,
|
|
44
|
-
'scss/dollar-variable-colon-space-after': 'always',
|
|
45
|
-
'scss/dollar-variable-colon-space-before': 'never',
|
|
46
|
-
'scss/dollar-variable-empty-line-before': [
|
|
47
|
-
'always',
|
|
48
|
-
{
|
|
49
|
-
except: ['after-dollar-variable', 'first-nested'],
|
|
50
|
-
ignore: ['after-comment', 'inside-single-line-block'],
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
'scss/double-slash-comment-empty-line-before': [
|
|
54
|
-
'always',
|
|
55
|
-
{
|
|
56
|
-
except: ['first-nested'],
|
|
57
|
-
ignore: ['between-comments', 'stylelint-commands'],
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
'scss/at-extend-no-missing-placeholder': null,
|
|
61
|
-
'scss/at-if-no-null': true,
|
|
62
|
-
'scss/at-import-no-partial-leading-underscore': true,
|
|
63
|
-
'scss/at-import-partial-extension': 'never',
|
|
64
|
-
'scss/at-mixin-pattern': null,
|
|
65
|
-
'scss/at-rule-no-unknown': true,
|
|
66
|
-
'scss/comment-no-empty': true,
|
|
67
|
-
'scss/declaration-nested-properties-no-divided-groups': true,
|
|
68
|
-
'scss/dollar-variable-no-missing-interpolation': true,
|
|
69
|
-
'scss/dollar-variable-pattern': null,
|
|
70
|
-
'scss/double-slash-comment-whitespace-inside': 'always',
|
|
71
|
-
'scss/function-quote-no-quoted-strings-inside': true,
|
|
72
|
-
'scss/function-unquote-no-unquoted-strings-inside': true,
|
|
73
|
-
'scss/no-duplicate-mixins': true,
|
|
74
|
-
'scss/no-global-function-names': null,
|
|
75
|
-
'scss/operator-no-newline-after': true,
|
|
76
|
-
'scss/operator-no-newline-before': true,
|
|
77
|
-
'scss/operator-no-unspaced': true,
|
|
78
|
-
'scss/percent-placeholder-pattern': null,
|
|
79
|
-
},
|
|
80
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// only add rules pertaining to styled-components
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
rules: {
|
|
5
|
-
// unfortunately this causes false positives
|
|
6
|
-
'block-no-empty': null,
|
|
7
|
-
// in css-in-js when variables are being passed around, this rule
|
|
8
|
-
// often leads to less readable code, even though it is more compact
|
|
9
|
-
'declaration-block-no-redundant-longhand-properties': null,
|
|
10
|
-
// this appears to conflict with styled-components keyframes method
|
|
11
|
-
'keyframes-name-pattern': null,
|
|
12
|
-
// without this pretty much every file will throw an error¯\_(ツ)_/¯
|
|
13
|
-
'no-empty-source': null,
|
|
14
|
-
// disallow property values that are ignored due to another property value in the same rule
|
|
15
|
-
'plugin/declaration-block-no-ignored-properties': true,
|
|
16
|
-
// prevent snake case from being used for class/id selectors but be otherwise flexible
|
|
17
|
-
'selector-class-pattern': '^[a-zA-Z0-9-]+(-[a-zA-Z0-9]+)*$',
|
|
18
|
-
'selector-id-pattern': '^[a-zA-Z0-9-]+(-[a-zA-Z0-9]+)*$',
|
|
19
|
-
},
|
|
20
|
-
};
|