@zhangyu1818/oxlint-config 2.3.0 → 2.5.0

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 (2) hide show
  1. package/dist/index.js +19 -1
  2. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -160,6 +160,7 @@ const javascriptRules = {
160
160
  "no-useless-return": "error",
161
161
  "no-var": "error",
162
162
  "no-with": "error",
163
+ "one-var": ["error", { initialized: "never" }],
163
164
  "object-shorthand": [
164
165
  "error",
165
166
  "always",
@@ -282,7 +283,15 @@ const jsxA11yRules = {
282
283
  "jsx-a11y/tabindex-no-positive": "error"
283
284
  };
284
285
  const baseReactRules = {
286
+ "react/error-boundaries": "error",
285
287
  "react/exhaustive-deps": "warn",
288
+ "react/function-component-definition": ["error", {
289
+ namedComponents: ["arrow-function", "function-declaration"],
290
+ unnamedComponents: "arrow-function"
291
+ }],
292
+ "react/globals": "error",
293
+ "react/immutability": "error",
294
+ "react/incompatible-library": "error",
286
295
  "react/jsx-boolean-value": "error",
287
296
  "react/jsx-curly-brace-presence": ["error", {
288
297
  children: "never",
@@ -306,14 +315,23 @@ const baseReactRules = {
306
315
  "react/no-unknown-property": "error",
307
316
  "react/no-unescaped-entities": "error",
308
317
  "react/no-unstable-nested-components": "error",
318
+ "react/preserve-manual-memoization": "error",
319
+ "react/purity": "error",
309
320
  "react/react-in-jsx-scope": "off",
321
+ "react/refs": "error",
310
322
  "react/require-render-return": "error",
311
323
  "react/rules-of-hooks": "error",
312
324
  "react/self-closing-comp": ["error", {
313
325
  component: true,
314
326
  html: true
315
327
  }],
316
- "react/void-dom-elements-no-children": "error"
328
+ "react/set-state-in-effect": "error",
329
+ "react/set-state-in-render": "error",
330
+ "react/static-components": "error",
331
+ "react/unsupported-syntax": "error",
332
+ "react/use-memo": "error",
333
+ "react/void-dom-elements-no-children": "error",
334
+ "react/void-use-memo": "error"
317
335
  };
318
336
  function createReactRules(options, nextEnabled) {
319
337
  const framework = options.framework ?? {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangyu1818/oxlint-config",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "Native Oxlint and Oxfmt config preset package",
5
5
  "keywords": [
6
6
  "oxc",
@@ -40,21 +40,21 @@
40
40
  "local-pkg": "^1.2.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@types/node": "^26.1.1",
44
- "oxfmt": "^0.58.0",
45
- "oxlint": "^1.73.0",
46
- "oxlint-tsgolint": "^0.24.0",
47
- "tsdown": "^0.22.5",
43
+ "@types/node": "^26.5.1",
44
+ "oxfmt": "^0.63.0",
45
+ "oxlint": "^1.82.0",
46
+ "oxlint-tsgolint": "^7.0.2001",
47
+ "tsdown": "^0.22.14",
48
48
  "typescript": "^7.0.2",
49
- "vitest": "^4.1.10"
49
+ "vitest": "^4.1.11"
50
50
  },
51
51
  "peerDependencies": {
52
- "oxfmt": "^0.58.0",
53
- "oxlint": "^1.73.0",
54
- "oxlint-tsgolint": "^0.24.0"
52
+ "oxfmt": "^0.63.0",
53
+ "oxlint": "^1.79.0",
54
+ "oxlint-tsgolint": "^7.0.2001"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=24"
58
58
  },
59
- "packageManager": "pnpm@11.9.0"
59
+ "packageManager": "pnpm@11.26.0"
60
60
  }