eslint-config-conventions 20.1.1 β†’ 20.1.2

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.
Files changed (3) hide show
  1. package/.oxlintrc.json +100 -13
  2. package/README.md +13 -4
  3. package/package.json +28 -8
package/.oxlintrc.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "$schema": "./node_modules/oxlint/configuration_schema.json",
3
- "plugins": ["promise", "unicorn", "import"],
3
+ "plugins": ["typescript", "unicorn", "react", "oxc", "jsx-a11y", "promise"],
4
4
  "categories": {
5
- "correctness": "off"
5
+ "correctness": "error",
6
+ "perf": "error",
7
+ "suspicious": "error"
6
8
  },
7
9
  "env": {
8
10
  "builtin": true,
9
- "es2025": true,
10
11
  "browser": true,
11
- "commonjs": true,
12
12
  "node": true,
13
13
  "shared-node-browser": true
14
14
  },
15
15
  "rules": {
16
+ "no-await-in-loop": "off",
16
17
  "for-direction": "error",
17
18
  "no-async-promise-executor": "error",
18
19
  "no-class-assign": "error",
@@ -159,6 +160,7 @@
159
160
  "yoda": ["error", "never"],
160
161
  "curly": ["error", "all"],
161
162
  "func-style": ["error", "expression"],
163
+ "arrow-body-style": ["error", "always"],
162
164
  "promise/param-names": "error",
163
165
  "promise/no-new-statics": "error",
164
166
  "promise/no-nesting": "error",
@@ -190,19 +192,60 @@
190
192
  "unicorn/no-unnecessary-array-flat-depth": "error",
191
193
  "unicorn/consistent-assert": "error",
192
194
  "unicorn/no-accessor-recursion": "error",
193
- "import-x/no-absolute-path": "error",
194
- "import-x/no-webpack-loader-syntax": "error",
195
- "import-x/no-self-import": "error",
196
- "import-x/no-duplicates": "error",
197
- "import-x/no-named-default": "error",
198
- "import-x/no-empty-named-blocks": "error",
199
- "import-x/no-anonymous-default-export": "error",
200
- "import-x/consistent-type-specifier-style": ["error", "prefer-top-level"]
195
+ "react-hooks/rules-of-hooks": "error",
196
+ "react-hooks/exhaustive-deps": "error",
197
+ "react/jsx-key": "error",
198
+ "react/jsx-no-comment-textnodes": "error",
199
+ "react/jsx-no-duplicate-props": "error",
200
+ "react/jsx-no-target-blank": "off",
201
+ "react/jsx-no-undef": "error",
202
+ "react/no-children-prop": "error",
203
+ "react/no-danger-with-children": "error",
204
+ "react/no-direct-mutation-state": "error",
205
+ "react/no-find-dom-node": "error",
206
+ "react/no-is-mounted": "error",
207
+ "react/no-render-return-value": "error",
208
+ "react/no-string-refs": "error",
209
+ "react/no-unescaped-entities": "error",
210
+ "react/no-unknown-property": "off",
211
+ "react/react-in-jsx-scope": "off",
212
+ "react/iframe-missing-sandbox": "off",
213
+ "react/self-closing-comp": [
214
+ "error",
215
+ {
216
+ "component": true,
217
+ "html": true
218
+ }
219
+ ],
220
+ "react/void-dom-elements-no-children": "error",
221
+ "react/jsx-boolean-value": "error",
222
+ "@next/next/google-font-display": "error",
223
+ "@next/next/google-font-preconnect": "error",
224
+ "@next/next/next-script-for-ga": "error",
225
+ "@next/next/no-async-client-component": "error",
226
+ "@next/next/no-before-interactive-script-outside-document": "error",
227
+ "@next/next/no-css-tags": "error",
228
+ "@next/next/no-head-element": "error",
229
+ "@next/next/no-html-link-for-pages": "off",
230
+ "@next/next/no-img-element": "off",
231
+ "@next/next/no-page-custom-font": "error",
232
+ "@next/next/no-styled-jsx-in-document": "error",
233
+ "@next/next/no-sync-scripts": "error",
234
+ "@next/next/no-title-in-document-head": "error",
235
+ "@next/next/no-typos": "error",
236
+ "@next/next/no-unwanted-polyfillio": "error",
237
+ "@next/next/inline-script-id": "error",
238
+ "@next/next/no-assign-module-variable": "error",
239
+ "@next/next/no-document-import-in-page": "error",
240
+ "@next/next/no-duplicate-head": "error",
241
+ "@next/next/no-head-import-in-document": "error",
242
+ "@next/next/no-script-component-in-head": "error"
201
243
  },
