@robot-inventor/eslint-config 7.0.0 → 8.0.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/dist/cjs/index.js CHANGED
@@ -11,6 +11,9 @@ const eslint_config_prettier_1 = __importDefault(require("eslint-config-prettier
11
11
  const eslint_plugin_import_x_1 = __importDefault(require("eslint-plugin-import-x"));
12
12
  const eslint_plugin_jsdoc_1 = __importDefault(require("eslint-plugin-jsdoc"));
13
13
  const eslint_plugin_react_1 = __importDefault(require("eslint-plugin-react"));
14
+ // @ts-expect-error `eslint-plugin-react-compiler` doesn't have type definitions.
15
+ // eslint-disable-next-line import-x/max-dependencies
16
+ const eslint_plugin_react_compiler_1 = __importDefault(require("eslint-plugin-react-compiler"));
14
17
  const eslintRules = {
15
18
  curly: ["error", "multi-line"],
16
19
  "no-magic-numbers": [
@@ -108,6 +111,11 @@ exports.eslintConfig = eslintConfig;
108
111
  const eslintReactConfigBase = (0, typescript_eslint_1.config)({
109
112
  files: ["**/*.tsx"],
110
113
  ...eslint_plugin_react_1.default.configs.flat["recommended"],
114
+ plugins: {
115
+ ...eslint_plugin_react_1.default.configs.flat["recommended"]?.plugins,
116
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
117
+ "react-compiler": eslint_plugin_react_compiler_1.default
118
+ },
111
119
  rules: {
112
120
  "jsdoc/check-tag-names": [
113
121
  "error",
@@ -123,7 +131,8 @@ const eslintReactConfigBase = (0, typescript_eslint_1.config)({
123
131
  }
124
132
  ],
125
133
  "react/jsx-boolean-value": ["error", "never"],
126
- "react/jsx-curly-brace-presence": ["error", "never"]
134
+ "react/jsx-curly-brace-presence": ["error", "never"],
135
+ "react-compiler/react-compiler": "error"
127
136
  }
128
137
  });
129
138
  const eslintReactConfig = (0, typescript_eslint_1.config)(...eslintConfig, ...eslintReactConfigBase);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robot-inventor/eslint-config",
3
- "version": "7.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "My ESLint config preset",
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -41,6 +41,7 @@
41
41
  "eslint-plugin-import-x": "^4.0.0",
42
42
  "eslint-plugin-jsdoc": "^50.0.0",
43
43
  "eslint-plugin-react": "^7.37.3",
44
+ "eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
44
45
  "typescript-eslint": "^8.0.0"
45
46
  },
46
47
  "devDependencies": {
package/dist/esm/index.js CHANGED
@@ -5,6 +5,9 @@ import eslintConfigPrettier from "eslint-config-prettier";
5
5
  import importX from "eslint-plugin-import-x";
6
6
  import jsdoc from "eslint-plugin-jsdoc";
7
7
  import react from "eslint-plugin-react";
8
+ // @ts-expect-error `eslint-plugin-react-compiler` doesn't have type definitions.
9
+ // eslint-disable-next-line import-x/max-dependencies
10
+ import reactCompiler from "eslint-plugin-react-compiler";
8
11
  const eslintRules = {
9
12
  curly: ["error", "multi-line"],
10
13
  "no-magic-numbers": [
@@ -100,6 +103,11 @@ const eslintConfig = config(...eslintConfigNoJSDoc, ...JSDocRule);
100
103
  const eslintReactConfigBase = config({
101
104
  files: ["**/*.tsx"],
102
105
  ...react.configs.flat["recommended"],
106
+ plugins: {
107
+ ...react.configs.flat["recommended"]?.plugins,
108
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
109
+ "react-compiler": reactCompiler
110
+ },
103
111
  rules: {
104
112
  "jsdoc/check-tag-names": [
105
113
  "error",
@@ -115,7 +123,8 @@ const eslintReactConfigBase = config({
115
123
  }
116
124
  ],
117
125
  "react/jsx-boolean-value": ["error", "never"],
118
- "react/jsx-curly-brace-presence": ["error", "never"]
126
+ "react/jsx-curly-brace-presence": ["error", "never"],
127
+ "react-compiler/react-compiler": "error"
119
128
  }
120
129
  });
121
130
  const eslintReactConfig = config(...eslintConfig, ...eslintReactConfigBase);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robot-inventor/eslint-config",
3
- "version": "7.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "My ESLint config preset",
5
5
  "type": "module",
6
6
  "files": [
@@ -41,6 +41,7 @@
41
41
  "eslint-plugin-import-x": "^4.0.0",
42
42
  "eslint-plugin-jsdoc": "^50.0.0",
43
43
  "eslint-plugin-react": "^7.37.3",
44
+ "eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
44
45
  "typescript-eslint": "^8.0.0"
45
46
  },
46
47
  "devDependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robot-inventor/eslint-config",
3
- "version": "7.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "My ESLint config preset",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -52,6 +52,7 @@
52
52
  "eslint-plugin-import-x": "^4.0.0",
53
53
  "eslint-plugin-jsdoc": "^50.0.0",
54
54
  "eslint-plugin-react": "^7.37.3",
55
+ "eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
55
56
  "typescript-eslint": "^8.0.0"
56
57
  },
57
58
  "devDependencies": {