@eslint-react/eslint-plugin 2.0.0-beta.2 → 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 +37 -35
- package/dist/chunk-CTAAG5j7.js +13 -0
- package/dist/index.d.ts +900 -3403
- package/dist/index.js +427 -405
- package/package.json +18 -27
package/README.md
CHANGED
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
33
|
-
- **Modern**: First-class support for TypeScript
|
|
34
|
-
- **Flexible**: Fully customizable rule severity levels, allowing you to enforce or relax rules as needed.
|
|
33
|
+
- **Modern**: First-class support for **TypeScript**, **React 19**, and more.
|
|
34
|
+
- **Flexible**: Fully customizable rule severity levels, allowing you to **enforce** or **relax** rules as needed.
|
|
35
35
|
- **Performant**: Built with performance in mind, optimized for large codebases, [**4-7x faster**](https://github.com/Rel1cx/eslint-react-benchmark) than other ESLint plugins.
|
|
36
|
-
- **Context-aware Linting**: Rules that understand the context of your code and project configuration to provide more accurate linting.
|
|
36
|
+
- **Context-aware Linting**: Rules that understand the context of your code and [project configuration](https://eslint-react.xyz/docs/configuration/configure-project-config) to provide more **accurate** linting.
|
|
37
37
|
|
|
38
38
|
## Public Packages
|
|
39
39
|
|
|
@@ -69,46 +69,46 @@ 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)
|
|
109
111
|
|
|
110
|
-
</details>
|
|
111
|
-
|
|
112
112
|
## Presets
|
|
113
113
|
|
|
114
114
|
### Bare Bones
|
|
@@ -142,6 +142,8 @@ export default tseslint.config({
|
|
|
142
142
|
Disable rules in the `web-api` preset.
|
|
143
143
|
- `disable-type-checked`\
|
|
144
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.
|
|
145
147
|
- `off`\
|
|
146
148
|
Disable all rules in this plugin except for debug rules.
|
|
147
149
|
|
|
@@ -167,8 +169,8 @@ export default tseslint.config({
|
|
|
167
169
|
|
|
168
170
|
Contributions are welcome!
|
|
169
171
|
|
|
170
|
-
Please follow our [contributing guidelines](
|
|
172
|
+
Please follow our [contributing guidelines](https://github.com/Rel1cx/eslint-react/tree/main/.github/CONTRIBUTING.md).
|
|
171
173
|
|
|
172
174
|
## License
|
|
173
175
|
|
|
174
|
-
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 };
|