@qlik/eslint-config 1.1.3 → 1.1.5

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 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
- to every file. So in the case of turning off a rule that belongs to specific config e.g. jest or vitest. The following
232
- approach does NOT work.
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",
3
+ "version": "1.1.5",
4
4
  "description": "Qlik's ESLint configs",
5
5
  "repository": "git@github.com:qlik-oss/dev-tools-js.git",
6
6
  "license": "ISC",
@@ -16,35 +16,35 @@
16
16
  ],
17
17
  "prettier": "@qlik/prettier-config",
18
18
  "dependencies": {
19
- "@eslint-react/eslint-plugin": "1.17.1",
20
- "@eslint/js": "^9.15.0",
21
- "@typescript-eslint/utils": "^8.16.0",
22
- "@vitest/eslint-plugin": "^1.1.11",
19
+ "@eslint-react/eslint-plugin": "1.19.0",
20
+ "@eslint/js": "^9.17.0",
21
+ "@typescript-eslint/utils": "^8.18.0",
22
+ "@vitest/eslint-plugin": "^1.1.16",
23
23
  "confusing-browser-globals": "^1.0.11",
24
24
  "eslint-config-prettier": "^9.1.0",
25
- "eslint-import-resolver-typescript": "^3.6.3",
26
- "eslint-plugin-import-x": "^4.4.3",
25
+ "eslint-import-resolver-typescript": "^3.7.0",
26
+ "eslint-plugin-import-x": "^4.5.0",
27
27
  "eslint-plugin-jest": "^28.9.0",
28
28
  "eslint-plugin-jsx-a11y": "^6.10.2",
29
29
  "eslint-plugin-playwright": "2.1.0",
30
30
  "eslint-plugin-react": "^7.37.2",
31
- "eslint-plugin-react-hooks": "^5.0.0",
32
- "eslint-plugin-svelte": "2.46.0",
33
- "eslint-plugin-testing-library": "^7.0.0",
34
- "globals": "^15.12.0",
31
+ "eslint-plugin-react-hooks": "^5.1.0",
32
+ "eslint-plugin-svelte": "2.46.1",
33
+ "eslint-plugin-testing-library": "^7.1.1",
34
+ "globals": "^15.13.0",
35
35
  "svelte-eslint-parser": "0.43.0",
36
- "typescript-eslint": "^8.16.0"
36
+ "typescript-eslint": "^8.18.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/confusing-browser-globals": "^1.0.3",
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.15.0",
44
- "prettier": "^3.4.1",
45
- "vitest": "^2.1.6",
46
- "@qlik/prettier-config": "0.4.19",
47
- "@qlik/tsconfig": "0.2.8"
43
+ "eslint": "^9.17.0",
44
+ "prettier": "^3.4.2",
45
+ "vitest": "^2.1.8",
46
+ "@qlik/tsconfig": "0.3.0",
47
+ "@qlik/prettier-config": "0.4.19"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "eslint": ">=9.0.0",
@@ -92,6 +92,9 @@ const reactTS = mergeConfigs(
92
92
  rules: {
93
93
  // turn on/off or modify js/ts rules necessary for react
94
94
  "react/jsx-filename-extension": [2, { extensions: [".js", ".jsx", ".ts", ".tsx"] }],
95
+ // avoid double linting of class-methods-use-this in typescript
96
+ "class-methods-use-this": "off",
97
+ "@typescript-eslint/class-methods-use-this": reactBaseConfig.rules?.["class-methods-use-this"] || "off",
95
98
  },
96
99
  },
97
100
  prettier,