eslint-config-beslogic 3.1.3 → 3.2.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.2.0
4
+
5
+ - Migrated from `eslint-plugin-import` to `eslint-plugin-import-x@^4.2.1` for simpler configs and performance improvement.
6
+ - This also forces `eslint` to version `8.57` or above
7
+
8
+ ## 3.1.4
9
+
10
+ - Pinned `eslint-plugin-unicorn` to `>=49.0 && <57`
11
+
3
12
  ## 3.1.3
4
13
 
5
14
  - Bumped `"@typescript-eslint` to `^8.15.0`
package/javascript.js CHANGED
@@ -43,7 +43,7 @@ module.exports = {
43
43
  "plugin:sonarjs/recommended-legacy", // "legacy" is for ESLint v8 compatibility
44
44
  "plugin:unicorn/all",
45
45
  "plugin:regexp/all",
46
- "plugin:import/recommended",
46
+ "plugin:import-x/recommended",
47
47
  "plugin:@eslint-community/eslint-comments/recommended"
48
48
  ],
49
49
  "env": {
@@ -427,26 +427,26 @@ module.exports = {
427
427
  // - no-useless-react-setstate
428
428
 
429
429
  /*
430
- * import settings (https://github.com/import-js/eslint-plugin-import#rules)
430
+ * import settings (https://github.com/un-ts/eslint-plugin-import-x#rules)
431
431
  */
432
- "import/consistent-type-specifier-style": [
432
+ "import-x/consistent-type-specifier-style": [
433
433
  "error",
434
434
  "prefer-top-level"
435
435
  ],
436
- "import/no-duplicates": [
436
+ "import-x/no-duplicates": [
437
437
  "error",
438
438
  { "considerQueryString": true }
439
439
  ],
440
- "import/no-empty-named-blocks": "error",
441
- "import/newline-after-import": [
440
+ "import-x/no-empty-named-blocks": "error",
441
+ "import-x/newline-after-import": [
442
442
  "error",
443
443
  {
444
444
  "exactCount": true,
445
445
  "considerComments": true
446
446
  }
447
447
  ],
448
- "import/no-named-as-default": "error",
449
- "import/no-named-as-default-member": "error",
448
+ "import-x/no-named-as-default": "error",
449
+ "import-x/no-named-as-default-member": "error",
450
450
 
451
451
  // Extracted restricted import into its own rule so it's easier for projects to override/ignore
452
452
  "no-autofix/no-relative-import-paths/no-relative-import-paths": [
@@ -878,7 +878,7 @@ module.exports = {
878
878
  "no-constant-binary-expression": "error",
879
879
  "no-constructor-return": "error",
880
880
  "no-dupe-else-if": "error",
881
- // Obsoleted by import/no-duplicates
881
+ // Obsoleted by import-x/no-duplicates
882
882
  "no-duplicate-imports": "off",
883
883
  "no-extend-native": "error",
884
884
  "no-implied-eval": "error",
package/node-js.js CHANGED
@@ -25,6 +25,11 @@ module.exports = {
25
25
  "env": {
26
26
  "node": true
27
27
  },
28
+ "settings": {
29
+ "import-x/resolver": {
30
+ "node": true
31
+ }
32
+ },
28
33
  "globals": {
29
34
  "__dirname": true,
30
35
  "require": true,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "eslint-config-beslogic",
3
- "version": "3.1.3",
3
+ "version": "3.2.0",
4
4
  "description": "ESLint rules, plugins and configs used at Beslogic",
5
5
  "main": "index.js",
6
6
  "// dependencies": "Run for ourselves when we install dependencies w/o running npm i afterward",
7
7
  "scripts": {
8
8
  "eslint": "set TIMING=1 && eslint ./ --ignore-path .gitignore",
9
9
  "lint": "dprint check && npm run eslint",
10
- "lint:fix": "dprint fmt && npm run eslint -- --fix",
10
+ "lint:fix": "npm run eslint -- --fix && dprint fmt",
11
11
  "upgrade": "npx npm-check-updates -u & npm i",
12
12
  "yalc": "yalc publish",
13
13
  "prepack": "type .gitignore* > .npmignore",
@@ -49,12 +49,12 @@
49
49
  "@types/eslint": "^8.56",
50
50
  "confusing-browser-globals": "^1.0",
51
51
  "dprint": "^0.40.2",
52
- "eslint": "^8.56",
52
+ "eslint": "^8.57",
53
53
  "eslint-import-resolver-typescript": "^3.2.6",
54
54
  "eslint-plugin-autofix": "^1.1 || ^2.0",
55
55
  "eslint-plugin-etc": "^2.0",
56
56
  "eslint-plugin-extra-rules": "^0.0.0-development",
57
- "eslint-plugin-import": "^2.30",
57
+ "eslint-plugin-import-x": "^4.2.1",
58
58
  "eslint-plugin-jest": "^28.7",
59
59
  "eslint-plugin-jest-formatting": "^3.1",
60
60
  "eslint-plugin-no-autofix": "^2.0",
@@ -64,7 +64,7 @@
64
64
  "eslint-plugin-simple-import-sort": ">=12.0",
65
65
  "eslint-plugin-sonarjs": "2.0.4",
66
66
  "eslint-plugin-testing-library": "^6.0",
67
- "eslint-plugin-unicorn": ">=49.0"
67
+ "eslint-plugin-unicorn": ">=49.0 && <57"
68
68
  },
69
69
  "optionalDependencies": {
70
70
  "@angular-eslint/eslint-plugin": ">=16.2",
package/typescript.js CHANGED
@@ -40,14 +40,14 @@ module.exports = {
40
40
  "extends": [
41
41
  "plugin:@typescript-eslint/all",
42
42
  "plugin:etc/recommended",
43
- "plugin:import/typescript"
43
+ "plugin:import-x/typescript"
44
44
  ],
45
45
  "env": {
46
46
  // https://eslint.org/docs/v8.x/use/configure/language-options#specifying-environments
47
47
  "es2022": true // Same as tsconfig.json > compilerOptions.lib
48
48
  },
49
49
  "settings": {
50
- "import/resolver": {
50
+ "import-x/resolver": {
51
51
  "typescript": {
52
52
  // Recommended by eslint-import-resolver-typescript
53
53
  // Always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
@@ -92,11 +92,11 @@ module.exports = {
92
92
  },
93
93
  "rules": {
94
94
  // Slow and not as useful with TypeScript: https://github.com/import-js/eslint-plugin-import/issues/2340
95
- "import/namespace": "off",
95
+ "import-x/namespace": "off",
96
96
  // TypeScript already ensures imports resolve
97
- "import/no-unresolved": "off",
97
+ "import-x/no-unresolved": "off",
98
98
  // Already checked by @typescript-eslint/no-import-type-side-effects
99
- "import/consistent-type-specifier-style": "off",
99
+ "import-x/consistent-type-specifier-style": "off",
100
100
 
101
101
  /*
102
102
  * Cartant's etc rules