@tpluscode/eslint-config 2.2.1 → 3.0.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 +14 -0
- package/eslint.config.js +1 -1
- package/no-rdf.js +12 -11
- package/package.json +4 -4
- package/ts-no-rdf.js +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
### Major Changes
|
|
5
|
+
|
|
6
|
+
- 8760315: Use `eslint-plugin-import-x` instead of `eslint-plugin-import`
|
|
7
|
+
|
|
8
|
+
### Patch Changes
|
|
9
|
+
|
|
10
|
+
- 71fd3cb: Relax peer dependency on `eslint` to allow 9, 10 and 11
|
|
11
|
+
|
|
12
|
+
## 2.2.2
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 330de86: Wrong base config for `ts-no-rdf`
|
|
16
|
+
|
|
3
17
|
## 2.2.1
|
|
4
18
|
### Patch Changes
|
|
5
19
|
|
package/eslint.config.js
CHANGED
package/no-rdf.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'module'
|
|
2
2
|
import js from '@eslint/js'
|
|
3
3
|
import globals from 'globals'
|
|
4
|
-
import
|
|
4
|
+
import { configs as importConfigs, createNodeResolver, importX } from 'eslint-plugin-import-x'
|
|
5
5
|
import mocha from 'eslint-plugin-mocha'
|
|
6
6
|
import n from 'eslint-plugin-n'
|
|
7
7
|
import promise from 'eslint-plugin-promise'
|
|
@@ -17,6 +17,7 @@ function rulesFrom(config) {
|
|
|
17
17
|
|
|
18
18
|
export default [
|
|
19
19
|
js.configs.recommended,
|
|
20
|
+
importX.flatConfigs.recommended,
|
|
20
21
|
{
|
|
21
22
|
plugins: { '@stylistic': stylistic },
|
|
22
23
|
},
|
|
@@ -38,7 +39,7 @@ export default [
|
|
|
38
39
|
},
|
|
39
40
|
},
|
|
40
41
|
plugins: {
|
|
41
|
-
'import':
|
|
42
|
+
'import-x': importX,
|
|
42
43
|
mocha,
|
|
43
44
|
n,
|
|
44
45
|
promise,
|
|
@@ -46,12 +47,12 @@ export default [
|
|
|
46
47
|
'unused-imports': unusedImports,
|
|
47
48
|
},
|
|
48
49
|
settings: {
|
|
49
|
-
'import/resolver':
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
'import-x/resolver-next': [
|
|
51
|
+
createNodeResolver(),
|
|
52
|
+
],
|
|
52
53
|
},
|
|
53
54
|
rules: {
|
|
54
|
-
...rulesFrom(
|
|
55
|
+
...rulesFrom(importConfigs.recommended),
|
|
55
56
|
...rulesFrom(n.configs['flat/recommended']),
|
|
56
57
|
...rulesFrom(promise.configs['flat/recommended']),
|
|
57
58
|
...rulesFrom(requireExtensions.configs.recommended),
|
|
@@ -59,9 +60,9 @@ export default [
|
|
|
59
60
|
|
|
60
61
|
'indent': ['error', 2],
|
|
61
62
|
'no-console': 'error',
|
|
62
|
-
'import/no-unresolved': 'error',
|
|
63
|
-
'import/extensions': 'off',
|
|
64
|
-
'import/order': 'error',
|
|
63
|
+
'import-x/no-unresolved': 'error',
|
|
64
|
+
'import-x/extensions': 'off',
|
|
65
|
+
'import-x/order': 'error',
|
|
65
66
|
'space-before-function-paren': [
|
|
66
67
|
'error',
|
|
67
68
|
{
|
|
@@ -72,7 +73,7 @@ export default [
|
|
|
72
73
|
'error',
|
|
73
74
|
'always-multiline',
|
|
74
75
|
],
|
|
75
|
-
'import/no-extraneous-dependencies': [
|
|
76
|
+
'import-x/no-extraneous-dependencies': [
|
|
76
77
|
'error',
|
|
77
78
|
{
|
|
78
79
|
devDependencies: [
|
|
@@ -133,7 +134,7 @@ export default [
|
|
|
133
134
|
{
|
|
134
135
|
files: ['eslint.config.*'],
|
|
135
136
|
rules: {
|
|
136
|
-
'import/no-extraneous-dependencies': 'off',
|
|
137
|
+
'import-x/no-extraneous-dependencies': 'off',
|
|
137
138
|
},
|
|
138
139
|
},
|
|
139
140
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpluscode/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"globals": "^15.0.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"eslint": "
|
|
27
|
-
"eslint-plugin-import": "^
|
|
26
|
+
"eslint": ">=9 <11",
|
|
27
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
28
28
|
"eslint-plugin-mocha": "^11.3.0",
|
|
29
29
|
"eslint-plugin-n": "^18.0.1",
|
|
30
30
|
"eslint-plugin-promise": "^7.3.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@typescript-eslint/parser": "^8.0.0",
|
|
44
44
|
"eslint": "^9",
|
|
45
45
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
46
|
-
"eslint-plugin-import": "^
|
|
46
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
47
47
|
"eslint-plugin-mocha": "^11.3.0",
|
|
48
48
|
"eslint-plugin-n": "^18.0.1",
|
|
49
49
|
"eslint-plugin-promise": "^7.3.0",
|
package/ts-no-rdf.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import tsPlugin from '@typescript-eslint/eslint-plugin'
|
|
2
2
|
import tsParser from '@typescript-eslint/parser'
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import { createNodeResolver } from 'eslint-plugin-import-x'
|
|
4
|
+
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
|
|
5
|
+
import jsConfig from './no-rdf.js'
|
|
5
6
|
|
|
6
7
|
function rulesFrom(config) {
|
|
7
8
|
return config && config.rules ? config.rules : {}
|
|
@@ -21,18 +22,18 @@ export default [
|
|
|
21
22
|
'@typescript-eslint': tsPlugin,
|
|
22
23
|
},
|
|
23
24
|
settings: {
|
|
24
|
-
'import/parsers': {
|
|
25
|
+
'import-x/parsers': {
|
|
25
26
|
'@typescript-eslint/parser': ['.ts', '.tsx', '.mts', '.cts'],
|
|
26
27
|
},
|
|
27
|
-
'import/resolver':
|
|
28
|
-
|
|
28
|
+
'import-x/resolver-next': [
|
|
29
|
+
createTypeScriptImportResolver({
|
|
29
30
|
alwaysTryTypes: true,
|
|
30
|
-
},
|
|
31
|
-
|
|
31
|
+
}),
|
|
32
|
+
createNodeResolver(),
|
|
33
|
+
],
|
|
32
34
|
},
|
|
33
35
|
rules: {
|
|
34
36
|
...rulesFrom(tsPlugin.configs.recommended),
|
|
35
|
-
...rulesFrom(importPlugin.configs.typescript),
|
|
36
37
|
|
|
37
38
|
'no-dupe-class-members': 'off',
|
|
38
39
|
'no-redeclare': 'off',
|