eslint-config-decent 2.4.1 → 2.4.3
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 +16 -2
- package/dist/index.mjs +16 -2
- package/package.json +10 -10
- package/src/eslint.ts +1 -1
- package/src/index.ts +19 -5
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,7 @@ const base$b = {
|
|
|
44
44
|
rules: {
|
|
45
45
|
"array-callback-return": ["error", { allowImplicit: true }],
|
|
46
46
|
"block-scoped-var": "error",
|
|
47
|
-
"callback-return":
|
|
47
|
+
"callback-return": "off",
|
|
48
48
|
"class-methods-use-this": "off",
|
|
49
49
|
"default-case": ["error", { commentPattern: "^no default$" }],
|
|
50
50
|
"default-case-last": "error",
|
|
@@ -817,6 +817,13 @@ function tsEslintConfig(options) {
|
|
|
817
817
|
name: "eslint-config-decent/tsx",
|
|
818
818
|
files: ["**/*.tsx"],
|
|
819
819
|
...configs$4.base
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
name: "eslint-config-decent/tsx-disable-ts-rules",
|
|
823
|
+
files: ["**/*.tsx"],
|
|
824
|
+
rules: {
|
|
825
|
+
"@typescript-eslint/explicit-function-return-type": "off"
|
|
826
|
+
}
|
|
820
827
|
}
|
|
821
828
|
] : [],
|
|
822
829
|
{
|
|
@@ -852,8 +859,15 @@ function tsEslintConfig(options) {
|
|
|
852
859
|
...enableTestingLibrary ? [
|
|
853
860
|
{
|
|
854
861
|
name: "eslint-config-decent/testing-library",
|
|
855
|
-
files: ["**/__tests__/**/*.ts?(x)", "**/*.{spec,test}.ts?(x)"],
|
|
862
|
+
files: ["**/__tests__/**/*.ts?(x)", "**/*.{spec,test,tests}.ts?(x)"],
|
|
856
863
|
...configs$2.base
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
name: "eslint-config-decent/testing-library-disable-ts-rules",
|
|
867
|
+
files: ["**/__tests__/**/*.ts?(x)", "**/*.{spec,test,tests}.ts?(x)"],
|
|
868
|
+
rules: {
|
|
869
|
+
"@typescript-eslint/explicit-function-return-type": "off"
|
|
870
|
+
}
|
|
857
871
|
}
|
|
858
872
|
] : [],
|
|
859
873
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -23,7 +23,7 @@ const base$b = {
|
|
|
23
23
|
rules: {
|
|
24
24
|
"array-callback-return": ["error", { allowImplicit: true }],
|
|
25
25
|
"block-scoped-var": "error",
|
|
26
|
-
"callback-return":
|
|
26
|
+
"callback-return": "off",
|
|
27
27
|
"class-methods-use-this": "off",
|
|
28
28
|
"default-case": ["error", { commentPattern: "^no default$" }],
|
|
29
29
|
"default-case-last": "error",
|
|
@@ -796,6 +796,13 @@ function tsEslintConfig(options) {
|
|
|
796
796
|
name: "eslint-config-decent/tsx",
|
|
797
797
|
files: ["**/*.tsx"],
|
|
798
798
|
...configs$4.base
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
name: "eslint-config-decent/tsx-disable-ts-rules",
|
|
802
|
+
files: ["**/*.tsx"],
|
|
803
|
+
rules: {
|
|
804
|
+
"@typescript-eslint/explicit-function-return-type": "off"
|
|
805
|
+
}
|
|
799
806
|
}
|
|
800
807
|
] : [],
|
|
801
808
|
{
|
|
@@ -831,8 +838,15 @@ function tsEslintConfig(options) {
|
|
|
831
838
|
...enableTestingLibrary ? [
|
|
832
839
|
{
|
|
833
840
|
name: "eslint-config-decent/testing-library",
|
|
834
|
-
files: ["**/__tests__/**/*.ts?(x)", "**/*.{spec,test}.ts?(x)"],
|
|
841
|
+
files: ["**/__tests__/**/*.ts?(x)", "**/*.{spec,test,tests}.ts?(x)"],
|
|
835
842
|
...configs$2.base
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
name: "eslint-config-decent/testing-library-disable-ts-rules",
|
|
846
|
+
files: ["**/__tests__/**/*.ts?(x)", "**/*.{spec,test,tests}.ts?(x)"],
|
|
847
|
+
rules: {
|
|
848
|
+
"@typescript-eslint/explicit-function-return-type": "off"
|
|
849
|
+
}
|
|
836
850
|
}
|
|
837
851
|
] : [],
|
|
838
852
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-decent",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "A decent ESLint configuration",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -72,14 +72,14 @@
|
|
|
72
72
|
"node": ">=20.11.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@eslint/compat": "1.2.
|
|
76
|
-
"@eslint/js": "9.
|
|
77
|
-
"@typescript-eslint/utils": "8.
|
|
75
|
+
"@eslint/compat": "1.2.6",
|
|
76
|
+
"@eslint/js": "9.20.0",
|
|
77
|
+
"@typescript-eslint/utils": "8.23.0",
|
|
78
78
|
"eslint-config-prettier": "10.0.1",
|
|
79
79
|
"eslint-plugin-import-x": "4.6.1",
|
|
80
80
|
"eslint-plugin-jest": "28.11.0",
|
|
81
81
|
"eslint-plugin-jest-dom": "5.5.0",
|
|
82
|
-
"eslint-plugin-jsdoc": "50.6.
|
|
82
|
+
"eslint-plugin-jsdoc": "50.6.3",
|
|
83
83
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
84
84
|
"eslint-plugin-mocha": "10.5.0",
|
|
85
85
|
"eslint-plugin-prettier": "5.2.3",
|
|
@@ -90,15 +90,15 @@
|
|
|
90
90
|
"eslint-plugin-testing-library": "7.1.1",
|
|
91
91
|
"eslint-plugin-unicorn": "56.0.1",
|
|
92
92
|
"globals": "15.14.0",
|
|
93
|
-
"typescript-eslint": "8.
|
|
93
|
+
"typescript-eslint": "8.23.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@swc/core": "^1.10.
|
|
96
|
+
"@swc/core": "^1.10.15",
|
|
97
97
|
"@types/node": ">=22",
|
|
98
|
-
"eslint": "^9.
|
|
98
|
+
"eslint": "^9.20.0",
|
|
99
99
|
"husky": "^9.1.7",
|
|
100
|
-
"lint-staged": "^15.4.
|
|
101
|
-
"markdownlint-cli": "^0.
|
|
100
|
+
"lint-staged": "^15.4.3",
|
|
101
|
+
"markdownlint-cli": "^0.44.0",
|
|
102
102
|
"npm-run-all": "^4.1.5",
|
|
103
103
|
"pinst": "^3.0.0",
|
|
104
104
|
"prettier": "^3.4.2",
|
package/src/eslint.ts
CHANGED
|
@@ -4,7 +4,7 @@ const base: TSESLint.FlatConfig.Config = {
|
|
|
4
4
|
rules: {
|
|
5
5
|
'array-callback-return': ['error', { allowImplicit: true }],
|
|
6
6
|
'block-scoped-var': 'error',
|
|
7
|
-
'callback-return':
|
|
7
|
+
'callback-return': 'off',
|
|
8
8
|
'class-methods-use-this': 'off',
|
|
9
9
|
'default-case': ['error', { commentPattern: '^no default$' }],
|
|
10
10
|
'default-case-last': 'error',
|
package/src/index.ts
CHANGED
|
@@ -118,13 +118,20 @@ export function tsEslintConfig(options?: DefaultConfigOptions): ConfigWithExtend
|
|
|
118
118
|
...typescriptEslintConfigs.base,
|
|
119
119
|
},
|
|
120
120
|
...(enableReact
|
|
121
|
-
? [
|
|
121
|
+
? ([
|
|
122
122
|
{
|
|
123
123
|
name: 'eslint-config-decent/tsx',
|
|
124
124
|
files: ['**/*.tsx'],
|
|
125
125
|
...reactConfigs.base,
|
|
126
126
|
},
|
|
127
|
-
|
|
127
|
+
{
|
|
128
|
+
name: 'eslint-config-decent/tsx-disable-ts-rules',
|
|
129
|
+
files: ['**/*.tsx'],
|
|
130
|
+
rules: {
|
|
131
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
] as TSESLint.FlatConfig.Config[])
|
|
128
135
|
: []),
|
|
129
136
|
{
|
|
130
137
|
name: 'eslint-config-decent/cjs-and-esm',
|
|
@@ -163,14 +170,21 @@ export function tsEslintConfig(options?: DefaultConfigOptions): ConfigWithExtend
|
|
|
163
170
|
]
|
|
164
171
|
: []),
|
|
165
172
|
...(enableTestingLibrary
|
|
166
|
-
? [
|
|
173
|
+
? ([
|
|
167
174
|
{
|
|
168
175
|
name: 'eslint-config-decent/testing-library',
|
|
169
|
-
files: ['**/__tests__/**/*.ts?(x)', '**/*.{spec,test}.ts?(x)'],
|
|
176
|
+
files: ['**/__tests__/**/*.ts?(x)', '**/*.{spec,test,tests}.ts?(x)'],
|
|
170
177
|
|
|
171
178
|
...testingLibraryConfigs.base,
|
|
172
179
|
},
|
|
173
|
-
|
|
180
|
+
{
|
|
181
|
+
name: 'eslint-config-decent/testing-library-disable-ts-rules',
|
|
182
|
+
files: ['**/__tests__/**/*.ts?(x)', '**/*.{spec,test,tests}.ts?(x)'],
|
|
183
|
+
rules: {
|
|
184
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
] as TSESLint.FlatConfig.Config[])
|
|
174
188
|
: []),
|
|
175
189
|
{
|
|
176
190
|
name: 'eslint-config-decent/cjs-and-esm-disable-ts-rules',
|