@nihalgonsalves/esconfig 0.16.2 → 0.16.4
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/.oxlintrc.json +7 -75
- package/.oxlintrc.react.json +1 -19
- package/README.md +10 -22
- package/package.json +13 -13
package/.oxlintrc.json
CHANGED
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
"suspicious": "error",
|
|
6
6
|
"perf": "error"
|
|
7
7
|
},
|
|
8
|
-
"options": {
|
|
9
|
-
"typeAware": true
|
|
10
|
-
},
|
|
11
8
|
"env": {
|
|
12
9
|
"builtin": true
|
|
13
10
|
},
|
|
14
11
|
"plugins": ["typescript", "import", "unicorn"],
|
|
12
|
+
"options": {
|
|
13
|
+
"typeAware": true,
|
|
14
|
+
"typeCheck": true,
|
|
15
|
+
"reportUnusedDisableDirectives": "error"
|
|
16
|
+
},
|
|
15
17
|
"rules": {
|
|
16
18
|
// 2026-02-16 migration from eslint skipped 15 unsupported rules
|
|
17
19
|
// - import/no-extraneous-dependencies: [
|
|
@@ -35,8 +37,6 @@
|
|
|
35
37
|
// optionalDependencies: false,
|
|
36
38
|
// },
|
|
37
39
|
// ],
|
|
38
|
-
// - no-octal
|
|
39
|
-
// - object-shorthand
|
|
40
40
|
// - typescript/dot-notation
|
|
41
41
|
// - typescript/method-signature-style
|
|
42
42
|
// - typescript/naming-convention
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
"arrow-body-style": "error",
|
|
50
50
|
"class-methods-use-this": "error",
|
|
51
51
|
"default-param-last": ["error"],
|
|
52
|
-
"for-direction": "error",
|
|
53
52
|
"func-style": ["error", "expression"],
|
|
54
53
|
"import/extensions": [
|
|
55
54
|
"error",
|
|
@@ -70,40 +69,13 @@
|
|
|
70
69
|
}
|
|
71
70
|
],
|
|
72
71
|
"no-array-constructor": "error",
|
|
73
|
-
"no-async-promise-executor": "error",
|
|
74
72
|
"no-case-declarations": "error",
|
|
75
|
-
"no-compare-neg-zero": "error",
|
|
76
|
-
"no-cond-assign": "error",
|
|
77
|
-
"no-constant-binary-expression": "error",
|
|
78
|
-
"no-constant-condition": "error",
|
|
79
|
-
"no-control-regex": "error",
|
|
80
|
-
"no-debugger": "error",
|
|
81
|
-
"no-delete-var": "error",
|
|
82
|
-
"no-dupe-else-if": "error",
|
|
83
|
-
"no-duplicate-case": "error",
|
|
84
73
|
"no-empty": "error",
|
|
85
|
-
"no-empty-character-class": "error",
|
|
86
74
|
"no-empty-function": "error",
|
|
87
|
-
"no-empty-pattern": "error",
|
|
88
|
-
"no-empty-static-block": "error",
|
|
89
|
-
"no-ex-assign": "error",
|
|
90
|
-
"no-extra-boolean-cast": "error",
|
|
91
75
|
"no-fallthrough": "error",
|
|
92
|
-
"no-global-assign": "error",
|
|
93
|
-
"no-invalid-regexp": "error",
|
|
94
|
-
"no-irregular-whitespace": "error",
|
|
95
76
|
"no-loop-func": ["error"],
|
|
96
|
-
"no-loss-of-precision": "error",
|
|
97
|
-
"no-misleading-character-class": "error",
|
|
98
|
-
"no-nonoctal-decimal-escape": "error",
|
|
99
77
|
"no-prototype-builtins": "error",
|
|
100
78
|
"no-regex-spaces": "error",
|
|
101
|
-
"no-self-assign": "error",
|
|
102
|
-
"no-shadow": ["error"],
|
|
103
|
-
"no-shadow-restricted-names": "error",
|
|
104
|
-
"no-sparse-arrays": "error",
|
|
105
|
-
"no-unsafe-finally": "error",
|
|
106
|
-
"no-unsafe-optional-chaining": "error",
|
|
107
79
|
"no-unused-expressions": [
|
|
108
80
|
"error",
|
|
109
81
|
{
|
|
@@ -113,8 +85,6 @@
|
|
|
113
85
|
"enforceForJSX": false
|
|
114
86
|
}
|
|
115
87
|
],
|
|
116
|
-
"no-unused-labels": "error",
|
|
117
|
-
"no-unused-private-class-members": "error",
|
|
118
88
|
"no-unused-vars": [
|
|
119
89
|
"error",
|
|
120
90
|
{
|
|
@@ -132,19 +102,13 @@
|
|
|
132
102
|
"variables": true
|
|
133
103
|
}
|
|
134
104
|
],
|
|
135
|
-
"no-useless-backreference": "error",
|
|
136
|
-
"no-useless-catch": "error",
|
|
137
|
-
"no-useless-constructor": "error",
|
|
138
|
-
"no-useless-escape": "error",
|
|
139
|
-
"no-useless-rename": "error",
|
|
140
105
|
"no-var": "error",
|
|
106
|
+
"object-shorthand": "error",
|
|
141
107
|
"prefer-const": "error",
|
|
142
108
|
"prefer-rest-params": "error",
|
|
143
109
|
"prefer-spread": "error",
|
|
144
|
-
"require-yield": "error",
|
|
145
110
|
"typescript/adjacent-overload-signatures": "error",
|
|
146
111
|
"typescript/array-type": "error",
|
|
147
|
-
"typescript/await-thenable": "error",
|
|
148
112
|
"typescript/ban-ts-comment": [
|
|
149
113
|
"error",
|
|
150
114
|
{
|
|
@@ -166,61 +130,34 @@
|
|
|
166
130
|
"fixStyle": "inline-type-imports"
|
|
167
131
|
}
|
|
168
132
|
],
|
|
169
|
-
"typescript/no-array-delete": "error",
|
|
170
|
-
"typescript/no-base-to-string": "error",
|
|
171
|
-
"typescript/no-confusing-non-null-assertion": "error",
|
|
172
133
|
"typescript/no-confusing-void-expression": "error",
|
|
173
134
|
"typescript/no-deprecated": "error",
|
|
174
|
-
"typescript/no-duplicate-enum-values": "error",
|
|
175
|
-
"typescript/no-duplicate-type-constituents": "error",
|
|
176
135
|
"typescript/no-dynamic-delete": "error",
|
|
177
136
|
"typescript/no-empty-object-type": "error",
|
|
178
137
|
"typescript/no-explicit-any": "error",
|
|
179
|
-
"typescript/no-extra-non-null-assertion": "error",
|
|
180
|
-
"typescript/no-extraneous-class": "error",
|
|
181
|
-
"typescript/no-floating-promises": "error",
|
|
182
|
-
"typescript/no-for-in-array": "error",
|
|
183
|
-
"typescript/no-implied-eval": "error",
|
|
184
138
|
"typescript/no-import-type-side-effects": "error",
|
|
185
139
|
"typescript/no-inferrable-types": "error",
|
|
186
140
|
"typescript/no-invalid-void-type": "error",
|
|
187
|
-
"typescript/no-meaningless-void-operator": "error",
|
|
188
|
-
"typescript/no-misused-new": "error",
|
|
189
141
|
"typescript/no-misused-promises": "error",
|
|
190
|
-
"typescript/no-misused-spread": "error",
|
|
191
142
|
"typescript/no-mixed-enums": "error",
|
|
192
143
|
"typescript/no-namespace": "error",
|
|
193
144
|
"typescript/no-non-null-asserted-nullish-coalescing": "error",
|
|
194
|
-
"typescript/no-non-null-asserted-optional-chain": "error",
|
|
195
145
|
"typescript/no-non-null-assertion": "error",
|
|
196
|
-
"typescript/no-redundant-type-constituents": "error",
|
|
197
146
|
"typescript/no-require-imports": "error",
|
|
198
|
-
"typescript/no-this-alias": "error",
|
|
199
|
-
"typescript/no-unnecessary-boolean-literal-compare": "error",
|
|
200
147
|
"typescript/no-unnecessary-condition": "error",
|
|
201
|
-
"typescript/no-unnecessary-template-expression": "error",
|
|
202
|
-
"typescript/no-unnecessary-type-arguments": "error",
|
|
203
|
-
"typescript/no-unnecessary-type-assertion": "error",
|
|
204
|
-
"typescript/no-unnecessary-type-constraint": "error",
|
|
205
148
|
"typescript/no-unsafe-argument": "error",
|
|
206
149
|
"typescript/no-unsafe-assignment": "error",
|
|
207
150
|
"typescript/no-unsafe-call": "error",
|
|
208
|
-
"typescript/no-unsafe-declaration-merging": "error",
|
|
209
|
-
"typescript/no-unsafe-enum-comparison": "error",
|
|
210
151
|
"typescript/no-unsafe-function-type": "error",
|
|
211
152
|
"typescript/no-unsafe-member-access": "error",
|
|
212
153
|
"typescript/no-unsafe-return": "error",
|
|
213
|
-
"typescript/no-unsafe-unary-minus": "error",
|
|
214
|
-
"typescript/no-wrapper-object-types": "error",
|
|
215
154
|
"typescript/non-nullable-type-assertion-style": "error",
|
|
216
155
|
"typescript/only-throw-error": "error",
|
|
217
|
-
"typescript/prefer-as-const": "error",
|
|
218
156
|
"typescript/prefer-enum-initializers": "error",
|
|
219
157
|
"typescript/prefer-for-of": "error",
|
|
220
158
|
"typescript/prefer-function-type": "error",
|
|
221
159
|
"typescript/prefer-includes": "error",
|
|
222
160
|
"typescript/prefer-literal-enum-member": "error",
|
|
223
|
-
"typescript/prefer-namespace-keyword": "error",
|
|
224
161
|
"typescript/prefer-nullish-coalescing": [
|
|
225
162
|
"error",
|
|
226
163
|
{
|
|
@@ -236,7 +173,6 @@
|
|
|
236
173
|
"typescript/prefer-return-this-type": "error",
|
|
237
174
|
"typescript/promise-function-async": "error",
|
|
238
175
|
"typescript/related-getter-setter-pairs": "error",
|
|
239
|
-
"typescript/require-array-sort-compare": "error",
|
|
240
176
|
"typescript/restrict-plus-operands": [
|
|
241
177
|
"error",
|
|
242
178
|
{
|
|
@@ -269,12 +205,8 @@
|
|
|
269
205
|
"requireDefaultForNonUnion": true
|
|
270
206
|
}
|
|
271
207
|
],
|
|
272
|
-
"typescript/triple-slash-reference": "error",
|
|
273
|
-
"typescript/unbound-method": "error",
|
|
274
208
|
"typescript/unified-signatures": "error",
|
|
275
|
-
"typescript/use-unknown-in-catch-callback-variable": "error"
|
|
276
|
-
"use-isnan": "error",
|
|
277
|
-
"valid-typeof": "error"
|
|
209
|
+
"typescript/use-unknown-in-catch-callback-variable": "error"
|
|
278
210
|
},
|
|
279
211
|
"overrides": [
|
|
280
212
|
{
|
package/.oxlintrc.react.json
CHANGED
|
@@ -48,17 +48,7 @@
|
|
|
48
48
|
// eslint-plugin-react recommended + jsx-runtime rules
|
|
49
49
|
"react/display-name": "error",
|
|
50
50
|
// "react/jsx-key": "error",
|
|
51
|
-
"react/jsx-no-comment-textnodes": "error",
|
|
52
|
-
"react/jsx-no-duplicate-props": "error",
|
|
53
51
|
"react/jsx-no-target-blank": "error",
|
|
54
|
-
"react/jsx-no-undef": "error",
|
|
55
|
-
"react/no-children-prop": "error",
|
|
56
|
-
"react/no-danger-with-children": "error",
|
|
57
|
-
"react/no-direct-mutation-state": "error",
|
|
58
|
-
"react/no-find-dom-node": "error",
|
|
59
|
-
"react/no-is-mounted": "error",
|
|
60
|
-
"react/no-render-return-value": "error",
|
|
61
|
-
"react/no-string-refs": "error",
|
|
62
52
|
"react/no-unescaped-entities": "error",
|
|
63
53
|
"react/no-unknown-property": "error",
|
|
64
54
|
"react/require-render-return": "error",
|
|
@@ -214,7 +204,6 @@
|
|
|
214
204
|
"depth": 25
|
|
215
205
|
}
|
|
216
206
|
],
|
|
217
|
-
"jsx-a11y/lang": "error",
|
|
218
207
|
"jsx-a11y/media-has-caption": [
|
|
219
208
|
"error",
|
|
220
209
|
{
|
|
@@ -223,8 +212,6 @@
|
|
|
223
212
|
"track": []
|
|
224
213
|
}
|
|
225
214
|
],
|
|
226
|
-
"jsx-a11y/mouse-events-have-key-events": "error",
|
|
227
|
-
"jsx-a11y/no-access-key": "error",
|
|
228
215
|
"jsx-a11y/no-autofocus": [
|
|
229
216
|
"error",
|
|
230
217
|
{
|
|
@@ -245,17 +232,12 @@
|
|
|
245
232
|
"allowExpressionValues": true
|
|
246
233
|
}
|
|
247
234
|
],
|
|
248
|
-
"jsx-a11y/no-redundant-roles": "error",
|
|
249
235
|
"jsx-a11y/no-static-element-interactions": [
|
|
250
236
|
"error",
|
|
251
237
|
{
|
|
252
238
|
"handlers": ["onClick", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"]
|
|
253
239
|
}
|
|
254
|
-
]
|
|
255
|
-
"jsx-a11y/role-has-required-aria-props": "error",
|
|
256
|
-
"jsx-a11y/role-supports-aria-props": "error",
|
|
257
|
-
"jsx-a11y/scope": "error",
|
|
258
|
-
"jsx-a11y/tabindex-no-positive": "error"
|
|
240
|
+
]
|
|
259
241
|
// not implemented in oxlint yet:
|
|
260
242
|
// - jsx-a11y/control-has-associated-label
|
|
261
243
|
// - jsx-a11y/interactive-supports-focus
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# esconfig
|
|
2
2
|
|
|
3
|
-
Shared ECMAScript Config (TypeScript, oxlint, oxfmt
|
|
3
|
+
Shared ECMAScript Config (TypeScript, oxlint, oxfmt)
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
@@ -8,8 +8,6 @@ Shared ECMAScript Config (TypeScript, oxlint, oxfmt, optional eslint)
|
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
pnpm add -D @nihalgonsalves/esconfig typescript oxlint oxlint-tsgolint oxfmt
|
|
11
|
-
# optionally for react:
|
|
12
|
-
pnpm add -D eslint
|
|
13
11
|
```
|
|
14
12
|
|
|
15
13
|
2. `tsconfig.json`
|
|
@@ -29,37 +27,27 @@ Shared ECMAScript Config (TypeScript, oxlint, oxfmt, optional eslint)
|
|
|
29
27
|
|
|
30
28
|
4. `.oxlintrc.json`
|
|
31
29
|
|
|
32
|
-
```
|
|
30
|
+
```jsonc
|
|
33
31
|
{
|
|
34
|
-
"extends": [
|
|
32
|
+
"extends": [
|
|
33
|
+
"node_modules/@nihalgonsalves/esconfig/.oxlintrc.json",
|
|
34
|
+
// optional:
|
|
35
|
+
"node_modules/@nihalgonsalves/esconfig/.oxlintrc.react.json",
|
|
36
|
+
],
|
|
35
37
|
}
|
|
36
38
|
```
|
|
37
39
|
|
|
38
|
-
5.
|
|
39
|
-
|
|
40
|
-
```js
|
|
41
|
-
import tseslint from "typescript-eslint";
|
|
42
|
-
|
|
43
|
-
import sharedConfig from "@nihalgonsalves/esconfig/eslint.config.react-shared";
|
|
44
|
-
|
|
45
|
-
export default tseslint.config(
|
|
46
|
-
{ ignores: [] },
|
|
47
|
-
...sharedConfig,
|
|
48
|
-
// ... others
|
|
49
|
-
);
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
6. `package.json`
|
|
40
|
+
5. `package.json`
|
|
53
41
|
|
|
54
42
|
```json
|
|
55
43
|
{
|
|
56
44
|
"scripts": {
|
|
57
45
|
"build": "tsc",
|
|
58
|
-
"lint": "oxlint
|
|
46
|
+
"lint": "oxlint",
|
|
59
47
|
"format": "oxfmt",
|
|
60
48
|
"format:check": "oxfmt --check"
|
|
61
49
|
}
|
|
62
50
|
}
|
|
63
51
|
```
|
|
64
52
|
|
|
65
|
-
|
|
53
|
+
6. Done! Don't forget to run `build`, `lint` and `format:check` in your CI workflow.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nihalgonsalves/esconfig",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
4
4
|
"description": "Shared ECMAScript Config (TypeScript, oxlint, oxfmt, eslint)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nihal Gonsalves <nihal@nihalgonsalves.com>",
|
|
@@ -21,23 +21,23 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@commitlint/cli": "^20.4.
|
|
25
|
-
"@commitlint/config-conventional": "^20.4.
|
|
26
|
-
"@types/node": "^24.
|
|
27
|
-
"knip": "^5.
|
|
28
|
-
"lefthook": "^2.1.
|
|
29
|
-
"oxfmt": "^0.
|
|
30
|
-
"oxlint": "^1.
|
|
31
|
-
"oxlint-tsgolint": "^0.
|
|
24
|
+
"@commitlint/cli": "^20.4.4",
|
|
25
|
+
"@commitlint/config-conventional": "^20.4.4",
|
|
26
|
+
"@types/node": "^24.12.0",
|
|
27
|
+
"knip": "^5.86.0",
|
|
28
|
+
"lefthook": "^2.1.4",
|
|
29
|
+
"oxfmt": "^0.40.0",
|
|
30
|
+
"oxlint": "^1.55.0",
|
|
31
|
+
"oxlint-tsgolint": "^0.16.0",
|
|
32
32
|
"typescript": "^5.9.3"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
36
36
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
37
|
-
"eslint-plugin-storybook": "^10.2.
|
|
37
|
+
"eslint-plugin-storybook": "^10.2.16",
|
|
38
38
|
"eslint-plugin-testing-library": "^7.16.0",
|
|
39
|
-
"oxlint": "^1.
|
|
40
|
-
"oxlint-tsgolint": "^0.
|
|
39
|
+
"oxlint": "^1.55.0",
|
|
40
|
+
"oxlint-tsgolint": "^0.16.0",
|
|
41
41
|
"typescript": "^5.9.3"
|
|
42
42
|
},
|
|
43
43
|
"peerDependenciesMeta": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"typecheck": "tsc --noEmit",
|
|
59
|
-
"lint": "oxlint
|
|
59
|
+
"lint": "oxlint && knip",
|
|
60
60
|
"format": "oxfmt",
|
|
61
61
|
"format:check": "oxfmt --check"
|
|
62
62
|
}
|