@qlik/eslint-config 1.1.3 → 1.1.4
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 +44 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -227,9 +227,50 @@ export default [
|
|
|
227
227
|
|
|
228
228
|
### More examples with export
|
|
229
229
|
|
|
230
|
-
One GOTCHA about the flat configs. If there's no `files` property in one of the configs in the config array it is applied
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
One GOTCHA about the flat configs. If there's no `files` property in one of the configs in the config array it is applied to every file. So in the case of turning off a rule that belongs to specific config e.g. `@typescript/eslint`. The following
|
|
231
|
+
approach can be problematic.
|
|
232
|
+
|
|
233
|
+
```js
|
|
234
|
+
// @ts-check
|
|
235
|
+
import qlik from "@qlik/eslint-config";
|
|
236
|
+
|
|
237
|
+
export default qlik.compose(
|
|
238
|
+
...qlik.configs.recommended, // <-- typescript-eslint is applied to .ts files only
|
|
239
|
+
{
|
|
240
|
+
rules: {
|
|
241
|
+
// I want to change this rule, but it is applied to all files so if I have a .js file somewhere getting linted I will get an ERROR about missing plugin.
|
|
242
|
+
"@typescript-eslint/method-signature-style": "off",
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
);
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
This will have to be fine-tuned. However, it is recommended to not disable rules.
|
|
249
|
+
|
|
250
|
+
```js
|
|
251
|
+
// @ts-check
|
|
252
|
+
import qlik from "@qlik/eslint-config";
|
|
253
|
+
|
|
254
|
+
export default qlik.compose(
|
|
255
|
+
...qlik.configs.recommended, // <-- typescript-eslint is applied to .ts files only
|
|
256
|
+
{
|
|
257
|
+
files: ["**/*.ts"]
|
|
258
|
+
rules: {
|
|
259
|
+
// typescript specific rules here
|
|
260
|
+
"@typescript-eslint/method-signature-style": "off",
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
rules: {
|
|
265
|
+
// these are fine, since they are applied to all files
|
|
266
|
+
"no-var": "off",
|
|
267
|
+
"import-x/no-unresolved": "off"
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
);
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Another GOTCHA can happen with the vitest and jest configs
|
|
233
274
|
|
|
234
275
|
```js
|
|
235
276
|
// @ts-check
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qlik/eslint-config",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Qlik's ESLint configs",
|
|
5
5
|
"repository": "git@github.com:qlik-oss/dev-tools-js.git",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"prettier": "@qlik/prettier-config",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@eslint-react/eslint-plugin": "1.17.1",
|
|
20
|
-
"@eslint/js": "^9.
|
|
20
|
+
"@eslint/js": "^9.16.0",
|
|
21
21
|
"@typescript-eslint/utils": "^8.16.0",
|
|
22
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
22
|
+
"@vitest/eslint-plugin": "^1.1.12",
|
|
23
23
|
"confusing-browser-globals": "^1.0.11",
|
|
24
24
|
"eslint-config-prettier": "^9.1.0",
|
|
25
25
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"eslint-plugin-playwright": "2.1.0",
|
|
30
30
|
"eslint-plugin-react": "^7.37.2",
|
|
31
31
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
32
|
-
"eslint-plugin-svelte": "2.46.
|
|
32
|
+
"eslint-plugin-svelte": "2.46.1",
|
|
33
33
|
"eslint-plugin-testing-library": "^7.0.0",
|
|
34
34
|
"globals": "^15.12.0",
|
|
35
35
|
"svelte-eslint-parser": "0.43.0",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
41
41
|
"@types/eslint-plugin-jsx-a11y": "^6.10.0",
|
|
42
42
|
"@types/eslint__js": "^8.42.3",
|
|
43
|
-
"eslint": "^9.
|
|
43
|
+
"eslint": "^9.16.0",
|
|
44
44
|
"prettier": "^3.4.1",
|
|
45
45
|
"vitest": "^2.1.6",
|
|
46
46
|
"@qlik/prettier-config": "0.4.19",
|
|
47
|
-
"@qlik/tsconfig": "0.
|
|
47
|
+
"@qlik/tsconfig": "0.3.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"eslint": ">=9.0.0",
|