@tpluscode/eslint-config 2.2.2 → 3.0.1
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 +16 -14
- package/package.json +4 -4
- package/ts-no-rdf.js +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 88bb4df: Stylistic rules were not being applied
|
|
7
|
+
|
|
8
|
+
## 3.0.0
|
|
9
|
+
### Major Changes
|
|
10
|
+
|
|
11
|
+
- 8760315: Use `eslint-plugin-import-x` instead of `eslint-plugin-import`
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 71fd3cb: Relax peer dependency on `eslint` to allow 9, 10 and 11
|
|
16
|
+
|
|
3
17
|
## 2.2.2
|
|
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
|
},
|
|
@@ -24,6 +25,7 @@ export default [
|
|
|
24
25
|
files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}'],
|
|
25
26
|
...stylistic.configs['recommended'],
|
|
26
27
|
rules: {
|
|
28
|
+
...rulesFrom(stylistic.configs['recommended']),
|
|
27
29
|
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
|
|
28
30
|
},
|
|
29
31
|
},
|
|
@@ -38,7 +40,7 @@ export default [
|
|
|
38
40
|
},
|
|
39
41
|
},
|
|
40
42
|
plugins: {
|
|
41
|
-
'import':
|
|
43
|
+
'import-x': importX,
|
|
42
44
|
mocha,
|
|
43
45
|
n,
|
|
44
46
|
promise,
|
|
@@ -46,33 +48,33 @@ export default [
|
|
|
46
48
|
'unused-imports': unusedImports,
|
|
47
49
|
},
|
|
48
50
|
settings: {
|
|
49
|
-
'import/resolver':
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
'import-x/resolver-next': [
|
|
52
|
+
createNodeResolver(),
|
|
53
|
+
],
|
|
52
54
|
},
|
|
53
55
|
rules: {
|
|
54
|
-
...rulesFrom(
|
|
56
|
+
...rulesFrom(importConfigs.recommended),
|
|
55
57
|
...rulesFrom(n.configs['flat/recommended']),
|
|
56
58
|
...rulesFrom(promise.configs['flat/recommended']),
|
|
57
59
|
...rulesFrom(requireExtensions.configs.recommended),
|
|
58
60
|
...rulesFrom(mocha.configs.recommended),
|
|
59
61
|
|
|
60
|
-
'indent': ['error', 2],
|
|
62
|
+
'@stylistic/indent': ['error', 2],
|
|
61
63
|
'no-console': 'error',
|
|
62
|
-
'import/no-unresolved': 'error',
|
|
63
|
-
'import/extensions': 'off',
|
|
64
|
-
'import/order': 'error',
|
|
65
|
-
'space-before-function-paren': [
|
|
64
|
+
'import-x/no-unresolved': 'error',
|
|
65
|
+
'import-x/extensions': 'off',
|
|
66
|
+
'import-x/order': 'error',
|
|
67
|
+
'@stylistic/space-before-function-paren': [
|
|
66
68
|
'error',
|
|
67
69
|
{
|
|
68
70
|
named: 'never',
|
|
69
71
|
},
|
|
70
72
|
],
|
|
71
|
-
'comma-dangle': [
|
|
73
|
+
'@stylistic/comma-dangle': [
|
|
72
74
|
'error',
|
|
73
75
|
'always-multiline',
|
|
74
76
|
],
|
|
75
|
-
'import/no-extraneous-dependencies': [
|
|
77
|
+
'import-x/no-extraneous-dependencies': [
|
|
76
78
|
'error',
|
|
77
79
|
{
|
|
78
80
|
devDependencies: [
|
|
@@ -133,7 +135,7 @@ export default [
|
|
|
133
135
|
{
|
|
134
136
|
files: ['eslint.config.*'],
|
|
135
137
|
rules: {
|
|
136
|
-
'import/no-extraneous-dependencies': 'off',
|
|
138
|
+
'import-x/no-extraneous-dependencies': 'off',
|
|
137
139
|
},
|
|
138
140
|
},
|
|
139
141
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tpluscode/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
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,6 +1,7 @@
|
|
|
1
1
|
import tsPlugin from '@typescript-eslint/eslint-plugin'
|
|
2
2
|
import tsParser from '@typescript-eslint/parser'
|
|
3
|
-
import
|
|
3
|
+
import { createNodeResolver } from 'eslint-plugin-import-x'
|
|
4
|
+
import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
|
|
4
5
|
import jsConfig from './no-rdf.js'
|
|
5
6
|
|
|
6
7
|
function rulesFrom(config) {
|
|
@@ -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',
|