@eslint-react/eslint-plugin
Advanced tools
+1
-1
| import { ESLint, Linter } from "eslint"; | ||
| //#region src/index.d.ts | ||
| type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-rsc" | "disable-experimental" | "disable-type-checked" | "disable-web-api" | "dom" | "rsc" | "no-deprecated" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x"; | ||
| type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-rsc" | "disable-experimental" | "disable-type-checked" | "disable-web-api" | "dom" | "rsc" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x"; | ||
| declare const plugin: ESLint.Plugin & { | ||
@@ -6,0 +6,0 @@ /** |
+66
-151
@@ -26,4 +26,4 @@ import react from "eslint-plugin-react-x"; | ||
| //#region package.json | ||
| var name$20 = "@eslint-react/eslint-plugin"; | ||
| var version = "3.0.0-next.64"; | ||
| var name$19 = "@eslint-react/eslint-plugin"; | ||
| var version = "3.0.0-next.65"; | ||
@@ -33,8 +33,8 @@ //#endregion | ||
| var dom_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$19, | ||
| plugins: () => plugins$11, | ||
| rules: () => rules$20 | ||
| name: () => name$18, | ||
| plugins: () => plugins$10, | ||
| rules: () => rules$19 | ||
| }); | ||
| const name$19 = "@eslint-react/dom"; | ||
| const rules$20 = { | ||
| const name$18 = "@eslint-react/dom"; | ||
| const rules$19 = { | ||
| "@eslint-react/dom/no-dangerously-set-innerhtml": "warn", | ||
@@ -53,3 +53,3 @@ "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error", | ||
| }; | ||
| const plugins$11 = { "@eslint-react/dom": reactDom }; | ||
| const plugins$10 = { "@eslint-react/dom": reactDom }; | ||
@@ -59,9 +59,9 @@ //#endregion | ||
| var rsc_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$18, | ||
| plugins: () => plugins$10, | ||
| rules: () => rules$19 | ||
| name: () => name$17, | ||
| plugins: () => plugins$9, | ||
| rules: () => rules$18 | ||
| }); | ||
| const name$18 = "@eslint-react/rsc"; | ||
| const rules$19 = { "@eslint-react/rsc/function-definition": "error" }; | ||
| const plugins$10 = { "@eslint-react/rsc": reactRsc }; | ||
| const name$17 = "@eslint-react/rsc"; | ||
| const rules$18 = { "@eslint-react/rsc/function-definition": "error" }; | ||
| const plugins$9 = { "@eslint-react/rsc": reactRsc }; | ||
@@ -71,9 +71,9 @@ //#endregion | ||
| var x_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$17, | ||
| plugins: () => plugins$9, | ||
| rules: () => rules$18, | ||
| name: () => name$16, | ||
| plugins: () => plugins$8, | ||
| rules: () => rules$17, | ||
| settings: () => settings$8 | ||
| }); | ||
| const name$17 = "@eslint-react/x"; | ||
| const rules$18 = { | ||
| const name$16 = "@eslint-react/x"; | ||
| const rules$17 = { | ||
| "@eslint-react/component-hook-factories": "error", | ||
@@ -123,3 +123,3 @@ "@eslint-react/error-boundaries": "error", | ||
| }; | ||
| const plugins$9 = { "@eslint-react": react }; | ||
| const plugins$8 = { "@eslint-react": react }; | ||
| const settings$8 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS }; | ||
@@ -130,9 +130,9 @@ | ||
| var all_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$16, | ||
| plugins: () => plugins$8, | ||
| rules: () => rules$17, | ||
| name: () => name$15, | ||
| plugins: () => plugins$7, | ||
| rules: () => rules$16, | ||
| settings: () => settings$7 | ||
| }); | ||
| const name$16 = "@eslint-react/all"; | ||
| const rules$17 = { | ||
| const name$15 = "@eslint-react/all"; | ||
| const rules$16 = { | ||
| "@eslint-react/component-hook-factories": "error", | ||
@@ -227,6 +227,6 @@ "@eslint-react/error-boundaries": "error", | ||
| }; | ||
| const plugins$8 = { | ||
| const plugins$7 = { | ||
| ...plugins$8, | ||
| ...plugins$9, | ||
| ...plugins$10, | ||
| ...plugins$11, | ||
| "@eslint-react/naming-convention": reactNamingConvention, | ||
@@ -240,53 +240,7 @@ "@eslint-react/web-api": reactWebApi | ||
| var disable_conflict_eslint_plugin_react_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$15, | ||
| rules: () => rules$16 | ||
| name: () => name$14, | ||
| rules: () => rules$15 | ||
| }); | ||
| const conflictingRules$1 = [ | ||
| "react/button-has-type", | ||
| "react/destructuring-assignment", | ||
| "react/display-name", | ||
| "react/forbid-prop-types", | ||
| "react/forward-ref-uses-ref", | ||
| "react/hook-use-state", | ||
| "react/iframe-missing-sandbox", | ||
| "react/jsx-boolean-value", | ||
| "react/jsx-filename-extension", | ||
| "react/jsx-fragments", | ||
| "react/jsx-key", | ||
| "react/jsx-no-comment-textnodes", | ||
| "react/jsx-no-constructed-context-values", | ||
| "react/jsx-no-duplicate-props", | ||
| "react/jsx-no-leaked-render", | ||
| "react/jsx-no-script-url", | ||
| "react/jsx-no-target-blank", | ||
| "react/jsx-no-useless-fragment", | ||
| "react/jsx-pascal-case", | ||
| "react/jsx-uses-react", | ||
| "react/jsx-uses-vars", | ||
| "react/no-access-state-in-setstate", | ||
| "react/no-array-index-key", | ||
| "react/no-children-prop", | ||
| "react/no-danger", | ||
| "react/no-danger-with-children", | ||
| "react/no-deprecated", | ||
| "react/no-did-mount-set-state", | ||
| "react/no-did-update-set-state", | ||
| "react/no-direct-mutation-state", | ||
| "react/no-find-dom-node", | ||
| "react/no-namespace", | ||
| "react/no-object-type-as-default-prop", | ||
| "react/no-redundant-should-component-update", | ||
| "react/no-render-return-value", | ||
| "react/no-string-refs", | ||
| "react/no-unknown-property", | ||
| "react/no-unsafe", | ||
| "react/no-unstable-nested-components", | ||
| "react/no-unused-class-component-members", | ||
| "react/no-unused-state", | ||
| "react/no-will-update-set-state", | ||
| "react/prop-types", | ||
| "react/void-dom-elements-no-children" | ||
| ]; | ||
| const name$15 = "@eslint-react/disable-conflict-eslint-plugin-react"; | ||
| const rules$16 = Object.fromEntries(conflictingRules$1.map((key) => [key, "off"])); | ||
| const name$14 = "@eslint-react/disable-conflict-eslint-plugin-react"; | ||
| const rules$15 = react.configs["disable-conflict-eslint-plugin-react"].rules ?? {}; | ||
@@ -296,21 +250,7 @@ //#endregion | ||
| var disable_conflict_eslint_plugin_react_hooks_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$14, | ||
| rules: () => rules$15 | ||
| name: () => name$13, | ||
| rules: () => rules$14 | ||
| }); | ||
| const conflictingRules = [ | ||
| "react-hooks/exhaustive-deps", | ||
| "react-hooks/rules-of-hooks", | ||
| "react-hooks/component-hook-factories", | ||
| "react-hooks/error-boundaries", | ||
| "react-hooks/immutability", | ||
| "react-hooks/purity", | ||
| "react-hooks/refs", | ||
| "react-hooks/set-state-in-effect", | ||
| "react-hooks/set-state-in-render", | ||
| "react-hooks/static-components", | ||
| "react-hooks/unsupported-syntax", | ||
| "react-hooks/use-memo" | ||
| ]; | ||
| const name$14 = "@eslint-react/disable-conflict-eslint-plugin-react-hooks"; | ||
| const rules$15 = Object.fromEntries(conflictingRules.map((key) => [key, "off"])); | ||
| const name$13 = "@eslint-react/disable-conflict-eslint-plugin-react-hooks"; | ||
| const rules$14 = react.configs["disable-conflict-eslint-plugin-react-hooks"].rules ?? {}; | ||
@@ -320,7 +260,7 @@ //#endregion | ||
| var disable_dom_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$13, | ||
| rules: () => rules$14 | ||
| name: () => name$12, | ||
| rules: () => rules$13 | ||
| }); | ||
| const name$13 = "@eslint-react/disable-dom"; | ||
| const rules$14 = Object.fromEntries(Object.entries(rules$20).map(([key]) => [key, "off"])); | ||
| const name$12 = "@eslint-react/disable-dom"; | ||
| const rules$13 = Object.fromEntries(Object.entries(rules$19).map(([key]) => [key, "off"])); | ||
@@ -330,7 +270,7 @@ //#endregion | ||
| var disable_experimental_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$12, | ||
| rules: () => rules$13 | ||
| name: () => name$11, | ||
| rules: () => rules$12 | ||
| }); | ||
| const name$12 = "@eslint-react/disable-experimental"; | ||
| const rules$13 = { | ||
| const name$11 = "@eslint-react/disable-experimental"; | ||
| const rules$12 = { | ||
| "@eslint-react/exhaustive-deps": "off", | ||
@@ -353,7 +293,7 @@ "@eslint-react/jsx-key-before-spread": "off", | ||
| var disable_rsc_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$11, | ||
| rules: () => rules$12 | ||
| name: () => name$10, | ||
| rules: () => rules$11 | ||
| }); | ||
| const name$11 = "@eslint-react/disable-rsc"; | ||
| const rules$12 = Object.fromEntries(Object.entries(rules$19).map(([key]) => [key, "off"])); | ||
| const name$10 = "@eslint-react/disable-rsc"; | ||
| const rules$11 = Object.fromEntries(Object.entries(rules$18).map(([key]) => [key, "off"])); | ||
@@ -363,7 +303,7 @@ //#endregion | ||
| var disable_type_checked_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$10, | ||
| rules: () => rules$11 | ||
| name: () => name$9, | ||
| rules: () => rules$10 | ||
| }); | ||
| const name$10 = "@eslint-react/disable-type-checked"; | ||
| const rules$11 = { | ||
| const name$9 = "@eslint-react/disable-type-checked"; | ||
| const rules$10 = { | ||
| "@eslint-react/no-implicit-key": "off", | ||
@@ -377,9 +317,9 @@ "@eslint-react/no-leaked-conditional-rendering": "off", | ||
| var web_api_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$9, | ||
| plugins: () => plugins$7, | ||
| rules: () => rules$10, | ||
| name: () => name$8, | ||
| plugins: () => plugins$6, | ||
| rules: () => rules$9, | ||
| settings: () => settings$6 | ||
| }); | ||
| const name$9 = "@eslint-react/web-api"; | ||
| const rules$10 = { | ||
| const name$8 = "@eslint-react/web-api"; | ||
| const rules$9 = { | ||
| "@eslint-react/web-api/no-leaked-event-listener": "warn", | ||
@@ -390,3 +330,3 @@ "@eslint-react/web-api/no-leaked-interval": "warn", | ||
| }; | ||
| const plugins$7 = { "@eslint-react/web-api": reactWebApi }; | ||
| const plugins$6 = { "@eslint-react/web-api": reactWebApi }; | ||
| const settings$6 = { ...settings$8 }; | ||
@@ -397,31 +337,7 @@ | ||
| var disable_web_api_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$8, | ||
| rules: () => rules$9 | ||
| }); | ||
| const name$8 = "@eslint-react/disable-web-api"; | ||
| const rules$9 = Object.fromEntries(Object.entries(rules$10).map(([key]) => [key, "off"])); | ||
| //#endregion | ||
| //#region src/configs/no-deprecated.ts | ||
| var no_deprecated_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$7, | ||
| plugins: () => plugins$6, | ||
| rules: () => rules$8 | ||
| }); | ||
| const name$7 = "@eslint-react/no-deprecated"; | ||
| const rules$8 = { | ||
| "@eslint-react/no-component-will-mount": "error", | ||
| "@eslint-react/no-component-will-receive-props": "error", | ||
| "@eslint-react/no-component-will-update": "error", | ||
| "@eslint-react/no-create-ref": "error", | ||
| "@eslint-react/no-forward-ref": "error", | ||
| "@eslint-react/dom/no-find-dom-node": "error", | ||
| "@eslint-react/dom/no-hydrate": "error", | ||
| "@eslint-react/dom/no-render": "error", | ||
| "@eslint-react/dom/no-render-return-value": "error" | ||
| }; | ||
| const plugins$6 = { | ||
| ...plugins$9, | ||
| ...plugins$11 | ||
| }; | ||
| const name$7 = "@eslint-react/disable-web-api"; | ||
| const rules$8 = Object.fromEntries(Object.entries(rules$9).map(([key]) => [key, "off"])); | ||
@@ -436,4 +352,4 @@ //#endregion | ||
| const rules$7 = { | ||
| ...Object.fromEntries(Object.entries(rules$17).map(([key]) => [key, "off"])), | ||
| ...rules$11 | ||
| ...Object.fromEntries(Object.entries(rules$16).map(([key]) => [key, "off"])), | ||
| ...rules$10 | ||
| }; | ||
@@ -451,6 +367,6 @@ | ||
| const rules$6 = { | ||
| ...rules$17, | ||
| ...rules$18, | ||
| ...rules$19, | ||
| ...rules$20, | ||
| ...rules$10, | ||
| ...rules$9, | ||
| "@eslint-react/naming-convention/context-name": "warn", | ||
@@ -462,6 +378,6 @@ "@eslint-react/naming-convention/id-name": "warn", | ||
| const plugins$5 = { | ||
| ...plugins$8, | ||
| ...plugins$9, | ||
| ...plugins$10, | ||
| ...plugins$11, | ||
| ...plugins$7, | ||
| ...plugins$6, | ||
| "@eslint-react/naming-convention": reactNamingConvention | ||
@@ -583,3 +499,3 @@ }; | ||
| meta: { | ||
| name: name$20, | ||
| name: name$19, | ||
| version | ||
@@ -597,3 +513,2 @@ }, | ||
| ["dom"]: dom_exports, | ||
| ["no-deprecated"]: no_deprecated_exports, | ||
| ["off"]: off_exports, | ||
@@ -600,0 +515,0 @@ ["recommended"]: recommended_exports, |
+8
-8
| { | ||
| "name": "@eslint-react/eslint-plugin", | ||
| "version": "3.0.0-next.64", | ||
| "version": "3.0.0-next.65", | ||
| "description": "A unified plugin that combines all individual plugins from the eslint-react monorepo into one.", | ||
@@ -49,9 +49,9 @@ "keywords": [ | ||
| "ts-api-utils": "^2.4.0", | ||
| "@eslint-react/eff": "3.0.0-next.64", | ||
| "@eslint-react/shared": "3.0.0-next.64", | ||
| "eslint-plugin-react-dom": "3.0.0-next.64", | ||
| "eslint-plugin-react-naming-convention": "3.0.0-next.64", | ||
| "eslint-plugin-react-rsc": "3.0.0-next.64", | ||
| "eslint-plugin-react-x": "3.0.0-next.64", | ||
| "eslint-plugin-react-web-api": "3.0.0-next.64" | ||
| "@eslint-react/eff": "3.0.0-next.65", | ||
| "@eslint-react/shared": "3.0.0-next.65", | ||
| "eslint-plugin-react-naming-convention": "3.0.0-next.65", | ||
| "eslint-plugin-react-x": "3.0.0-next.65", | ||
| "eslint-plugin-react-dom": "3.0.0-next.65", | ||
| "eslint-plugin-react-rsc": "3.0.0-next.65", | ||
| "eslint-plugin-react-web-api": "3.0.0-next.65" | ||
| }, | ||
@@ -58,0 +58,0 @@ "devDependencies": { |
+0
-11
@@ -157,13 +157,2 @@ <p align="center"><img src="https://eslint-react.xyz/logo.svg" alt="logo" width="150" /></p> | ||
| ### Category Based | ||
| <!-- TODO: Add hooks and performance presets later --> | ||
| <!-- - `hooks`\ --> | ||
| <!-- Enable all rules related to React Hooks. --> | ||
| <!-- - `performance`\ --> | ||
| <!-- Enable all rules related to React performance optimizations. --> | ||
| - `no-deprecated`\ | ||
| Enable all rules that disallow deprecated React APIs with "error" severity. | ||
| ### Other | ||
@@ -170,0 +159,0 @@ |
29033
-9.12%494
-14.53%211
-4.95%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed