File tree Expand file tree Collapse file tree 10 files changed +57
-20
lines changed
apps/website/content/docs
packages/plugins/eslint-plugin Expand file tree Collapse file tree 10 files changed +57
-20
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ export default defineConfig([
127127 Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.\
128128 _ This preset includes the ` x ` , ` dom ` , and ` web-api ` presets._
129129
130+ - ` strict ` \
131+ Same as the ` recommended ` preset but enables additional strict rules.
132+
130133### TypeScript Specialized
131134
132135- ` recommended-typescript ` \
@@ -135,6 +138,12 @@ export default defineConfig([
135138- ` recommended-type-checked ` \
136139 Same as the ` recommended-typescript ` preset but enables additional rules that require type information.
137140
141+ - ` strict-typescript ` \
142+ Same as the ` strict ` preset but disables rules that can be enforced by TypeScript.
143+
144+ - ` strict-type-checked ` \
145+ Same as the ` strict-typescript ` preset but enables additional rules that require type information.
146+
138147### Other
139148
140149- ` disable-dom ` \
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ The following presets are available in `@eslint-react/eslint-plugin`:
1919 Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.\
2020 _ This preset includes the ` x ` , ` dom ` , and ` web-api ` presets._
2121
22+ - ` strict ` \
23+ Same as the ` recommended ` preset but enables additional strict rules.
24+
2225## TypeScript Specialized
2326
2427- ` recommended-typescript ` \
@@ -27,6 +30,12 @@ The following presets are available in `@eslint-react/eslint-plugin`:
2730- ` recommended-type-checked ` \
2831 Same as the ` recommended-typescript ` preset but enables additional rules that require type information.
2932
33+ - ` strict-typescript ` \
34+ Same as the ` strict ` preset but disables rules that can be enforced by TypeScript.
35+
36+ - ` strict-type-checked ` \
37+ Same as the ` strict-typescript ` preset but enables additional rules that require type information.
38+
3039### Combined (beta)
3140
3241- ` no-deprecated ` \
Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ export default defineConfig([
127127 Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.\
128128 _ This preset includes the ` x ` , ` dom ` , and ` web-api ` presets._
129129
130+ - ` strict ` \
131+ Same as the ` recommended ` preset but enables additional strict rules.
132+
130133### TypeScript Specialized
131134
132135- ` recommended-typescript ` \
@@ -135,6 +138,12 @@ export default defineConfig([
135138- ` recommended-type-checked ` \
136139 Same as the ` recommended-typescript ` preset but enables additional rules that require type information.
137140
141+ - ` strict-typescript ` \
142+ Same as the ` strict ` preset but disables rules that can be enforced by TypeScript.
143+
144+ - ` strict-type-checked ` \
145+ Same as the ` strict-typescript ` preset but enables additional rules that require type information.
146+
138147### Other
139148
140149- ` disable-dom ` \
@@ -174,8 +183,8 @@ ESLint React is not affiliated with Meta Corporation or [facebook/react](https:/
174183
175184Contributions are welcome!
176185
177- Please follow our [ contributing guidelines] ( https://github.com/Rel1cx/eslint-react/tree/main /.github/CONTRIBUTING.md ) .
186+ Please follow our [ contributing guidelines] ( https://github.com/Rel1cx/eslint-react/tree/add-strict-presets /.github/CONTRIBUTING.md ) .
178187
179188## License
180189
181- This project is licensed under the MIT License - see the [ LICENSE] ( https://github.com/Rel1cx/eslint-react/tree/main /LICENSE ) file for details.
190+ This project is licensed under the MIT License - see the [ LICENSE] ( https://github.com/Rel1cx/eslint-react/tree/add-strict-presets /LICENSE ) file for details.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 11import type { RuleConfig } from "@eslint-react/kit" ;
22
3+ import * as tc from "./_tc" ;
34import * as recommendedTypeScript from "./recommended-typescript" ;
45
56export const name = "@eslint-react/recommended-type-checked" ;
67
78export const rules = {
89 ...recommendedTypeScript . rules ,
9- "@eslint-react/no-leaked-conditional-rendering" : "warn" ,
10- "@eslint-react/no-unused-props" : "warn" ,
10+ ...tc . rules ,
1111} as const satisfies Record < string , RuleConfig > ;
1212
1313export const plugins = {
Original file line number Diff line number Diff line change 11import type { RuleConfig } from "@eslint-react/kit" ;
22
3+ import * as ts from "./_ts" ;
34import * as recommended from "./recommended" ;
45
56export const name = "@eslint-react/recommended-typescript" ;
67
78export const rules = {
89 ...recommended . rules ,
9- "@eslint-react/dom/no-string-style-prop" : "off" ,
10- "@eslint-react/dom/no-unknown-property" : "off" ,
11- "@eslint-react/jsx-no-duplicate-props" : "off" ,
12- "@eslint-react/jsx-uses-react" : "off" ,
13- "@eslint-react/jsx-uses-vars" : "off" ,
10+ ...ts . rules ,
1411} as const satisfies Record < string , RuleConfig > ;
1512
1613export const plugins = {
Original file line number Diff line number Diff line change 11import type { RuleConfig } from "@eslint-react/kit" ;
22
3- import * as typeChecked from "./_type-checked " ;
4- import * as strictTypescript from "./strict-typescript" ;
3+ import * as tc from "./_tc " ;
4+ import * as strictTypeScript from "./strict-typescript" ;
55
66export const name = "@eslint-react/strict-type-checked" ;
77
88export const rules = {
9- ...strictTypescript . rules ,
10- ...typeChecked . rules ,
9+ ...strictTypeScript . rules ,
10+ ...tc . rules ,
1111} as const satisfies Record < string , RuleConfig > ;
1212
1313export const plugins = {
14- ...strictTypescript . plugins ,
14+ ...strictTypeScript . plugins ,
1515} ;
1616
1717export const settings = {
18- ...strictTypescript . settings ,
18+ ...strictTypeScript . settings ,
1919} ;
Original file line number Diff line number Diff line change 11import type { RuleConfig } from "@eslint-react/kit" ;
22
3- import * as strict from "./_strict " ;
4- import * as recommendedTypescript from "./recommended-typescript " ;
3+ import * as ts from "./recommended-typescript " ;
4+ import * as strict from "./strict " ;
55
66export const name = "@eslint-react/strict-typescript" ;
77
88export const rules = {
9- ...recommendedTypescript . rules ,
109 ...strict . rules ,
10+ ...ts . rules ,
1111} as const satisfies Record < string , RuleConfig > ;
1212
1313export const plugins = {
14- ...recommendedTypescript . plugins ,
14+ ...strict . plugins ,
1515} ;
1616
1717export const settings = {
18- ...recommendedTypescript . settings ,
18+ ...strict . settings ,
1919} ;
Original file line number Diff line number Diff line change 11import type { RuleConfig } from "@eslint-react/kit" ;
22
3+ import * as recommended from "./recommended" ;
4+
5+ export const name = "@eslint-react/strict" ;
6+
37export const rules = {
8+ ...recommended . rules ,
49 "@eslint-react/jsx-no-iife" : "error" ,
510 "@eslint-react/jsx-no-undef" : "error" ,
611 "@eslint-react/no-children-prop" : "warn" ,
@@ -20,3 +25,11 @@ export const rules = {
2025 "@eslint-react/dom/no-missing-iframe-sandbox" : "warn" ,
2126 "@eslint-react/dom/no-unsafe-target-blank" : "warn" ,
2227} as const satisfies Record < string , RuleConfig > ;
28+
29+ export const plugins = {
30+ ...recommended . plugins ,
31+ } ;
32+
33+ export const settings = {
34+ ...recommended . settings ,
35+ } ;
You can’t perform that action at this time.
0 commit comments