@eslint-react/eslint-plugin 2.0.0-next.2 → 2.0.0-next.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 CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Version](https://img.shields.io/npm/v/@eslint-react/eslint-plugin?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/@eslint-react/eslint-plugin)
6
6
  [![Downloads](https://img.shields.io/npm/dt/@eslint-react/eslint-plugin.svg?style=flat&colorA=000000&colorB=000000)](https://npmjs.com/package/@eslint-react/eslint-plugin)
7
7
 
8
- A series of composable ESLint rules for React and friends.
8
+ 4-7x faster composable ESLint rules for React and friends.
9
9
 
10
10
  ## Table of Contents
11
11
 
@@ -22,6 +22,7 @@ A series of composable ESLint rules for React and friends.
22
22
  - [TypeScript Specialized](#typescript-specialized)
23
23
  - [Other](#other)
24
24
  - [Rules](#rules)
25
+ - [Benchmark](#benchmark)
25
26
  - [FAQ](#faq)
26
27
  - [Roadmap](#roadmap)
27
28
  - [Contributing](#contributing)
@@ -29,10 +30,10 @@ A series of composable ESLint rules for React and friends.
29
30
 
30
31
  ## Features
31
32
 
32
- - **Modern**: First-class support for TypeScript, React 19, and more.
33
- - **Flexible**: Fully customizable rule severity levels, allowing you to enforce or relax rules as needed.
34
- - **Performant**: Built with performance in mind, optimized for large codebases.
35
- - **Context-aware Linting**: Rules that understand the context of your code and project configuration to provide more accurate linting.
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
+ - **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](https://eslint-react.xyz/docs/configuration/configure-project-config) to provide more **accurate** linting.
36
37
 
37
38
  ## Public Packages
38
39
 
@@ -68,46 +69,46 @@ npm install --save-dev typescript-eslint @eslint-react/eslint-plugin
68
69
  ```js
69
70
  // eslint.config.js
70
71
 
71
- // @ts-check
72
- import eslintJs from "@eslint/js";
73
72
  import eslintReact from "@eslint-react/eslint-plugin";
73
+ import eslintJs from "@eslint/js";
74
+ import { defineConfig } from "eslint/config";
74
75
  import tseslint from "typescript-eslint";
75
76
 
76
- export default tseslint.config({
77
- files: ["**/*.ts", "**/*.tsx"],
78
-
79
- // Extend recommended rule sets from:
80
- // 1. ESLint JS's recommended rules
81
- // 2. TypeScript ESLint recommended rules
82
- // 3. ESLint React's recommended-typescript rules
83
- extends: [
84
- eslintJs.configs.recommended,
85
- tseslint.configs.recommended,
86
- eslintReact.configs["recommended-typescript"],
87
- ],
88
-
89
- // Configure language/parsing options
90
- languageOptions: {
91
- // Use TypeScript ESLint parser for TypeScript files
92
- parser: tseslint.parser,
93
- parserOptions: {
94
- // Enable project service for better TypeScript integration
95
- projectService: true,
96
- tsconfigRootDir: import.meta.dirname,
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
+ },
97
100
  },
98
- },
99
101
 
100
- // Custom rule overrides (modify rule levels or disable rules)
101
- rules: {
102
- "@eslint-react/no-missing-key": "warn",
102
+ // Custom rule overrides (modify rule levels or disable rules)
103
+ rules: {
104
+ "@eslint-react/no-missing-key": "warn",
105
+ },
103
106
  },
104
- });
107
+ ]);
105
108
  ```
106
109
 
107
110
  [Full Installation Guide ↗](https://eslint-react.xyz/docs/getting-started/typescript)
108
111
 
109
- </details>
110
-
111
112
  ## Presets
112
113
 
113
114
  ### Bare Bones
@@ -141,6 +142,8 @@ export default tseslint.config({
141
142
  Disable rules in the `web-api` preset.
142
143
  - `disable-type-checked`\
143
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.
144
147
  - `off`\
145
148
  Disable all rules in this plugin except for debug rules.
146
149
 
@@ -150,6 +153,10 @@ export default tseslint.config({
150
153
 
151
154
  [Rules Overview ↗](https://eslint-react.xyz/docs/rules/overview)
152
155
 
156
+ ## Benchmark
157
+
158
+ [Benchmark Results ↗](https://github.com/Rel1cx/eslint-react-benchmark)
159
+
153
160
  ## FAQ
154
161
 
155
162
  [Frequently Asked Questions ↗](https://eslint-react.xyz/docs/faq)
@@ -162,8 +169,8 @@ export default tseslint.config({
162
169
 
163
170
  Contributions are welcome!
164
171
 
165
- Please follow our [contributing guidelines](./.github/CONTRIBUTING.md).
172
+ Please follow our [contributing guidelines](https://github.com/Rel1cx/eslint-react/tree/main/.github/CONTRIBUTING.md).
166
173
 
167
174
  ## License
168
175
 
169
- 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 };