@nihalgonsalves/esconfig 0.16.3 → 0.16.5

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 CHANGED
@@ -9,6 +9,11 @@
9
9
  "builtin": true
10
10
  },
11
11
  "plugins": ["typescript", "import", "unicorn"],
12
+ "options": {
13
+ "typeAware": true,
14
+ "typeCheck": true,
15
+ "reportUnusedDisableDirectives": "error"
16
+ },
12
17
  "rules": {
13
18
  // 2026-02-16 migration from eslint skipped 15 unsupported rules
14
19
  // - import/no-extraneous-dependencies: [
@@ -32,8 +37,6 @@
32
37
  // optionalDependencies: false,
33
38
  // },
34
39
  // ],
35
- // - no-octal
36
- // - object-shorthand
37
40
  // - typescript/dot-notation
38
41
  // - typescript/method-signature-style
39
42
  // - typescript/naming-convention
@@ -46,7 +49,6 @@
46
49
  "arrow-body-style": "error",
47
50
  "class-methods-use-this": "error",
48
51
  "default-param-last": ["error"],
49
- "for-direction": "error",
50
52
  "func-style": ["error", "expression"],
51
53
  "import/extensions": [
52
54
  "error",
@@ -67,40 +69,13 @@
67
69
  }
68
70
  ],
69
71
  "no-array-constructor": "error",
70
- "no-async-promise-executor": "error",
71
72
  "no-case-declarations": "error",
72
- "no-compare-neg-zero": "error",
73
- "no-cond-assign": "error",
74
- "no-constant-binary-expression": "error",
75
- "no-constant-condition": "error",
76
- "no-control-regex": "error",
77
- "no-debugger": "error",
78
- "no-delete-var": "error",
79
- "no-dupe-else-if": "error",
80
- "no-duplicate-case": "error",
81
73
  "no-empty": "error",
82
- "no-empty-character-class": "error",
83
74
  "no-empty-function": "error",
84
- "no-empty-pattern": "error",
85
- "no-empty-static-block": "error",
86
- "no-ex-assign": "error",
87
- "no-extra-boolean-cast": "error",
88
75
  "no-fallthrough": "error",
89
- "no-global-assign": "error",
90
- "no-invalid-regexp": "error",
91
- "no-irregular-whitespace": "error",
92
76
  "no-loop-func": ["error"],
93
- "no-loss-of-precision": "error",
94
- "no-misleading-character-class": "error",
95
- "no-nonoctal-decimal-escape": "error",
96
77
  "no-prototype-builtins": "error",
97
78
  "no-regex-spaces": "error",
98
- "no-self-assign": "error",
99
- "no-shadow": ["error"],
100
- "no-shadow-restricted-names": "error",
101
- "no-sparse-arrays": "error",
102
- "no-unsafe-finally": "error",
103
- "no-unsafe-optional-chaining": "error",
104
79
  "no-unused-expressions": [
105
80
  "error",
106
81
  {
@@ -110,8 +85,6 @@
110
85
  "enforceForJSX": false
111
86
  }
112
87
  ],
113
- "no-unused-labels": "error",
114
- "no-unused-private-class-members": "error",
115
88
  "no-unused-vars": [
116
89
  "error",
117
90
  {
@@ -129,19 +102,13 @@
129
102
  "variables": true
130
103
  }
131
104
  ],
132
- "no-useless-backreference": "error",
133
- "no-useless-catch": "error",
134
- "no-useless-constructor": "error",
135
- "no-useless-escape": "error",
136
- "no-useless-rename": "error",
137
105
  "no-var": "error",
106
+ "object-shorthand": "error",
138
107
  "prefer-const": "error",
139
108
  "prefer-rest-params": "error",
140
109
  "prefer-spread": "error",
141
- "require-yield": "error",
142
110
  "typescript/adjacent-overload-signatures": "error",
143
111
  "typescript/array-type": "error",
144
- "typescript/await-thenable": "error",
145
112
  "typescript/ban-ts-comment": [
146
113
  "error",
147
114
  {
@@ -163,61 +130,34 @@
163
130
  "fixStyle": "inline-type-imports"
164
131
  }
165
132
  ],
