@zhangyu1818/oxlint-config 2.4.0 → 2.6.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region src/shared/ignore-patterns.d.ts
2
- declare const defaultIgnorePatterns: string[];
2
+ export declare const defaultIgnorePatterns: string[];
3
3
  //#endregion
4
4
  //#region src/types.d.ts
5
5
  type Severity = 'off' | 'warn' | 'error';
@@ -157,7 +157,7 @@ interface DefineOxfmtConfigOptions extends OxfmtOverrideOptions {
157
157
  }
158
158
  //#endregion
159
159
  //#region src/oxlint/index.d.ts
160
- declare const defaultOxlintPresets: {
160
+ export declare const defaultOxlintPresets: {
161
161
  ignores: true;
162
162
  imports: true;
163
163
  javascript: true;
@@ -169,14 +169,14 @@ declare const defaultOxlintPresets: {
169
169
  typescript: boolean;
170
170
  unicorn: true;
171
171
  };
172
- declare function defineOxlintConfig(options?: DefineOxlintConfigOptions): OxlintConfig;
173
- declare const defineConfig: typeof defineOxlintConfig;
172
+ export declare function defineOxlintConfig(options?: DefineOxlintConfigOptions): OxlintConfig;
173
+ export declare const defineConfig: typeof defineOxlintConfig;
174
174
  //#endregion
175
175
  //#region src/oxfmt/presets/imports.d.ts
176
- declare const defaultSortImports: SortImportsOptions;
176
+ export declare const defaultSortImports: SortImportsOptions;
177
177
  //#endregion
178
178
  //#region src/oxfmt/index.d.ts
179
- declare const defaultOxfmtPresets: Required<OxfmtPresets>;
180
- declare function defineOxfmtConfig(options?: DefineOxfmtConfigOptions): OxfmtConfig;
179
+ export declare const defaultOxfmtPresets: Required<OxfmtPresets>;
180
+ export declare function defineOxfmtConfig(options?: DefineOxfmtConfigOptions): OxfmtConfig;
181
181
  //#endregion
182
- export { type DefineOxfmtConfigOptions, type DefineOxlintConfigOptions, type OxfmtConfig, type OxfmtOverride, type OxfmtPresetConfig, type OxfmtPresets, type OxlintConfig, type OxlintGlobalValue, type OxlintGlobals, type OxlintJsPlugin, type OxlintJsPluginAlias, type OxlintOverride, type OxlintPlugin, type OxlintPresetConfig, type OxlintPresets, type ReactOptions, type ReactPresetOptions, type RuleConfig, type Rules, type Severity, type SortImportsOptions, type SortPackageJsonOptions, type TailwindSortOptions, type TypeScriptOptions, defaultIgnorePatterns, defaultOxfmtPresets, defaultOxlintPresets, defaultSortImports, defineConfig, defineOxfmtConfig, defineOxlintConfig };
182
+ export type { DefineOxfmtConfigOptions, DefineOxlintConfigOptions, OxfmtConfig, OxfmtOverride, OxfmtPresetConfig, OxfmtPresets, OxlintConfig, OxlintGlobalValue, OxlintGlobals, OxlintJsPlugin, OxlintJsPluginAlias, OxlintOverride, OxlintPlugin, OxlintPresetConfig, OxlintPresets, ReactOptions, ReactPresetOptions, RuleConfig, Rules, Severity, SortImportsOptions, SortPackageJsonOptions, TailwindSortOptions, TypeScriptOptions };
package/dist/index.js CHANGED
@@ -283,11 +283,15 @@ const jsxA11yRules = {
283
283
  "jsx-a11y/tabindex-no-positive": "error"
284
284
  };
285
285
  const baseReactRules = {
286
+ "react/error-boundaries": "error",
286
287
  "react/exhaustive-deps": "warn",
287
288
  "react/function-component-definition": ["error", {
288
289
  namedComponents: ["arrow-function", "function-declaration"],
289
290
  unnamedComponents: "arrow-function"
290
291
  }],
292
+ "react/globals": "error",
293
+ "react/immutability": "error",
294
+ "react/incompatible-library": "error",
291
295
  "react/jsx-boolean-value": "error",
292
296
  "react/jsx-curly-brace-presence": ["error", {
293
297
  children: "never",
@@ -311,14 +315,23 @@ const baseReactRules = {
311
315
  "react/no-unknown-property": "error",
312
316
  "react/no-unescaped-entities": "error",
313
317
  "react/no-unstable-nested-components": "error",
318
+ "react/preserve-manual-memoization": "error",
319
+ "react/purity": "error",
314
320
  "react/react-in-jsx-scope": "off",
321
+ "react/refs": "error",
315
322
  "react/require-render-return": "error",
316
323
  "react/rules-of-hooks": "error",
317
324
  "react/self-closing-comp": ["error", {
318
325
  component: true,
319
326
  html: true
320
327
  }],
321
- "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"
322
335
  };
323
336
  function createReactRules(options, nextEnabled) {
324
337
  const framework = options.framework ?? {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangyu1818/oxlint-config",
3
- "version": "2.4.0",
3
+ "version": "2.6.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.2.0",
44
- "oxfmt": "^0.63.0",
45
- "oxlint": "^1.78.0",
46
- "oxlint-tsgolint": "^7.0.2001",
47
- "tsdown": "^0.22.14",
43
+ "@types/node": "^26.6.2",
44
+ "oxfmt": "^0.68.0",
45
+ "oxlint": "^1.83.0",
46
+ "oxlint-tsgolint": "^7.0.2002",
47
+ "tsdown": "^0.23.0",
48
48
  "typescript": "^7.0.2",
49
- "vitest": "^4.1.10"
49
+ "vitest": "^5.0.1"
50
50
  },
51
51
  "peerDependencies": {
52
- "oxfmt": "^0.63.0",
53
- "oxlint": "^1.78.0",
52
+ "oxfmt": "^0.68.0",
53
+ "oxlint": "^1.79.0",
54
54
  "oxlint-tsgolint": "^7.0.2001"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=24"
58
58
  },
59
- "packageManager": "pnpm@11.21.0"
59
+ "packageManager": "pnpm@12.5.1"
60
60
  }