@ocavue/eslint-config 3.0.1 → 3.1.1

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/README.md CHANGED
@@ -189,8 +189,9 @@ export default defineESLintConfig(
189
189
  },
190
190
  // More configs here:
191
191
  {
192
+ files: ['src/**/*.ts', 'src/**/*.tsx'],
192
193
  rules: {
193
- '@typescript-eslint/no-explicit-any': 'off',
194
+ '@typescript-eslint/no-explicit-any': 'warn',
194
195
  },
195
196
  },
196
197
  {
package/dist/options.d.ts CHANGED
@@ -96,8 +96,14 @@ export interface ReactOptions {
96
96
  * @see {@link Config.files}
97
97
  */
98
98
  files?: Config['files'];
99
+ /**
100
+ * Whether to enable [eslint-plugin-react-compiler](https://www.npmjs.com/package/eslint-plugin-react-compiler) configuration.
101
+ *
102
+ * @default false
103
+ */
104
+ reactCompiler?: boolean;
99
105
  }
100
- export declare function resolveReactOptions({ files, }?: ReactOptions): Required<ReactOptions>;
106
+ export declare function resolveReactOptions({ files, reactCompiler, }?: ReactOptions): Required<ReactOptions>;
101
107
  export interface VueOptions {
102
108
  /**
103
109
  * The default files to lint.
package/dist/options.js CHANGED
@@ -17,8 +17,8 @@ export function resolveOptions({ typescript = true, unicorn = true, packageJson
17
17
  prettier,
18
18
  };
19
19
  }
20
- export function resolveReactOptions({ files = [GLOB_TS, GLOB_TSX], } = {}) {
21
- return { files };
20
+ export function resolveReactOptions({ files = [GLOB_TS, GLOB_TSX], reactCompiler = false, } = {}) {
21
+ return { files, reactCompiler };
22
22
  }
23
23
  export function resolveVueOptions({ files = [GLOB_VUE], } = {}) {
24
24
  return { files };
package/dist/react.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import reactPlugin from 'eslint-plugin-react';
2
+ import reactCompiler from "eslint-plugin-react-compiler";
2
3
  import reactHooksPlugin from 'eslint-plugin-react-hooks';
3
4
  import { resolveReactOptions } from './options.js';
4
5
  export function react(options) {
5
6
  const { files } = resolveReactOptions(options);
6
7
  const reactRecommended = reactPlugin.configs.flat.recommended;
7
- return [
8
+ const configs = [
8
9
  {
9
10
  ...reactRecommended,
10
11
  name: 'react',
@@ -32,4 +33,12 @@ export function react(options) {
32
33
  },
33
34
  },
34
35
  ];
36
+ if (options?.reactCompiler) {
37
+ configs.push({
38
+ ...reactCompiler.configs.recommended,
39
+ name: 'react-compiler',
40
+ files: files,
41
+ });
42
+ }
43
+ return configs;
35
44
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocavue/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.1",
4
+ "version": "3.1.1",
5
5
  "description": "",
6
6
  "author": "ocavue <ocavue@gmail.com>",
7
7
  "license": "MIT",
@@ -33,27 +33,28 @@
33
33
  "@unocss/eslint-config": "^66.1.2",
34
34
  "eslint-config-flat-gitignore": "^2.1.0",
35
35
  "eslint-config-prettier": "^10.1.5",
36
- "eslint-import-resolver-typescript": "^4.3.5",
36
+ "eslint-import-resolver-typescript": "^4.4.2",
37
37
  "eslint-plugin-antfu": "^3.1.1",
38
- "eslint-plugin-command": "^3.2.0",
39
- "eslint-plugin-import-x": "^4.12.2",
38
+ "eslint-plugin-command": "^3.2.1",
39
+ "eslint-plugin-import-x": "^4.15.0",
40
40
  "eslint-plugin-no-only-tests": "^3.3.0",
41
- "eslint-plugin-package-json": "^0.31.0",
41
+ "eslint-plugin-package-json": "^0.33.1",
42
42
  "eslint-plugin-react": "^7.37.5",
43
+ "eslint-plugin-react-compiler": "19.1.0-rc.2",
43
44
  "eslint-plugin-react-hooks": "^5.2.0",
44
45
  "eslint-plugin-unicorn": "^59.0.1",
45
46
  "eslint-plugin-vue": "^10.1.0",
46
- "globals": "^16.1.0",
47
- "typescript-eslint": "^8.32.1",
47
+ "globals": "^16.2.0",
48
+ "typescript-eslint": "^8.33.0",
48
49
  "vue-eslint-parser": "^10.1.3"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@ocavue/tsconfig": "^0.3.7",
52
53
  "@types/node": "^20.17.9",
53
- "@typescript-eslint/utils": "^8.32.1",
54
+ "@typescript-eslint/utils": "^8.33.0",
54
55
  "eslint": "^9.27.0",
55
56
  "jiti": "^2.4.2",
56
- "pkg-pr-new": "^0.0.50",
57
+ "pkg-pr-new": "^0.0.51",
57
58
  "prettier": "^3.5.3",
58
59
  "typescript": "^5.8.3"
59
60
  },