202
244
  "overrides": [
203
245
  {
204
246
  "files": ["**/*.ts", "**/*.tsx"],
205
247
  "rules": {
248
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
206
249
  "no-unused-vars": [
207
250
  "error",
208
251
  {
@@ -215,6 +258,7 @@
215
258
  "ignoreRestSiblings": true
216
259
  }
217
260
  ],
261
+ "@typescript-eslint/no-implied-eval": "error",
218
262
  "no-redeclare": [
219
263
  "error",
220
264
  {
@@ -222,6 +266,7 @@
222
266
  }
223
267
  ],
224
268
  "no-throw-literal": "off",
269
+ "@typescript-eslint/only-throw-error": "error",
225
270
  "no-unused-expressions": [
226
271
  "error",
227
272
  {
@@ -230,6 +275,7 @@
230
275
  "allowTaggedTemplates": true
231
276
  }
232
277
  ],
278
+ "@typescript-eslint/no-unnecessary-template-expression": "error",
233
279
  "@typescript-eslint/adjacent-overload-signatures": "error",
234
280
  "@typescript-eslint/no-unsafe-function-type": "error",
235
281
  "@typescript-eslint/no-wrapper-object-types": "error",
@@ -248,14 +294,29 @@
248
294
  "allowDirectConstAssertionInArrowFunctions": true
249
295
  }
250
296
  ],
297
+ "@typescript-eslint/no-base-to-string": "error",
251
298
  "@typescript-eslint/no-dynamic-delete": "error",
252
299
  "@typescript-eslint/no-extra-non-null-assertion": "error",
300
+ "@typescript-eslint/no-redundant-type-constituents": "error",
253
301
  "@typescript-eslint/no-extraneous-class": [
254
302
  "error",
255
303
  {
256
304
  "allowWithDecorator": true
257
305
  }
258
306
  ],
307
+ "@typescript-eslint/no-floating-promises": [
308
+ "error",
309
+ {
310
+ "allowForKnownSafeCalls": [
311
+ {
312
+ "from": "package",
313
+ "name": ["test", "it", "suite", "describe"],
314
+ "package": "node:test"
315
+ }
316
+ ]
317
+ }
318
+ ],
319
+ "@typescript-eslint/no-for-in-array": "error",
259
320
  "@typescript-eslint/no-misused-new": "error",
260
321
  "@typescript-eslint/no-non-null-asserted-optional-chain": "error",
261
322
  "@typescript-eslint/no-non-null-assertion": "error",
@@ -265,11 +326,37 @@
265
326
  "allowDestructuring": true
266
327
  }
267
328
  ],
329
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
330
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
268
331
  "@typescript-eslint/no-require-imports": "error",
332
+ "@typescript-eslint/no-unsafe-unary-minus": "error",
269
333
  "@typescript-eslint/no-unsafe-declaration-merging": "error",
334
+ "@typescript-eslint/no-array-delete": "error",
270
335
  "@typescript-eslint/prefer-as-const": "error",
271
336
  "@typescript-eslint/prefer-function-type": "error",
272
- "prefer-promise-reject-errors": "off"
337
+ "@typescript-eslint/prefer-reduce-type-parameter": "error",
338
+ "@typescript-eslint/prefer-return-this-type": "error",
339
+ "@typescript-eslint/promise-function-async": "error",
340
+ "prefer-promise-reject-errors": "off",
341
+ "@typescript-eslint/prefer-promise-reject-errors": "error",
342
+ "@typescript-eslint/require-array-sort-compare": [
343
+ "error",
344
+ {
345
+ "ignoreStringArrays": true
346
+ }
347
+ ],
348
+ "@typescript-eslint/restrict-plus-operands": [
349
+ "error",
350
+ {
351
+ "skipCompoundAssignments": true
352
+ }
353
+ ],
354
+ "@typescript-eslint/restrict-template-expressions": [
355
+ "error",
356
+ {
357
+ "allowNumber": true
358
+ }
359
+ ]
273
360
  },
274
361
  "plugins": ["typescript"]
