@szum-tech/eslint-config 2.1.1 → 2.1.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/dist/index.cjs CHANGED
@@ -50,6 +50,8 @@ var hasJestDom = has("@testing-library/jest-dom");
50
50
  var hasVitest = has("vitest");
51
51
  var hasPlaywright = has("@playwright/test");
52
52
  var hasStorybook = has("storybook");
53
+ var typeScriptExtensions = [".ts", ".cts", ".mts", ".tsx"];
54
+ var allExtensions = [...typeScriptExtensions, ".js", ".jsx", ".mjs", ".cjs"];
53
55
  var vitestFiles = ["**/__tests__/**/*", "**/*.test.*"];
54
56
  var testFiles = ["**/tests/**", ...vitestFiles];
55
57
  var playwrightFiles = ["**/e2e/**", "**/*.e2e.*"];
@@ -70,7 +72,7 @@ var config = [
70
72
  {
71
73
  name: "eslint/config/base&import",
72
74
  plugins: {
73
- import: importPlugin__default.default
75
+ import: importPlugin__default.default.flatConfigs.recommended.plugins.import
74
76
  },
75
77
  languageOptions: {
76
78
  ecmaVersion: "latest",
@@ -83,14 +85,6 @@ var config = [
83
85
  warnOnUnsupportedTypeScriptVersion: false
84
86
  }
85
87
  },
86
- settings: {
87
- "import/resolver": {
88
- // You will also need to install and configure the TypeScript resolver
89
- // See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
90
- typescript: hasTypeScript,
91
- node: true
92
- }
93
- },
94
88
  rules: {
95
89
  "no-unexpected-multiline": ERROR,
96
90
  "no-warning-comments": [ERROR, { terms: ["FIXME"], location: "anywhere" }],
@@ -246,6 +240,18 @@ var config = [
246
240
  plugins: {
247
241
  "@typescript-eslint": tsEslint__default.default.plugin
248
242
  },
243
+ settings: {
244
+ "import/extensions": allExtensions,
245
+ "import/external-module-folders": ["node_modules", "node_modules/@types"],
246
+ "import/parsers": {
247
+ "@typescript-eslint/parser": typeScriptExtensions
248
+ },
249
+ "import/resolver": {
250
+ node: {
251
+ extensions: allExtensions
252
+ }
253
+ }
254
+ },
249
255
  rules: {
250
256
  "no-unused-expressions": OFF,
251
257
  "no-array-constructor": OFF,
package/dist/index.js CHANGED
@@ -32,6 +32,8 @@ var hasJestDom = has("@testing-library/jest-dom");
32
32
  var hasVitest = has("vitest");
33
33
  var hasPlaywright = has("@playwright/test");
34
34
  var hasStorybook = has("storybook");
35
+ var typeScriptExtensions = [".ts", ".cts", ".mts", ".tsx"];
36
+ var allExtensions = [...typeScriptExtensions, ".js", ".jsx", ".mjs", ".cjs"];
35
37
  var vitestFiles = ["**/__tests__/**/*", "**/*.test.*"];
36
38
  var testFiles = ["**/tests/**", ...vitestFiles];
37
39
  var playwrightFiles = ["**/e2e/**", "**/*.e2e.*"];
@@ -52,7 +54,7 @@ var config = [
52
54
  {
53
55
  name: "eslint/config/base&import",
54
56
  plugins: {
55
- import: importPlugin
57
+ import: importPlugin.flatConfigs.recommended.plugins.import
56
58
  },
57
59
  languageOptions: {
58
60
  ecmaVersion: "latest",
@@ -65,14 +67,6 @@ var config = [
65
67
  warnOnUnsupportedTypeScriptVersion: false
66
68
  }
67
69
  },
68
- settings: {
69
- "import/resolver": {
70
- // You will also need to install and configure the TypeScript resolver
71
- // See also https://github.com/import-js/eslint-import-resolver-typescript#configuration
72
- typescript: hasTypeScript,
73
- node: true
74
- }
75
- },
76
70
  rules: {
77
71
  "no-unexpected-multiline": ERROR,
78
72
  "no-warning-comments": [ERROR, { terms: ["FIXME"], location: "anywhere" }],
@@ -228,6 +222,18 @@ var config = [
228
222
  plugins: {
229
223
  "@typescript-eslint": tsEslint.plugin
230
224
  },
225
+ settings: {
226
+ "import/extensions": allExtensions,
227
+ "import/external-module-folders": ["node_modules", "node_modules/@types"],
228
+ "import/parsers": {
229
+ "@typescript-eslint/parser": typeScriptExtensions
230
+ },
231
+ "import/resolver": {
232
+ node: {
233
+ extensions: allExtensions
234
+ }
235
+ }
236
+ },
231
237
  rules: {
232
238
  "no-unused-expressions": OFF,
233
239
  "no-array-constructor": OFF,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@szum-tech/eslint-config",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "ESLint configuration for TypeScript projects",
5
5
  "keywords": [
6
6
  "eslint",