166
- "typescript/no-array-delete": "error",
167
- "typescript/no-base-to-string": "error",
168
- "typescript/no-confusing-non-null-assertion": "error",
169
133
  "typescript/no-confusing-void-expression": "error",
170
134
  "typescript/no-deprecated": "error",
171
- "typescript/no-duplicate-enum-values": "error",
172
- "typescript/no-duplicate-type-constituents": "error",
173
135
  "typescript/no-dynamic-delete": "error",
174
136
  "typescript/no-empty-object-type": "error",
175
137
  "typescript/no-explicit-any": "error",
176
- "typescript/no-extra-non-null-assertion": "error",
177
- "typescript/no-extraneous-class": "error",
178
- "typescript/no-floating-promises": "error",
179
- "typescript/no-for-in-array": "error",
180
- "typescript/no-implied-eval": "error",
181
138
  "typescript/no-import-type-side-effects": "error",
182
139
  "typescript/no-inferrable-types": "error",
183
140
  "typescript/no-invalid-void-type": "error",
184
- "typescript/no-meaningless-void-operator": "error",
185
- "typescript/no-misused-new": "error",
186
141
  "typescript/no-misused-promises": "error",
187
- "typescript/no-misused-spread": "error",
188
142
  "typescript/no-mixed-enums": "error",
189
143
  "typescript/no-namespace": "error",
190
144
  "typescript/no-non-null-asserted-nullish-coalescing": "error",
191
- "typescript/no-non-null-asserted-optional-chain": "error",
192
145
  "typescript/no-non-null-assertion": "error",
193
- "typescript/no-redundant-type-constituents": "error",
194
146
  "typescript/no-require-imports": "error",
195
- "typescript/no-this-alias": "error",
196
- "typescript/no-unnecessary-boolean-literal-compare": "error",
197
147
  "typescript/no-unnecessary-condition": "error",
198
- "typescript/no-unnecessary-template-expression": "error",
199
- "typescript/no-unnecessary-type-arguments": "error",
200
- "typescript/no-unnecessary-type-assertion": "error",
201
- "typescript/no-unnecessary-type-constraint": "error",
202
148
  "typescript/no-unsafe-argument": "error",
203
149
  "typescript/no-unsafe-assignment": "error",
204
150
  "typescript/no-unsafe-call": "error",
205
- "typescript/no-unsafe-declaration-merging": "error",
206
- "typescript/no-unsafe-enum-comparison": "error",
207
151
  "typescript/no-unsafe-function-type": "error",
208
152
  "typescript/no-unsafe-member-access": "error",
209
153
  "typescript/no-unsafe-return": "error",
210
- "typescript/no-unsafe-unary-minus": "error",
211
- "typescript/no-wrapper-object-types": "error",
212
154
  "typescript/non-nullable-type-assertion-style": "error",
213
155
  "typescript/only-throw-error": "error",
214
- "typescript/prefer-as-const": "error",
215
156
  "typescript/prefer-enum-initializers": "error",
216
157
  "typescript/prefer-for-of": "error",
217
158
  "typescript/prefer-function-type": "error",
218
159
  "typescript/prefer-includes": "error",
219
160
  "typescript/prefer-literal-enum-member": "error",
