@hs-web-team/eslint-config-node 4.0.0 → 4.0.2
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/.stylelintrc.json +0 -2
- package/browser.js +35 -35
- package/index.js +2 -2
- package/package.json +1 -1
package/.stylelintrc.json
CHANGED
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
}
|
|
12
12
|
],
|
|
13
13
|
"scss/dollar-variable-pattern": null,
|
|
14
|
-
"scss/at-import-no-partial-leading-underscore": null,
|
|
15
14
|
"selector-class-pattern": null,
|
|
16
15
|
"declaration-block-no-redundant-longhand-properties": null,
|
|
17
|
-
"scss/at-import-partial-extension": null,
|
|
18
16
|
"alpha-value-notation": null,
|
|
19
17
|
"scss/percent-placeholder-pattern": null,
|
|
20
18
|
"scss/at-mixin-argumentless-call-parentheses": null,
|
package/browser.js
CHANGED
|
@@ -7,7 +7,7 @@ import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
|
|
|
7
7
|
|
|
8
8
|
// Base rules adapted from the browser config
|
|
9
9
|
const baseRules = {
|
|
10
|
-
'comma-dangle': 'warn',
|
|
10
|
+
'comma-dangle': ['warn', 'always-multiline'],
|
|
11
11
|
'no-param-reassign': ['warn', { props: false }],
|
|
12
12
|
'arrow-parens': 0,
|
|
13
13
|
'no-plusplus': 0,
|
|
@@ -19,8 +19,8 @@ const baseRules = {
|
|
|
19
19
|
allow: [
|
|
20
20
|
'_hsg',
|
|
21
21
|
'_hsq',
|
|
22
|
-
]
|
|
23
|
-
}
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
24
|
],
|
|
25
25
|
'no-trailing-spaces': ['error', { skipBlankLines: true }],
|
|
26
26
|
'no-unused-expressions': ['warn', { allowTernary: true }],
|
|
@@ -29,15 +29,15 @@ const baseRules = {
|
|
|
29
29
|
{
|
|
30
30
|
code: 120,
|
|
31
31
|
ignoreStrings: true,
|
|
32
|
-
ignoreTemplateLiterals: true
|
|
33
|
-
}
|
|
32
|
+
ignoreTemplateLiterals: true,
|
|
33
|
+
},
|
|
34
34
|
],
|
|
35
35
|
'operator-linebreak': 0,
|
|
36
36
|
'implicit-arrow-linebreak': 0,
|
|
37
37
|
indent: 0,
|
|
38
38
|
'object-curly-newline': 0,
|
|
39
39
|
'function-paren-newline': 0,
|
|
40
|
-
'nonblock-statement-body-position': 0
|
|
40
|
+
'nonblock-statement-body-position': 0,
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// React-specific rules
|
|
@@ -50,10 +50,10 @@ const reactRules = {
|
|
|
50
50
|
2,
|
|
51
51
|
{
|
|
52
52
|
component: true,
|
|
53
|
-
html: false
|
|
54
|
-
}
|
|
53
|
+
html: false,
|
|
54
|
+
},
|
|
55
55
|
],
|
|
56
|
-
'react/forbid-prop-types': 0
|
|
56
|
+
'react/forbid-prop-types': 0,
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
// Common ignore patterns
|
|
@@ -63,13 +63,13 @@ const commonIgnores = [
|
|
|
63
63
|
'**/build/**',
|
|
64
64
|
'**/.next/**',
|
|
65
65
|
'**/coverage/**',
|
|
66
|
-
'eslint.config.js'
|
|
66
|
+
'eslint.config.js',
|
|
67
67
|
];
|
|
68
68
|
|
|
69
69
|
export default [
|
|
70
70
|
// Global ignores
|
|
71
71
|
{
|
|
72
|
-
ignores: commonIgnores
|
|
72
|
+
ignores: commonIgnores,
|
|
73
73
|
},
|
|
74
74
|
// Base config for all JavaScript files
|
|
75
75
|
js.configs.recommended,
|
|
@@ -85,17 +85,17 @@ export default [
|
|
|
85
85
|
// Custom browser globals from original config
|
|
86
86
|
$: true,
|
|
87
87
|
jQuery: true,
|
|
88
|
-
Invoca: true
|
|
88
|
+
Invoca: true,
|
|
89
89
|
},
|
|
90
90
|
parserOptions: {
|
|
91
91
|
ecmaFeatures: {
|
|
92
|
-
jsx: true
|
|
93
|
-
}
|
|
94
|
-
}
|
|
92
|
+
jsx: true,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
95
|
},
|
|
96
96
|
rules: {
|
|
97
|
-
...baseRules
|
|
98
|
-
}
|
|
97
|
+
...baseRules,
|
|
98
|
+
},
|
|
99
99
|
},
|
|
100
100
|
// React configuration
|
|
101
101
|
{
|
|
@@ -103,24 +103,24 @@ export default [
|
|
|
103
103
|
plugins: {
|
|
104
104
|
react: reactPlugin,
|
|
105
105
|
'react-hooks': reactHooksPlugin,
|
|
106
|
-
'jsx-a11y': jsxA11yPlugin
|
|
106
|
+
'jsx-a11y': jsxA11yPlugin,
|
|
107
107
|
},
|
|
108
108
|
settings: {
|
|
109
109
|
react: {
|
|
110
|
-
version: 'detect'
|
|
111
|
-
}
|
|
110
|
+
version: 'detect',
|
|
111
|
+
},
|
|
112
112
|
},
|
|
113
113
|
rules: {
|
|
114
114
|
...reactPlugin.configs.recommended.rules,
|
|
115
115
|
...reactHooksPlugin.configs.recommended.rules,
|
|
116
116
|
...jsxA11yPlugin.configs.recommended.rules,
|
|
117
|
-
...reactRules
|
|
118
|
-
}
|
|
117
|
+
...reactRules,
|
|
118
|
+
},
|
|
119
119
|
},
|
|
120
120
|
// TypeScript config
|
|
121
121
|
...tseslint.configs.recommended.map(config => ({
|
|
122
122
|
...config,
|
|
123
|
-
files: ['**/*.{ts,mts,cts,tsx}']
|
|
123
|
+
files: ['**/*.{ts,mts,cts,tsx}'],
|
|
124
124
|
})),
|
|
125
125
|
{
|
|
126
126
|
files: ['**/*.{ts,mts,cts,tsx}'],
|
|
@@ -133,17 +133,17 @@ export default [
|
|
|
133
133
|
...globals.jest,
|
|
134
134
|
$: true,
|
|
135
135
|
jQuery: true,
|
|
136
|
-
Invoca: true
|
|
136
|
+
Invoca: true,
|
|
137
137
|
},
|
|
138
138
|
parserOptions: {
|
|
139
139
|
ecmaFeatures: {
|
|
140
|
-
jsx: true
|
|
141
|
-
}
|
|
142
|
-
}
|
|
140
|
+
jsx: true,
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
143
|
},
|
|
144
144
|
rules: {
|
|
145
|
-
...baseRules
|
|
146
|
-
}
|
|
145
|
+
...baseRules,
|
|
146
|
+
},
|
|
147
147
|
},
|
|
148
148
|
// React configuration for TypeScript files
|
|
149
149
|
{
|
|
@@ -151,18 +151,18 @@ export default [
|
|
|
151
151
|
plugins: {
|
|
152
152
|
react: reactPlugin,
|
|
153
153
|
'react-hooks': reactHooksPlugin,
|
|
154
|
-
'jsx-a11y': jsxA11yPlugin
|
|
154
|
+
'jsx-a11y': jsxA11yPlugin,
|
|
155
155
|
},
|
|
156
156
|
settings: {
|
|
157
157
|
react: {
|
|
158
|
-
version: 'detect'
|
|
159
|
-
}
|
|
158
|
+
version: 'detect',
|
|
159
|
+
},
|
|
160
160
|
},
|
|
161
161
|
rules: {
|
|
162
162
|
...reactPlugin.configs.recommended.rules,
|
|
163
163
|
...reactHooksPlugin.configs.recommended.rules,
|
|
164
164
|
...jsxA11yPlugin.configs.recommended.rules,
|
|
165
|
-
...reactRules
|
|
166
|
-
}
|
|
167
|
-
}
|
|
165
|
+
...reactRules,
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
168
|
];
|
package/index.js
CHANGED
package/package.json
CHANGED