Skip to content

Commit 7e14f5f

Browse files
committed
Fall back to using eslint-plugin-import until eslint-plugin-import-x has stabilised
1 parent 389738b commit 7e14f5f

6 files changed

Lines changed: 118 additions & 135 deletions

File tree

.changeset/clean-roses-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@putstack/eslint-config-typescript': patch
3+
---
4+
5+
Update required node versions to be `^18.18 || ^20.9 || ^21.1`

.changeset/gentle-nails-give.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
"@changesets/cli": "2.27.1",
1818
"@putstack/eslint-config-typescript": "workspace:*",
1919
"@putstack/prettier-config": "workspace:*",
20-
"@types/node": "20.12.2",
20+
"@types/node": "20.12.5",
2121
"@vitest/coverage-v8": "1.4.0",
2222
"eslint": "8.57.0",
2323
"husky": "9.0.11",
2424
"lint-staged": "15.2.2",
2525
"npm-run-all2": "6.1.2",
2626
"prettier": "3.2.5",
2727
"tsup": "8.0.2",
28-
"typescript": "5.4.3",
28+
"typescript": "5.4.4",
2929
"vitest": "1.4.0"
3030
},
3131
"scripts": {

packages/eslint-config-typescript/base/index.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
parser: '@typescript-eslint/parser',
3-
plugins: ['@typescript-eslint', 'import-x', 'progress', 'sonarjs'],
3+
plugins: ['@typescript-eslint', 'import', 'progress', 'sonarjs'],
44
extends: [
55
//General eslint recommended rules
66
'eslint:recommended',
@@ -10,8 +10,8 @@ module.exports = {
1010
//General code quality rules
1111
'plugin:sonarjs/recommended',
1212
//General import rules
13-
'plugin:import-x/recommended',
14-
'plugin:import-x/typescript',
13+
'plugin:import/recommended',
14+
'plugin:import/typescript',
1515
],
1616
rules: {
1717
/** ESLint plugin configuration */
@@ -28,9 +28,9 @@ module.exports = {
2828
//Enforce the use of top-level import type qualifer when an import only has specifiers with inline type qualifiers
2929
'@typescript-eslint/no-import-type-side-effects': 'warn',
3030
//We want to encourage the import type specifiers to be consistent
31-
'import-x/consistent-type-specifier-style': ['warn', 'prefer-top-level'],
31+
'import/consistent-type-specifier-style': ['warn', 'prefer-top-level'],
3232
//Set up a specificer import that we generally want to adhere to to make it easier recognizing where an import is coming from
33-
'import-x/order': [
33+
'import/order': [
3434
'warn',
3535
{
3636
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'unknown'],
@@ -77,9 +77,13 @@ module.exports = {
7777
},
7878
//Default settings to fit simple projects, but should be overridden by users who want/need more control
7979
settings: {
80-
'import-x/resolver': {
81-
typescript: true,
82-
node: true,
80+
'import/parsers': {
81+
'@typescript-eslint/parser': ['.ts', '.tsx'],
82+
},
83+
'import/resolver': {
84+
typescript: {
85+
alwaysTryTypes: true,
86+
},
8387
},
8488
},
8589
};

packages/eslint-config-typescript/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"repository": "https://github.com/Pewtro/configs",
88
"main": "index.js",
99
"engines": {
10-
"node": ">=18.18.0 <20 || >=20.8.0"
10+
"node": "^18.18 || ^20.9 || ^21.1"
1111
},
1212
"files": [
1313
"/base",
@@ -21,17 +21,17 @@
2121
"putstack"
2222
],
2323
"dependencies": {
24-
"@typescript-eslint/eslint-plugin": "7.4.0",
25-
"@typescript-eslint/parser": "7.4.0",
24+
"@typescript-eslint/eslint-plugin": "7.5.0",
25+
"@typescript-eslint/parser": "7.5.0",
2626
"eslint-import-resolver-typescript": "3.6.1",
27-
"eslint-plugin-import-x": "0.5.0",
27+
"eslint-plugin-import": "2.29.1",
2828
"eslint-plugin-progress": "0.0.1",
29-
"eslint-plugin-sonarjs": "0.25.0",
30-
"eslint-plugin-unicorn": "51.0.1"
29+
"eslint-plugin-sonarjs": "0.25.1",
30+
"eslint-plugin-unicorn": "52.0.0"
3131
},
3232
"devDependencies": {
3333
"eslint": "8.57.0",
34-
"typescript": "5.4.3"
34+
"typescript": "5.4.4"
3535
},
3636
"peerDependencies": {
3737
"eslint": ">=8.57.0",

0 commit comments

Comments
 (0)