@qlik/eslint-config 2.0.0 → 2.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/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import js from "@eslint/js";
|
|
2
|
-
import {
|
|
2
|
+
import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript";
|
|
3
|
+
import { createNodeResolver, importX } from "eslint-plugin-import-x";
|
|
3
4
|
import globals from "globals";
|
|
4
5
|
import tsconfig from "typescript-eslint";
|
|
5
6
|
import { mergeConfigs } from "../../utils/config.js";
|
|
@@ -70,6 +71,12 @@ const baseConfigTS = mergeConfigs(
|
|
|
70
71
|
projectService: true,
|
|
71
72
|
},
|
|
72
73
|
},
|
|
74
|
+
settings: {
|
|
75
|
+
// Use import-x resolver-next for TypeScript and keep node resolution as fallback.
|
|
76
|
+
"import-x/resolver-next": [createTypeScriptImportResolver({ alwaysTryTypes: true }), createNodeResolver()],
|
|
77
|
+
// Disable legacy resolver config from the import-x TypeScript preset.
|
|
78
|
+
"import-x/resolver": false,
|
|
79
|
+
},
|
|
73
80
|
rules: {
|
|
74
81
|
...typescriptRules,
|
|
75
82
|
// add qlik's recommended typescript config for typescript here if needed
|
package/src/configs/vitest.js
CHANGED
|
@@ -34,7 +34,7 @@ const vitestTS = mergeConfigs(
|
|
|
34
34
|
// add qlik's recommended vitest config
|
|
35
35
|
{
|
|
36
36
|
name: "vitest-ts",
|
|
37
|
-
files: ["**/__test__/**/*.{ts,tsx}", "**/__tests__/**/*.{ts,tsx}", "mocks/**/*.ts"],
|
|
37
|
+
files: ["**/__test__/**/*.{ts,tsx}", "**/__tests__/**/*.{ts,tsx}", "mocks/**/*.ts", "**/*.{test,spec}.{ts,tsx}"],
|
|
38
38
|
rules: {
|
|
39
39
|
// turn off/modify rules that suitable for tests in TypeScript
|
|
40
40
|
|