220
- "typescript/prefer-namespace-keyword": "error",
221
161
  "typescript/prefer-nullish-coalescing": [
222
162
  "error",
223
163
  {
@@ -233,7 +173,6 @@
233
173
  "typescript/prefer-return-this-type": "error",
234
174
  "typescript/promise-function-async": "error",
235
175
  "typescript/related-getter-setter-pairs": "error",
236
- "typescript/require-array-sort-compare": "error",
237
176
  "typescript/restrict-plus-operands": [
238
177
  "error",
239
178
  {
@@ -266,12 +205,8 @@
266
205
  "requireDefaultForNonUnion": true
267
206
  }
268
207
  ],
269
- "typescript/triple-slash-reference": "error",
270
- "typescript/unbound-method": "error",
271
208
  "typescript/unified-signatures": "error",
272
- "typescript/use-unknown-in-catch-callback-variable": "error",
273
- "use-isnan": "error",
274
- "valid-typeof": "error"
209
+ "typescript/use-unknown-in-catch-callback-variable": "error"
275
210
  },
276
211
  "overrides": [
277
212
  {
@@ -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, optional eslint)
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,41 +27,27 @@ Shared ECMAScript Config (TypeScript, oxlint, oxfmt, optional eslint)
29
27
 
30
28
  4. `.oxlintrc.json`
31
29
 
32
- ```json
30
+ ```jsonc
33
31
  {
34
- "extends": ["node_modules/@nihalgonsalves/esconfig/.oxlintrc.json"],
35
- "options": {
36
- "typeAware": true,
37
- "typeCheck": true
38
- }
32
+ "extends": [
33
+ "node_modules/@nihalgonsalves/esconfig/.oxlintrc.json",
34
+ // optional:
35
+ "node_modules/@nihalgonsalves/esconfig/.oxlintrc.react.json",
36
+ ],
39
37
  }
40
38
  ```
41
39
 
42
- 5. If you're using React, `eslint.config.js`:
43
-
44
- ```js
45
- import tseslint from "typescript-eslint";
46
-
47
- import sharedConfig from "@nihalgonsalves/esconfig/eslint.config.react-shared";
48
-
49
- export default tseslint.config(
50
- { ignores: [] },
51
- ...sharedConfig,
52
- // ... others
53
- );
54
- ```
55
-
56
- 6. `package.json`
40
+ 5. `package.json`
57
41
 
58
42
  ```json
59
43
  {
60
44
  "scripts": {
61
45
  "build": "tsc",
62
- "lint": "oxlint --type-aware --report-unused-disable-directives-severity=error && eslint ./src/",
46
+ "lint": "oxlint",
63
47
  "format": "oxfmt",
64
48
  "format:check": "oxfmt --check"
65
49
  }
66
50
  }
67
51
  ```
68
52
 
69
- 7. Done! Don't forget to run `build`, `lint` and `format:check` in your CI workflow.
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",
3
+ "version": "0.16.5",
4
4
  "description": "Shared ECMAScript Config (TypeScript, oxlint, oxfmt, eslint)",
5
5
  "license": "MIT",
6
6
  "author": "Nihal Gonsalves <nihal@nihalgonsalves.com>",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {},
23
23
  "devDependencies": {
24
- "@commitlint/cli": "^20.4.3",
25
- "@commitlint/config-conventional": "^20.4.3",
26
- "@types/node": "^24.11.0",
27
- "knip": "^5.86.0",
28
- "lefthook": "^2.1.3",
29
- "oxfmt": "^0.36.0",
30
- "oxlint": "^1.51.0",
31
- "oxlint-tsgolint": "^0.16.0",
24
+ "@commitlint/cli": "^20.5.0",
25
+ "@commitlint/config-conventional": "^20.5.0",
26
+ "@types/node": "^24.12.0",
27
+ "knip": "^5.87.0",
28
+ "lefthook": "^2.1.4",
29
+ "oxfmt": "^0.41.0",
30
+ "oxlint": "^1.56.0",
31
+ "oxlint-tsgolint": "^0.17.0",
32
32
  "typescript": "^5.9.3"
33
33
  },
34
34
  "peerDependencies": {
@@ -36,8 +36,8 @@
36
36
  "eslint-plugin-react-hooks": "^7.0.1",
37
37
  "eslint-plugin-storybook": "^10.2.16",
38
38
  "eslint-plugin-testing-library": "^7.16.0",
39
- "oxlint": "^1.51.0",
40
- "oxlint-tsgolint": "^0.16.0",
39
+ "oxlint": "^1.56.0",
40
+ "oxlint-tsgolint": "^0.17.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 --type-aware --type-check --report-unused-disable-directives-severity=error && knip",
59
+ "lint": "oxlint && knip",
60
60
  "format": "oxfmt",
61
61
  "format:check": "oxfmt --check"
62
62
  }