@eslint-react/eslint-plugin 2.0.0-beta.20 → 2.0.0-beta.200
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 +34 -30
- package/dist/chunk-CTAAG5j7.js +13 -0
- package/dist/index.d.ts +899 -3440
- package/dist/index.js +425 -479
- package/package.json +18 -26
package/README.md
CHANGED
|
@@ -69,40 +69,42 @@ npm install --save-dev typescript-eslint @eslint-react/eslint-plugin
|
|
|
69
69
|
```js
|
|
70
70
|
// eslint.config.js
|
|
71
71
|
|
|
72
|
-
// @ts-check
|
|
73
|
-
import eslintJs from "@eslint/js";
|
|
74
72
|
import eslintReact from "@eslint-react/eslint-plugin";
|
|
73
|
+
import eslintJs from "@eslint/js";
|
|
74
|
+
import { defineConfig } from "eslint/config";
|
|
75
75
|
import tseslint from "typescript-eslint";
|
|
76
76
|
|
|
77
|
-
export default
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
77
|
+
export default defineConfig([
|
|
78
|
+
{
|
|
79
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
80
|
+
|
|
81
|
+
// Extend recommended rule sets from:
|
|
82
|
+
// 1. ESLint JS's recommended rules
|
|
83
|
+
// 2. TypeScript ESLint recommended rules
|
|
84
|
+
// 3. ESLint React's recommended-typescript rules
|
|
85
|
+
extends: [
|
|
86
|
+
eslintJs.configs.recommended,
|
|
87
|
+
tseslint.configs.recommended,
|
|
88
|
+
eslintReact.configs["recommended-typescript"],
|
|
89
|
+
],
|
|
90
|
+
|
|
91
|
+
// Configure language/parsing options
|
|
92
|
+
languageOptions: {
|
|
93
|
+
// Use TypeScript ESLint parser for TypeScript files
|
|
94
|
+
parser: tseslint.parser,
|
|
95
|
+
parserOptions: {
|
|
96
|
+
// Enable project service for better TypeScript integration
|
|
97
|
+
projectService: true,
|
|
98
|
+
tsconfigRootDir: import.meta.dirname,
|
|
99
|
+
},
|
|
98
100
|
},
|
|
99
|
-
},
|
|
100
101
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
// Custom rule overrides (modify rule levels or disable rules)
|
|
103
|
+
rules: {
|
|
104
|
+
"@eslint-react/no-missing-key": "warn",
|
|
105
|
+
},
|
|
104
106
|
},
|
|
105
|
-
|
|
107
|
+
]);
|
|
106
108
|
```
|
|
107
109
|
|
|
108
110
|
[Full Installation Guide ↗](https://eslint-react.xyz/docs/getting-started/typescript)
|
|
@@ -140,6 +142,8 @@ export default tseslint.config({
|
|
|
140
142
|
Disable rules in the `web-api` preset.
|
|
141
143
|
- `disable-type-checked`\
|
|
142
144
|
Disable rules that require type information.
|
|
145
|
+
- `disable-conflict-eslint-plugin-react`\
|
|
146
|
+
Disable rules in `eslint-plugin-react` that conflict with rules in our plugins.
|
|
143
147
|
- `off`\
|
|
144
148
|
Disable all rules in this plugin except for debug rules.
|
|
145
149
|
|
|
@@ -165,8 +169,8 @@ export default tseslint.config({
|
|
|
165
169
|
|
|
166
170
|
Contributions are welcome!
|
|
167
171
|
|
|
168
|
-
Please follow our [contributing guidelines](
|
|
172
|
+
Please follow our [contributing guidelines](https://github.com/Rel1cx/eslint-react/tree/main/.github/CONTRIBUTING.md).
|
|
169
173
|
|
|
170
174
|
## License
|
|
171
175
|
|
|
172
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
176
|
+
This project is licensed under the MIT License - see the [LICENSE](https://github.com/Rel1cx/eslint-react/tree/main/LICENSE) file for details.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __export = (all) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
return target;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __export };
|