275
362
  }
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  <a href="https://www.npmjs.com/package/eslint-config-conventions"><img src="https://img.shields.io/npm/v/eslint-config-conventions.svg" alt="npm version"></a>
18
18
  </p>
19
19
 
20
- ## πŸ“œ About
20
+ ## About
21
21
 
22
22
  **eslint-config-conventions** is a [ESLint](https://eslint.org) configuration to enforce strict conventions and good code quality. It supports both **JavaScript** and **TypeScript**.
23
23
 
@@ -25,7 +25,7 @@ This configuration is mostly **for catching bugs** and **code-quality** so it is
25
25
 
26
26
  More information about **formatting rules** vs **code-quality rules** can be found on [Prettier vs. Linters](https://prettier.io/docs/en/comparison.html).
27
27
 
28
- ## βš™οΈ Getting Started
28
+ ## Getting Started
29
29
 
30
30
  ### Prerequisites
31
31
 
@@ -113,12 +113,21 @@ node --run lint:eslint -- --fix
113
113
  node --run lint:prettier
114
114
  ```
115
115
 
116
- ## πŸ’‘ Contributing
116
+ ### `.oxlintrc.json` (if using [oxlint](https://oxc.rs/))
117
+
118
+ ```json
119
+ {
120
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
121
+ "extends": ["node_modules/eslint-config-conventions/.oxlintrc.json"]
122
+ }
123
+ ```
124
+
125
+ ## Contributing
117
126
 
118
127
  Anyone can help to improve the project, submit a Feature Request, a bug report or even correct a simple spelling mistake.
119
128
 
120
129
  The steps to contribute can be found in the [CONTRIBUTING.md](./CONTRIBUTING.md) file.
121
130
 
122
- ## πŸ“„ License
131
+ ## License
123
132
 
124
133
  [MIT](./LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-conventions",
3
- "version": "20.1.1",
3
+ "version": "20.1.2",
4
4
  "public": true,
5
5
  "description": "ESLint shareable config to enforce strict conventions and good code quality.",
6
6
  "author": "ThΓ©o LUDWIG <contact@theoludwig.fr>",
@@ -41,7 +41,7 @@
41
41
  "lint:editorconfig": "editorconfig-checker",
42
42
  "lint:eslint": "eslint . --max-warnings 0 --config eslint.config.mjs",
43
43
  "lint:prettier": "prettier . --check",
44
- "oxlint:migrate": "npx @oxlint/migrate",
44
+ "oxlint:migrate": "npx @oxlint/migrate@latest eslint.config.js --type-aware",
45
45
  "inspect": "eslint --inspect-config",
46
46
  "test": "node --test",
47
47
  "release": "semantic-release"
@@ -54,19 +54,39 @@
54
54
  "globals": "^16.0.0",
55
55
  "typescript-eslint": "^8.32.0"
56
56
  },
57
+ "peerDependenciesMeta": {
58
+ "eslint": {
59
+ "optional": true
60
+ },
61
+ "eslint-plugin-promise": {
62
+ "optional": true
63
+ },
64
+ "eslint-plugin-unicorn": {
65
+ "optional": true
66
+ },
67
+ "eslint-plugin-import-x": {
68
+ "optional": true
69
+ },
70
+ "globals": {
71
+ "optional": true
72
+ },
73
+ "typescript-eslint": {
74
+ "optional": true
75
+ }
76
+ },
57
77
  "devDependencies": {
58
- "@types/node": "24.1.0",
78
+ "@types/node": "24.3.0",
59
79
  "globals": "16.3.0",
60
80
  "editorconfig-checker": "6.1.0",
61
- "oxlint": "1.8.0",
62
- "@oxlint/migrate": "1.8.0",
63
- "eslint": "9.31.0",
81
+ "oxlint": "1.13.0",
82
+ "@oxlint/migrate": "1.13.0",
83
+ "eslint": "9.34.0",
64
84
  "eslint-plugin-promise": "7.2.1",
65
85
  "eslint-plugin-unicorn": "60.0.0",
66
86
  "eslint-plugin-import-x": "4.16.1",
67
- "typescript-eslint": "8.38.0",
87
+ "typescript-eslint": "8.41.0",
68
88
  "prettier": "3.6.2",
69
89
  "semantic-release": "24.2.7",
70
- "typescript": "5.8.3"
90
+ "typescript": "5.9.2"
71
91
  }
72
92
  }