@eslint-react/eslint-plugin
Advanced tools
+3
-3
| 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" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x"; | ||
| declare const plugin: ESLint.Plugin & { | ||
| type ConfigName = "all" | "disable-conflict-eslint-plugin-react" | "disable-conflict-eslint-plugin-react-hooks" | "disable-dom" | "disable-jsx" | "disable-rsc" | "disable-experimental" | "disable-type-checked" | "disable-web-api" | "dom" | "jsx" | "rsc" | "off" | "recommended" | "recommended-type-checked" | "recommended-typescript" | "strict" | "strict-type-checked" | "strict-typescript" | "web-api" | "x"; | ||
| declare const finalPlugin: ESLint.Plugin & { | ||
| /** | ||
@@ -13,2 +13,2 @@ * For more information about each preset, please refer to the documentation. | ||
| //#endregion | ||
| export { plugin as default }; | ||
| export { finalPlugin as default }; |
+234
-185
@@ -1,7 +0,8 @@ | ||
| import react from "eslint-plugin-react-x"; | ||
| import reactNamingConvention from "eslint-plugin-react-naming-convention"; | ||
| import reactWebApi from "eslint-plugin-react-web-api"; | ||
| import reactDom from "eslint-plugin-react-dom"; | ||
| import reactJsx from "eslint-plugin-react-jsx"; | ||
| import reactRsc from "eslint-plugin-react-rsc"; | ||
| import { DEFAULT_ESLINT_REACT_SETTINGS } from "@eslint-react/shared"; | ||
| import reactX from "eslint-plugin-react-x"; | ||
@@ -25,40 +26,45 @@ //#region \0rolldown/runtime.js | ||
| //#endregion | ||
| //#region package.json | ||
| var name$19 = "@eslint-react/eslint-plugin"; | ||
| var version = "3.0.0"; | ||
| //#endregion | ||
| //#region src/configs/dom.ts | ||
| var dom_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$18, | ||
| plugins: () => plugins$10, | ||
| rules: () => rules$19 | ||
| name: () => name$21, | ||
| rules: () => rules$21 | ||
| }); | ||
| const name$18 = "@eslint-react/dom"; | ||
| const rules$19 = { | ||
| "@eslint-react/dom/no-dangerously-set-innerhtml": "warn", | ||
| "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error", | ||
| "@eslint-react/dom/no-find-dom-node": "error", | ||
| "@eslint-react/dom/no-flush-sync": "error", | ||
| "@eslint-react/dom/no-hydrate": "error", | ||
| "@eslint-react/dom/no-namespace": "error", | ||
| "@eslint-react/dom/no-render": "error", | ||
| "@eslint-react/dom/no-render-return-value": "error", | ||
| "@eslint-react/dom/no-script-url": "warn", | ||
| "@eslint-react/dom/no-unsafe-iframe-sandbox": "warn", | ||
| "@eslint-react/dom/no-use-form-state": "error", | ||
| "@eslint-react/dom/no-void-elements-with-children": "error" | ||
| const name$21 = "@eslint-react/dom"; | ||
| const rules$21 = { | ||
| "@eslint-react/dom-no-dangerously-set-innerhtml": "warn", | ||
| "@eslint-react/dom-no-dangerously-set-innerhtml-with-children": "error", | ||
| "@eslint-react/dom-no-find-dom-node": "error", | ||
| "@eslint-react/dom-no-flush-sync": "error", | ||
| "@eslint-react/dom-no-hydrate": "error", | ||
| "@eslint-react/dom-no-render": "error", | ||
| "@eslint-react/dom-no-render-return-value": "error", | ||
| "@eslint-react/dom-no-script-url": "warn", | ||
| "@eslint-react/dom-no-unsafe-iframe-sandbox": "warn", | ||
| "@eslint-react/dom-no-use-form-state": "error", | ||
| "@eslint-react/dom-no-void-elements-with-children": "error" | ||
| }; | ||
| const plugins$10 = { "@eslint-react/dom": reactDom }; | ||
| //#endregion | ||
| //#region src/configs/jsx.ts | ||
| var jsx_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$20, | ||
| rules: () => rules$20 | ||
| }); | ||
| const name$20 = "@eslint-react/jsx"; | ||
| const rules$20 = { | ||
| "@eslint-react/jsx-no-children-prop": "warn", | ||
| "@eslint-react/jsx-no-children-prop-with-children": "error", | ||
| "@eslint-react/jsx-no-comment-textnodes": "warn", | ||
| "@eslint-react/jsx-no-deoptimization": "error", | ||
| "@eslint-react/jsx-no-namespace": "error" | ||
| }; | ||
| //#endregion | ||
| //#region src/configs/rsc.ts | ||
| var rsc_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$17, | ||
| plugins: () => plugins$9, | ||
| rules: () => rules$18 | ||
| name: () => name$19, | ||
| rules: () => rules$19 | ||
| }); | ||
| const name$17 = "@eslint-react/rsc"; | ||
| const rules$18 = { "@eslint-react/rsc/function-definition": "error" }; | ||
| const plugins$9 = { "@eslint-react/rsc": reactRsc }; | ||
| const name$19 = "@eslint-react/rsc"; | ||
| const rules$19 = { "@eslint-react/rsc-function-definition": "error" }; | ||
@@ -68,14 +74,11 @@ //#endregion | ||
| var x_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$16, | ||
| plugins: () => plugins$8, | ||
| rules: () => rules$17, | ||
| name: () => name$18, | ||
| rules: () => rules$18, | ||
| settings: () => settings$8 | ||
| }); | ||
| const name$16 = "@eslint-react/x"; | ||
| const rules$17 = { | ||
| const name$18 = "@eslint-react/x"; | ||
| const rules$18 = { | ||
| "@eslint-react/component-hook-factories": "error", | ||
| "@eslint-react/error-boundaries": "error", | ||
| "@eslint-react/exhaustive-deps": "warn", | ||
| "@eslint-react/jsx-key-before-spread": "warn", | ||
| "@eslint-react/jsx-no-comment-textnodes": "warn", | ||
| "@eslint-react/no-access-state-in-setstate": "error", | ||
@@ -117,3 +120,2 @@ "@eslint-react/no-array-index-key": "warn", | ||
| }; | ||
| const plugins$8 = { "@eslint-react": react }; | ||
| const settings$8 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS }; | ||
@@ -124,9 +126,8 @@ | ||
| var all_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$15, | ||
| plugins: () => plugins$7, | ||
| rules: () => rules$16, | ||
| name: () => name$17, | ||
| rules: () => rules$17, | ||
| settings: () => settings$7 | ||
| }); | ||
| const name$15 = "@eslint-react/all"; | ||
| const rules$16 = { | ||
| const name$17 = "@eslint-react/all"; | ||
| const rules$17 = { | ||
| "@eslint-react/component-hook-factories": "error", | ||
@@ -136,7 +137,2 @@ "@eslint-react/error-boundaries": "error", | ||
| "@eslint-react/immutability": "error", | ||
| "@eslint-react/jsx-dollar": "warn", | ||
| "@eslint-react/jsx-key-before-spread": "warn", | ||
| "@eslint-react/jsx-no-comment-textnodes": "warn", | ||
| "@eslint-react/jsx-shorthand-boolean": "warn", | ||
| "@eslint-react/jsx-shorthand-fragment": "warn", | ||
| "@eslint-react/no-access-state-in-setstate": "error", | ||
@@ -148,3 +144,2 @@ "@eslint-react/no-array-index-key": "warn", | ||
| "@eslint-react/no-children-only": "warn", | ||
| "@eslint-react/no-children-prop": "warn", | ||
| "@eslint-react/no-children-to-array": "warn", | ||
@@ -182,3 +177,2 @@ "@eslint-react/no-class-component": "warn", | ||
| "@eslint-react/no-use-context": "warn", | ||
| "@eslint-react/no-useless-fragment": "warn", | ||
| "@eslint-react/prefer-destructuring-assignment": "warn", | ||
@@ -194,36 +188,34 @@ "@eslint-react/prefer-namespace-import": "warn", | ||
| "@eslint-react/use-state": "warn", | ||
| "@eslint-react/dom/no-dangerously-set-innerhtml": "warn", | ||
| "@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error", | ||
| "@eslint-react/dom/no-find-dom-node": "error", | ||
| "@eslint-react/dom/no-flush-sync": "error", | ||
| "@eslint-react/dom/no-hydrate": "error", | ||
| "@eslint-react/dom/no-missing-button-type": "warn", | ||
| "@eslint-react/dom/no-missing-iframe-sandbox": "warn", | ||
| "@eslint-react/dom/no-namespace": "error", | ||
| "@eslint-react/dom/no-render": "error", | ||
| "@eslint-react/dom/no-render-return-value": "error", | ||
| "@eslint-react/dom/no-script-url": "warn", | ||
| "@eslint-react/dom/no-string-style-prop": "error", | ||
| "@eslint-react/dom/no-unknown-property": "warn", | ||
| "@eslint-react/dom/no-unsafe-iframe-sandbox": "warn", | ||
| "@eslint-react/dom/no-unsafe-target-blank": "warn", | ||
| "@eslint-react/dom/no-use-form-state": "warn", | ||
| "@eslint-react/dom/no-void-elements-with-children": "error", | ||
| "@eslint-react/dom/prefer-namespace-import": "warn", | ||
| "@eslint-react/rsc/function-definition": "error", | ||
| "@eslint-react/web-api/no-leaked-event-listener": "warn", | ||
| "@eslint-react/web-api/no-leaked-interval": "warn", | ||
| "@eslint-react/web-api/no-leaked-resize-observer": "warn", | ||
| "@eslint-react/web-api/no-leaked-timeout": "warn", | ||
| "@eslint-react/naming-convention/context-name": "warn", | ||
| "@eslint-react/naming-convention/id-name": "warn", | ||
| "@eslint-react/naming-convention/ref-name": "warn" | ||
| "@eslint-react/jsx-no-children-prop": "warn", | ||
| "@eslint-react/jsx-no-children-prop-with-children": "error", | ||
| "@eslint-react/jsx-no-comment-textnodes": "warn", | ||
| "@eslint-react/jsx-no-deoptimization": "error", | ||
| "@eslint-react/jsx-no-namespace": "error", | ||
| "@eslint-react/jsx-no-useless-fragment": "warn", | ||
| "@eslint-react/rsc-function-definition": "error", | ||
| "@eslint-react/dom-no-dangerously-set-innerhtml": "warn", | ||
| "@eslint-react/dom-no-dangerously-set-innerhtml-with-children": "error", | ||
| "@eslint-react/dom-no-find-dom-node": "error", | ||
| "@eslint-react/dom-no-flush-sync": "error", | ||
| "@eslint-react/dom-no-hydrate": "error", | ||
| "@eslint-react/dom-no-missing-button-type": "warn", | ||
| "@eslint-react/dom-no-missing-iframe-sandbox": "warn", | ||
| "@eslint-react/dom-no-render": "error", | ||
| "@eslint-react/dom-no-render-return-value": "error", | ||
| "@eslint-react/dom-no-script-url": "warn", | ||
| "@eslint-react/dom-no-string-style-prop": "error", | ||
| "@eslint-react/dom-no-unknown-property": "warn", | ||
| "@eslint-react/dom-no-unsafe-iframe-sandbox": "warn", | ||
| "@eslint-react/dom-no-unsafe-target-blank": "warn", | ||
| "@eslint-react/dom-no-use-form-state": "warn", | ||
| "@eslint-react/dom-no-void-elements-with-children": "error", | ||
| "@eslint-react/dom-prefer-namespace-import": "warn", | ||
| "@eslint-react/web-api-no-leaked-event-listener": "warn", | ||
| "@eslint-react/web-api-no-leaked-interval": "warn", | ||
| "@eslint-react/web-api-no-leaked-resize-observer": "warn", | ||
| "@eslint-react/web-api-no-leaked-timeout": "warn", | ||
| "@eslint-react/naming-convention-context-name": "warn", | ||
| "@eslint-react/naming-convention-id-name": "warn", | ||
| "@eslint-react/naming-convention-ref-name": "warn" | ||
| }; | ||
| const plugins$7 = { | ||
| ...plugins$8, | ||
| ...plugins$9, | ||
| ...plugins$10, | ||
| "@eslint-react/naming-convention": reactNamingConvention, | ||
| "@eslint-react/web-api": reactWebApi | ||
| }; | ||
| const settings$7 = { ...settings$8 }; | ||
@@ -234,7 +226,7 @@ | ||
| var disable_conflict_eslint_plugin_react_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$14, | ||
| rules: () => rules$15 | ||
| name: () => name$16, | ||
| rules: () => rules$16 | ||
| }); | ||
| const name$14 = "@eslint-react/disable-conflict-eslint-plugin-react"; | ||
| const rules$15 = react.configs["disable-conflict-eslint-plugin-react"].rules ?? {}; | ||
| const name$16 = "@eslint-react/disable-conflict-eslint-plugin-react"; | ||
| const rules$16 = reactX.configs["disable-conflict-eslint-plugin-react"].rules ?? {}; | ||
@@ -244,7 +236,7 @@ //#endregion | ||
| var disable_conflict_eslint_plugin_react_hooks_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$13, | ||
| rules: () => rules$14 | ||
| name: () => name$15, | ||
| rules: () => rules$15 | ||
| }); | ||
| const name$13 = "@eslint-react/disable-conflict-eslint-plugin-react-hooks"; | ||
| const rules$14 = react.configs["disable-conflict-eslint-plugin-react-hooks"].rules ?? {}; | ||
| const name$15 = "@eslint-react/disable-conflict-eslint-plugin-react-hooks"; | ||
| const rules$15 = reactX.configs["disable-conflict-eslint-plugin-react-hooks"].rules ?? {}; | ||
@@ -254,7 +246,7 @@ //#endregion | ||
| var disable_dom_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$12, | ||
| rules: () => rules$13 | ||
| name: () => name$14, | ||
| rules: () => rules$14 | ||
| }); | ||
| const name$12 = "@eslint-react/disable-dom"; | ||
| const rules$13 = Object.fromEntries(Object.entries(rules$19).map(([key]) => [key, "off"])); | ||
| const name$14 = "@eslint-react/disable-dom"; | ||
| const rules$14 = Object.fromEntries(Object.entries(rules$21).map(([key]) => [key, "off"])); | ||
@@ -264,9 +256,8 @@ //#endregion | ||
| var disable_experimental_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$11, | ||
| rules: () => rules$12 | ||
| name: () => name$13, | ||
| rules: () => rules$13 | ||
| }); | ||
| const name$11 = "@eslint-react/disable-experimental"; | ||
| const rules$12 = { | ||
| const name$13 = "@eslint-react/disable-experimental"; | ||
| const rules$13 = { | ||
| "@eslint-react/immutability": "off", | ||
| "@eslint-react/jsx-key-before-spread": "off", | ||
| "@eslint-react/no-duplicate-key": "off", | ||
@@ -284,13 +275,24 @@ "@eslint-react/no-implicit-children": "off", | ||
| "@eslint-react/unstable-rules-of-state": "off", | ||
| "@eslint-react/rsc/function-definition": "off" | ||
| "@eslint-react/jsx-no-deoptimization": "off", | ||
| "@eslint-react/jsx-no-namespace": "off", | ||
| "@eslint-react/rsc-function-definition": "off" | ||
| }; | ||
| //#endregion | ||
| //#region src/configs/disable-jsx.ts | ||
| var disable_jsx_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$12, | ||
| rules: () => rules$12 | ||
| }); | ||
| const name$12 = "@eslint-react/disable-jsx"; | ||
| const rules$12 = Object.fromEntries(Object.entries(rules$20).map(([key]) => [key, "off"])); | ||
| //#endregion | ||
| //#region src/configs/disable-rsc.ts | ||
| var disable_rsc_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$10, | ||
| name: () => name$11, | ||
| rules: () => rules$11 | ||
| }); | ||
| const name$10 = "@eslint-react/disable-rsc"; | ||
| const rules$11 = Object.fromEntries(Object.entries(rules$18).map(([key]) => [key, "off"])); | ||
| const name$11 = "@eslint-react/disable-rsc"; | ||
| const rules$11 = Object.fromEntries(Object.entries(rules$19).map(([key]) => [key, "off"])); | ||
@@ -300,6 +302,6 @@ //#endregion | ||
| var disable_type_checked_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$9, | ||
| name: () => name$10, | ||
| rules: () => rules$10 | ||
| }); | ||
| const name$9 = "@eslint-react/disable-type-checked"; | ||
| const name$10 = "@eslint-react/disable-type-checked"; | ||
| const rules$10 = { | ||
@@ -316,15 +318,13 @@ "@eslint-react/no-implicit-children": "off", | ||
| var web_api_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$8, | ||
| plugins: () => plugins$6, | ||
| name: () => name$9, | ||
| rules: () => rules$9, | ||
| settings: () => settings$6 | ||
| }); | ||
| const name$8 = "@eslint-react/web-api"; | ||
| const name$9 = "@eslint-react/web-api"; | ||
| const rules$9 = { | ||
| "@eslint-react/web-api/no-leaked-event-listener": "warn", | ||
| "@eslint-react/web-api/no-leaked-interval": "warn", | ||
| "@eslint-react/web-api/no-leaked-resize-observer": "warn", | ||
| "@eslint-react/web-api/no-leaked-timeout": "warn" | ||
| "@eslint-react/web-api-no-leaked-event-listener": "warn", | ||
| "@eslint-react/web-api-no-leaked-interval": "warn", | ||
| "@eslint-react/web-api-no-leaked-resize-observer": "warn", | ||
| "@eslint-react/web-api-no-leaked-timeout": "warn" | ||
| }; | ||
| const plugins$6 = { "@eslint-react/web-api": reactWebApi }; | ||
| const settings$6 = { ...settings$8 }; | ||
@@ -335,6 +335,6 @@ | ||
| var disable_web_api_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$7, | ||
| name: () => name$8, | ||
| rules: () => rules$8 | ||
| }); | ||
| const name$7 = "@eslint-react/disable-web-api"; | ||
| const name$8 = "@eslint-react/disable-web-api"; | ||
| const rules$8 = Object.fromEntries(Object.entries(rules$9).map(([key]) => [key, "off"])); | ||
@@ -345,8 +345,8 @@ | ||
| var off_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$6, | ||
| name: () => name$7, | ||
| rules: () => rules$7 | ||
| }); | ||
| const name$6 = "@eslint-react/off"; | ||
| const name$7 = "@eslint-react/off"; | ||
| const rules$7 = { | ||
| ...Object.fromEntries(Object.entries(rules$16).map(([key]) => [key, "off"])), | ||
| ...Object.fromEntries(Object.entries(rules$17).map(([key]) => [key, "off"])), | ||
| ...rules$10 | ||
@@ -358,25 +358,18 @@ }; | ||
| var recommended_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$5, | ||
| plugins: () => plugins$5, | ||
| name: () => name$6, | ||
| rules: () => rules$6, | ||
| settings: () => settings$5 | ||
| }); | ||
| const name$5 = "@eslint-react/recommended"; | ||
| const name$6 = "@eslint-react/recommended"; | ||
| const rules$6 = { | ||
| ...rules$17, | ||
| ...rules$18, | ||
| ...rules$20, | ||
| ...rules$19, | ||
| ...rules$21, | ||
| ...rules$9, | ||
| "@eslint-react/naming-convention/context-name": "warn", | ||
| "@eslint-react/naming-convention/id-name": "warn", | ||
| "@eslint-react/naming-convention/ref-name": "warn", | ||
| "@eslint-react/naming-convention-context-name": "warn", | ||
| "@eslint-react/naming-convention-id-name": "warn", | ||
| "@eslint-react/naming-convention-ref-name": "warn", | ||
| "@eslint-react/use-state": "warn" | ||
| }; | ||
| const plugins$5 = { | ||
| ...plugins$8, | ||
| ...plugins$9, | ||
| ...plugins$10, | ||
| ...plugins$6, | ||
| "@eslint-react/naming-convention": reactNamingConvention | ||
| }; | ||
| const settings$5 = { ...settings$8 }; | ||
@@ -390,4 +383,4 @@ | ||
| const rules$5 = { | ||
| "@eslint-react/dom/no-string-style-prop": "off", | ||
| "@eslint-react/dom/no-unknown-property": "off" | ||
| "@eslint-react/dom-no-string-style-prop": "off", | ||
| "@eslint-react/dom-no-unknown-property": "off" | ||
| }; | ||
@@ -398,8 +391,7 @@ | ||
| var recommended_typescript_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$4, | ||
| plugins: () => plugins$4, | ||
| name: () => name$5, | ||
| rules: () => rules$4, | ||
| settings: () => settings$4 | ||
| }); | ||
| const name$4 = "@eslint-react/recommended-typescript"; | ||
| const name$5 = "@eslint-react/recommended-typescript"; | ||
| const rules$4 = { | ||
@@ -409,3 +401,2 @@ ...rules$6, | ||
| }; | ||
| const plugins$4 = { ...plugins$5 }; | ||
| const settings$4 = { ...settings$5 }; | ||
@@ -416,8 +407,7 @@ | ||
| var recommended_type_checked_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$3, | ||
| plugins: () => plugins$3, | ||
| name: () => name$4, | ||
| rules: () => rules$3, | ||
| settings: () => settings$3 | ||
| }); | ||
| const name$3 = "@eslint-react/recommended-type-checked"; | ||
| const name$4 = "@eslint-react/recommended-type-checked"; | ||
| const rules$3 = { | ||
@@ -427,3 +417,2 @@ ...rules$4, | ||
| }; | ||
| const plugins$3 = { ...plugins$4 }; | ||
| const settings$3 = { ...settings$4 }; | ||
@@ -434,11 +423,9 @@ | ||
| var strict_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$2, | ||
| plugins: () => plugins$2, | ||
| name: () => name$3, | ||
| rules: () => rules$2, | ||
| settings: () => settings$2 | ||
| }); | ||
| const name$2 = "@eslint-react/strict"; | ||
| const name$3 = "@eslint-react/strict"; | ||
| const rules$2 = { | ||
| ...rules$6, | ||
| "@eslint-react/no-children-prop": "error", | ||
| "@eslint-react/no-class-component": "error", | ||
@@ -451,9 +438,9 @@ "@eslint-react/no-misused-capture-owner-stack": "error", | ||
| "@eslint-react/no-unused-state": "warn", | ||
| "@eslint-react/no-useless-fragment": "warn", | ||
| "@eslint-react/prefer-destructuring-assignment": "warn", | ||
| "@eslint-react/dom/no-missing-button-type": "warn", | ||
| "@eslint-react/dom/no-missing-iframe-sandbox": "warn", | ||
| "@eslint-react/dom/no-unsafe-target-blank": "warn" | ||
| "@eslint-react/jsx-no-children-prop": "error", | ||
| "@eslint-react/jsx-no-useless-fragment": "warn", | ||
| "@eslint-react/dom-no-missing-button-type": "warn", | ||
| "@eslint-react/dom-no-missing-iframe-sandbox": "warn", | ||
| "@eslint-react/dom-no-unsafe-target-blank": "warn" | ||
| }; | ||
| const plugins$2 = { ...plugins$5 }; | ||
| const settings$2 = { ...settings$5 }; | ||
@@ -464,13 +451,11 @@ | ||
| var strict_typescript_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name$1, | ||
| plugins: () => plugins$1, | ||
| name: () => name$2, | ||
| rules: () => rules$1, | ||
| settings: () => settings$1 | ||
| }); | ||
| const name$1 = "@eslint-react/strict-typescript"; | ||
| const name$2 = "@eslint-react/strict-typescript"; | ||
| const rules$1 = { | ||
| ...rules$2, | ||
| ...rules$4 | ||
| ...rules$5 | ||
| }; | ||
| const plugins$1 = { ...plugins$2 }; | ||
| const settings$1 = { ...settings$2 }; | ||
@@ -481,8 +466,7 @@ | ||
| var strict_type_checked_exports = /* @__PURE__ */ __exportAll({ | ||
| name: () => name, | ||
| plugins: () => plugins, | ||
| name: () => name$1, | ||
| rules: () => rules, | ||
| settings: () => settings | ||
| }); | ||
| const name = "@eslint-react/strict-type-checked"; | ||
| const name$1 = "@eslint-react/strict-type-checked"; | ||
| const rules = { | ||
@@ -493,37 +477,102 @@ ...rules$1, | ||
| }; | ||
| const plugins = { ...plugins$1 }; | ||
| const settings = { ...settings$1 }; | ||
| //#endregion | ||
| //#region src/index.ts | ||
| //#region package.json | ||
| var name = "@eslint-react/eslint-plugin"; | ||
| var version = "4.0.0-beta.1"; | ||
| //#endregion | ||
| //#region src/utils/type-of.ts | ||
| /** | ||
| * This is an enhanced version of the typeof operator to check the type of more complex values. | ||
| * In this case we just mind about arrays and objects. We can add more on demand. | ||
| * @param t the value to be checked | ||
| * @returns the type of the value | ||
| */ | ||
| function typeOf(t) { | ||
| return Object.prototype.toString.call(t).replace(/^\[object (.+)\]$/, "$1").toLowerCase(); | ||
| } | ||
| //#endregion | ||
| //#region src/utils/transform-keys.ts | ||
| /** | ||
| * This function is used to shallowly transform the keys of an object. | ||
| * It will only be transformed at runtime, so it's not type safe. | ||
| * @param obj the object to transform. | ||
| * @param transform the function to transform the keys from string to string. | ||
| * @returns the transformed object. | ||
| * @example transformKeys({ 'foo-bar': { 'fizz-buzz': true } }, camelCase) | ||
| * // { fooBar: { 'fizz-buzz': true } } | ||
| */ | ||
| function transformKeys(obj, transform) { | ||
| if (typeOf(obj) !== "object") return obj; | ||
| const res = {}; | ||
| for (const key in obj) res[transform(key)] = obj[key]; | ||
| return res; | ||
| } | ||
| //#endregion | ||
| //#region src/utils/pad-keys-left.ts | ||
| function padKeysLeft(obj, left) { | ||
| return transformKeys(obj, (key) => `${left}${key}`); | ||
| } | ||
| //#endregion | ||
| //#region src/plugin.ts | ||
| const plugin = { | ||
| meta: { | ||
| name: name$19, | ||
| name, | ||
| version | ||
| }, | ||
| rules: { | ||
| ...reactX.rules, | ||
| ...padKeysLeft(reactX.rules, "x-"), | ||
| ...padKeysLeft(reactJsx.rules, "jsx-"), | ||
| ...padKeysLeft(reactRsc.rules, "rsc-"), | ||
| ...padKeysLeft(reactDom.rules, "dom-"), | ||
| ...padKeysLeft(reactWebApi.rules, "web-api-"), | ||
| ...padKeysLeft(reactNamingConvention.rules, "naming-convention-") | ||
| } | ||
| }; | ||
| //#endregion | ||
| //#region src/index.ts | ||
| function createConfig(base) { | ||
| return { | ||
| ...base, | ||
| plugins: { | ||
| ...base.plugins, | ||
| "@eslint-react": plugin | ||
| } | ||
| }; | ||
| } | ||
| const finalPlugin = { | ||
| ...plugin, | ||
| configs: { | ||
| ["all"]: all_exports, | ||
| ["disable-conflict-eslint-plugin-react"]: disable_conflict_eslint_plugin_react_exports, | ||
| ["disable-conflict-eslint-plugin-react-hooks"]: disable_conflict_eslint_plugin_react_hooks_exports, | ||
| ["disable-dom"]: disable_dom_exports, | ||
| ["disable-experimental"]: disable_experimental_exports, | ||
| ["disable-rsc"]: disable_rsc_exports, | ||
| ["disable-type-checked"]: disable_type_checked_exports, | ||
| ["disable-web-api"]: disable_web_api_exports, | ||
| ["dom"]: dom_exports, | ||
| ["off"]: off_exports, | ||
| ["recommended"]: recommended_exports, | ||
| ["recommended-type-checked"]: recommended_type_checked_exports, | ||
| ["recommended-typescript"]: recommended_typescript_exports, | ||
| ["rsc"]: rsc_exports, | ||
| ["strict"]: strict_exports, | ||
| ["strict-type-checked"]: strict_type_checked_exports, | ||
| ["strict-typescript"]: strict_typescript_exports, | ||
| ["web-api"]: web_api_exports, | ||
| ["x"]: x_exports | ||
| }, | ||
| rules: { ...react.rules } | ||
| ["all"]: createConfig(all_exports), | ||
| ["disable-conflict-eslint-plugin-react"]: createConfig(disable_conflict_eslint_plugin_react_exports), | ||
| ["disable-conflict-eslint-plugin-react-hooks"]: createConfig(disable_conflict_eslint_plugin_react_hooks_exports), | ||
| ["disable-dom"]: createConfig(disable_dom_exports), | ||
| ["disable-experimental"]: createConfig(disable_experimental_exports), | ||
| ["disable-jsx"]: createConfig(disable_jsx_exports), | ||
| ["disable-rsc"]: createConfig(disable_rsc_exports), | ||
| ["disable-type-checked"]: createConfig(disable_type_checked_exports), | ||
| ["disable-web-api"]: createConfig(disable_web_api_exports), | ||
| ["dom"]: createConfig(dom_exports), | ||
| ["jsx"]: createConfig(jsx_exports), | ||
| ["off"]: createConfig(off_exports), | ||
| ["recommended"]: createConfig(recommended_exports), | ||
| ["recommended-type-checked"]: createConfig(recommended_type_checked_exports), | ||
| ["recommended-typescript"]: createConfig(recommended_typescript_exports), | ||
| ["rsc"]: createConfig(rsc_exports), | ||
| ["strict"]: createConfig(strict_exports), | ||
| ["strict-type-checked"]: createConfig(strict_type_checked_exports), | ||
| ["strict-typescript"]: createConfig(strict_typescript_exports), | ||
| ["web-api"]: createConfig(web_api_exports), | ||
| ["x"]: createConfig(x_exports) | ||
| } | ||
| }; | ||
| //#endregion | ||
| export { plugin as default }; | ||
| export { finalPlugin as default }; |
+15
-13
| { | ||
| "name": "@eslint-react/eslint-plugin", | ||
| "version": "3.0.0", | ||
| "version": "4.0.0-beta.1", | ||
| "description": "A unified plugin that combines all individual plugins from the eslint-react monorepo into one.", | ||
@@ -11,2 +11,3 @@ "keywords": [ | ||
| "eslint-plugin-react-x", | ||
| "eslint-plugin-react-jsx", | ||
| "eslint-plugin-react-rsc", | ||
@@ -45,16 +46,17 @@ "eslint-plugin-react-dom", | ||
| "dependencies": { | ||
| "@typescript-eslint/scope-manager": "^8.57.0", | ||
| "@typescript-eslint/type-utils": "^8.57.0", | ||
| "@typescript-eslint/types": "^8.57.0", | ||
| "@typescript-eslint/utils": "^8.57.0", | ||
| "ts-api-utils": "^2.4.0", | ||
| "eslint-plugin-react-dom": "3.0.0", | ||
| "eslint-plugin-react-naming-convention": "3.0.0", | ||
| "eslint-plugin-react-rsc": "3.0.0", | ||
| "@eslint-react/shared": "3.0.0", | ||
| "eslint-plugin-react-x": "3.0.0", | ||
| "eslint-plugin-react-web-api": "3.0.0" | ||
| "@typescript-eslint/scope-manager": "^8.57.2", | ||
| "@typescript-eslint/type-utils": "^8.57.2", | ||
| "@typescript-eslint/types": "^8.57.2", | ||
| "@typescript-eslint/utils": "^8.57.2", | ||
| "ts-api-utils": "^2.5.0", | ||
| "@eslint-react/shared": "4.0.0-beta.1", | ||
| "eslint-plugin-react-dom": "4.0.0-beta.1", | ||
| "eslint-plugin-react-jsx": "4.0.0-beta.1", | ||
| "eslint-plugin-react-naming-convention": "4.0.0-beta.1", | ||
| "eslint-plugin-react-rsc": "4.0.0-beta.1", | ||
| "eslint-plugin-react-web-api": "4.0.0-beta.1", | ||
| "eslint-plugin-react-x": "4.0.0-beta.1" | ||
| }, | ||
| "devDependencies": { | ||
| "tsdown": "^0.21.2", | ||
| "tsdown": "^0.21.4", | ||
| "@local/configs": "0.0.0", | ||
@@ -61,0 +63,0 @@ "@local/eff": "3.0.0-beta.72" |
+17
-1
@@ -8,3 +8,3 @@ <p align="center"><img src="https://eslint-react.xyz/logo.svg" alt="logo" width="150" /></p> | ||
| [](https://github.com/Rel1cx/eslint-react/blob/main/LICENSE) | ||
| [](https://tsdown.dev) | ||
| [](https://tsdown.dev) | ||
@@ -35,2 +35,3 @@ 4-7x faster, composable ESLint rules for React and friends. | ||
| - [Disclaimer](#disclaimer) | ||
| - [Sponsors](#sponsors) | ||
| - [Contributing](#contributing) | ||
@@ -51,2 +52,3 @@ - [License](#license) | ||
| - [`eslint-plugin-react-x`](https://npmx.dev/package/eslint-plugin-react-x) - X rules (renderer-agnostic, compatible with x-platform). | ||
| - [`eslint-plugin-react-jsx`](https://npmx.dev/package/eslint-plugin-react-jsx) - React Flavored JSX rules. | ||
| - [`eslint-plugin-react-rsc`](https://npmx.dev/package/eslint-plugin-react-rsc) - Rules for React Server Components. | ||
@@ -130,2 +132,4 @@ - [`eslint-plugin-react-dom`](https://npmx.dev/package/eslint-plugin-react-dom) - DOM-specific rules for React DOM. | ||
| Enable rules for React. | ||
| - `jsx`\ | ||
| Enable rules for React Flavored JSX. | ||
| - `rsc`\ | ||
@@ -163,2 +167,4 @@ Enable rules for React Server Components. | ||
| - `disable-jsx`\ | ||
| Disable rules in the `jsx` preset. | ||
| - `disable-rsc`\ | ||
@@ -209,2 +215,12 @@ Disable rules in the `rsc` preset. | ||
| ## Sponsors | ||
| A huge thank you to our amazing sponsors who make this project possible. | ||
| <p align="center"> | ||
| <a href="##"> | ||
| <img src=".github/sponsors.svg" alt="Sponsors" /> | ||
| </a> | ||
| </p> | ||
| ## Contributing | ||
@@ -211,0 +227,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
31141
7.86%531
8.81%229
7.51%14
7.69%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated