@anolilab/eslint-config 6.0.2 → 6.1.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +6 -5
  3. package/dist/config/plugins/babel.js +3 -2
  4. package/dist/config/plugins/babel.js.map +1 -1
  5. package/dist/config/plugins/babel.mjs +7 -6
  6. package/dist/config/plugins/babel.mjs.map +1 -1
  7. package/dist/config/plugins/html.js +5 -2
  8. package/dist/config/plugins/html.js.map +1 -1
  9. package/dist/config/plugins/html.mjs +5 -2
  10. package/dist/config/plugins/html.mjs.map +1 -1
  11. package/dist/config/plugins/jsdoc.js +2 -2
  12. package/dist/config/plugins/jsdoc.js.map +1 -1
  13. package/dist/config/plugins/jsdoc.mjs +2 -2
  14. package/dist/config/plugins/jsdoc.mjs.map +1 -1
  15. package/dist/config/plugins/jsonc.js +2 -4
  16. package/dist/config/plugins/jsonc.js.map +1 -1
  17. package/dist/config/plugins/jsonc.mjs +2 -4
  18. package/dist/config/plugins/jsonc.mjs.map +1 -1
  19. package/dist/config/plugins/node.js.map +1 -1
  20. package/dist/config/plugins/node.mjs.map +1 -1
  21. package/dist/config/plugins/react.js +1 -1
  22. package/dist/config/plugins/react.js.map +1 -1
  23. package/dist/config/plugins/react.mjs +1 -1
  24. package/dist/config/plugins/react.mjs.map +1 -1
  25. package/dist/config/plugins/typescript.js +2 -4
  26. package/dist/config/plugins/typescript.js.map +1 -1
  27. package/dist/config/plugins/typescript.mjs +2 -4
  28. package/dist/config/plugins/typescript.mjs.map +1 -1
  29. package/dist/config/plugins/unicorn.js +3 -3
  30. package/dist/config/plugins/unicorn.js.map +1 -1
  31. package/dist/config/plugins/unicorn.mjs +2 -2
  32. package/dist/config/plugins/unicorn.mjs.map +1 -1
  33. package/dist/index.js +8 -7
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +9 -8
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/postinstall.js.map +1 -1
  38. package/dist/postinstall.mjs.map +1 -1
  39. package/package.json +9 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/react.ts"],"names":["hasAnyDep","pkg","findUp","styleRules","style_default","dangleRules","prettierReactRules","hasJsxRuntime","reactPath","consoleLog","packageDependencies","reactDependency","config","react_default"],"mappings":"wFACA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAOC,MAAY,UAKnB,IAAMC,EAAaC,EAAY,MACzBC,EAAcF,EAAW,sBAAsB,EAEjDG,EAAqB,CAAC,EAGtBN,EAAU,CAAC,QAAS,WAAW,EAAG,CAC9B,SAAU,EACd,CAAC,IAEDM,EAAqB,CACjB,mBAAoB,MACpB,iCAAkC,MAClC,qCAAsC,MACtC,0BAA2B,MAC3B,2BAA4B,MAC5B,gCAAiC,MACjC,yBAA0B,MAC1B,+BAAgC,MAChC,wBAAyB,MACzB,4BAA6B,MAC7B,kCAAmC,MACnC,oCAAqC,MACrC,kCAAmC,KACvC,GAGJ,IAAMC,GAAiB,IAAM,CAEzB,GAAI,CAAC,OAAO,wCAAyC,CACjD,IAAMC,EAAYN,EAAO,KAAK,mCAAmC,EAE7D,OAAOM,GAAc,UACrBC,EAAW;AAAA;AAAA;AAAA;AAAA;AAAA,CAEkE,EAGjF,OAAO,wCAA0C,OAAOD,GAAc,SAG1E,OAAO,OAAO,uCAClB,GAAG,EAEGE,EAAsBT,GAAK,cAAgB,CAAC,EAC5CU,GAAmBD,GAAsB,OAAY,IAAI,MAAM,GAAG,EAElEE,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,QAAS,OAAO,EAExB,QAAS,CAAC,OAAO,EAEjB,IAAK,CACD,QAAS,EACb,EAEA,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EAEA,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,MAAO,OAAQ,QAAS,OAAQ,MAAM,CACvD,CACJ,EACA,MAAO,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AAuB,CAAC,QAAS,QAAQ,EAIzC,0BAA2B,CACvB,QACA,CACI,UAAW,aACX,WAAY,YAChB,CACJ,EAKA,6BAA8B,CAAC,QAAS,QAAQ,EAKhD,kCAAmC,CAAC,QAAS,qBAAqB,EAIlE,+BAAgC,CAC5B,QACA,CACI,KAAM,UACN,OAAQ,UACR,eAAgB,SAChB,WAAY,CAAC,CACjB,CACJ,EAIA,+BAAgC,MAIhC,0BAA2B,CACvB,QACA,CACI,CACI,KAAM,OACN,MAAO,CAAC,IAAI,CAChB,CACJ,CACJ,EAIA,gCAAiC,QAIjC,oCAAqC,QAIrC,sCAAuC,CACnC,QACA,CACI,gBAAiB,iBACjB,kBAAmB,gBACvB,CACJ,EAIA,oBAAqB,MAIrB,0CAA2C,QAE3C,GAAGG,CACP,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAGH,+BAAgC,QAIhC,iBAAkB,QAIlB,iCAAkC,QAIlC,4BAA6B,CACzB,QACA,CAEI,YAAa,kBACb,WAAY,kBACZ,OAAQ,kBACR,MAAO,kBACP,UAAW,kBACX,QAAS,kBACT,KAAM,iBACV,CACJ,CACJ,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAEH,+BAAgC,MAChC,uCAAwC,MACxC,mBAAoB,KACxB,CACJ,CACJ,CACJ,EAEOO,EAAQD","sourcesContent":["// @see https://github.com/yannickcr/eslint-plugin-react\nimport { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport findUp from \"find-up\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\nconst dangleRules = styleRules[\"no-underscore-dangle\"] as any[];\n\nlet prettierReactRules = {};\n\nif (\n hasAnyDep([\"react\", \"react-dom\"], {\n peerDeps: false,\n })\n) {\n prettierReactRules = {\n \"react/jsx-indent\": \"off\",\n \"react/jsx-closing-tag-location\": \"off\",\n \"react/jsx-closing-bracket-location\": \"off\",\n \"react/jsx-curly-spacing\": \"off\",\n \"react/jsx-equals-spacing\": \"off\",\n \"react/jsx-first-prop-new-line\": \"off\",\n \"react/jsx-indent-props\": \"off\",\n \"react/jsx-max-props-per-line\": \"off\",\n \"react/jsx-tag-spacing\": \"off\",\n \"react/jsx-wrap-multilines\": \"off\",\n \"react/prefer-stateless-function\": \"off\",\n \"react/jsx-one-expression-per-line\": \"off\",\n \"react/jsx-props-no-multi-spaces\": \"off\",\n };\n}\n\nconst hasJsxRuntime = (() => {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigReactRuntimePath) {\n const reactPath = findUp.sync(\"node_modules/react/jsx-runtime.js\");\n\n if (typeof reactPath === \"string\") {\n consoleLog(`\\n@anolilab/eslint-config found react jsx-runtime. \\n\n Following rules are disabled: \"react/jsx-uses-react\" and \"react/react-in-jsx-scope\".\n If you dont use the new react jsx-runtime in you project, please enable it manually.\\n`);\n }\n\n global.hasAnolilabEsLintConfigReactRuntimePath = typeof reactPath === \"string\";\n }\n\n return global.hasAnolilabEsLintConfigReactRuntimePath;\n})();\n\nconst packageDependencies = pkg?.dependencies ?? {};\nconst reactDependency = (packageDependencies?.[\"react\"] ?? \"\").split(\".\");\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.jsx\", \"*.tsx\"],\n\n plugins: [\"react\"],\n\n env: {\n browser: true,\n },\n\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".js\", \".jsx\", \".json\", \".cjs\", \".mjs\"],\n },\n },\n react: {\n // The default value is \"detect\". Automatic detection works by loading the entire React library\n // into the linter's process, which is inefficient. It is recommended to specify the version\n // explicity.\n version: reactDependency[0] ? `${reactDependency[0]}.${reactDependency[1] ?? \"0\"}}` : \"detect\",\n },\n propWrapperFunctions: [\n \"forbidExtraProps\", // https://www.npmjs.com/package/airbnb-prop-types\n \"exact\", // https://www.npmjs.com/package/prop-types-exact\n \"Object.freeze\", // https://tc39.github.io/ecma262/#sec-object.freeze\n ],\n },\n\n // View link below for react rules documentation\n // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules\n rules: {\n \"no-underscore-dangle\": [\n dangleRules[0],\n {\n ...dangleRules[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n allow: [...dangleRules[1].allow, \"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\"],\n },\n ],\n\n // Specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"error\", \"prefer-double\"],\n\n \"class-methods-use-this\": [\n \"error\",\n {\n exceptMethods: [\n \"render\",\n \"getInitialState\",\n \"getDefaultProps\",\n \"getChildContext\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"componentDidUpdate\",\n \"componentWillUnmount\",\n \"componentDidCatch\",\n \"getSnapshotBeforeUpdate\",\n ],\n },\n ],\n\n // Prevent missing displayName in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md\n \"react/display-name\": [\"off\", { ignoreTranspilerName: false }],\n\n // Forbid certain propTypes (any, array, object)\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md\n \"react/forbid-prop-types\": [\n \"error\",\n {\n forbid: [\"any\", \"array\", \"object\"],\n checkContextTypes: true,\n checkChildContextTypes: true,\n },\n ],\n\n // Forbid certain props on DOM Nodes\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md\n \"react/forbid-dom-props\": [\"off\", { forbid: [] }],\n\n // Enforce boolean attributes notation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\", { always: [] }],\n\n // Validate closing bracket location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md\n \"react/jsx-closing-bracket-location\": [\"error\", \"line-aligned\"],\n\n // Enforce or disallow spaces inside of curly braces in JSX attributes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md\n \"react/jsx-curly-spacing\": [\"error\", \"never\", { allowMultiline: true }],\n\n // Enforce event handler naming conventions in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md\n \"react/jsx-handler-names\": [\n \"off\",\n {\n eventHandlerPrefix: \"handle\",\n eventHandlerPropPrefix: \"on\",\n },\n ],\n\n // Validate props indentation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md\n \"react/jsx-indent-props\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number],\n\n // Validate JSX has key prop when in array or iterator\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": \"off\",\n\n // Limit maximum of props on a single line in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md\n \"react/jsx-max-props-per-line\": [\"error\", { maximum: 1, when: \"multiline\" }],\n\n // Prevent usage of .bind() in JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": [\n \"error\",\n {\n ignoreRefs: true,\n allowArrowFunctions: true,\n allowFunctions: false,\n allowBind: false,\n ignoreDOMComponents: true,\n },\n ],\n\n // Prevent duplicate props in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": [\"error\", { ignoreCase: true }],\n\n // Prevent usage of unwrapped JSX strings\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md\n \"react/jsx-no-literals\": [\"off\", { noStrings: true }],\n\n // Disallow undeclared variables in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // Enforce PascalCase for user-defined JSX components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: true,\n ignore: [],\n },\n ],\n\n // Enforce propTypes declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md\n \"react/sort-prop-types\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n requiredFirst: false,\n sortShapeProp: true,\n },\n ],\n\n // Enforce props alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md\n \"react/jsx-sort-props\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n shorthandFirst: false,\n shorthandLast: false,\n noSortAlphabetically: false,\n reservedFirst: true,\n },\n ],\n\n // Prevent React to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": [hasJsxRuntime ? \"off\" : \"error\"],\n\n // Prevent variables used in JSX to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md\n \"react/jsx-uses-vars\": \"error\",\n\n // Prevent usage of dangerous JSX properties\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Prevent usage of deprecated methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": [\"error\"],\n\n // Prevent usage of setState in componentDidMount\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md\n // this is necessary for server-rendering\n \"react/no-did-mount-set-state\": \"off\",\n\n // Prevent usage of setState in componentDidUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md\n \"react/no-did-update-set-state\": \"error\",\n\n // Prevent usage of setState in componentWillUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md\n \"react/no-will-update-set-state\": \"error\",\n\n // Prevent direct mutation of this.state\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent usage of isMounted\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md\n \"react/no-is-mounted\": \"error\",\n\n // Prevent multiple component definition per file\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"off\",\n\n // Prevent usage of setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md\n \"react/no-set-state\": \"off\",\n\n // Prevent using string references\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Prevent usage of unknown DOM property\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Require ES6 class declarations over React.createClass\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md\n \"react/prefer-es6-class\": [\"error\", \"always\"],\n\n // Require stateless functions when not using lifecycle methods, setState or ref\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md\n \"react/prefer-stateless-function\": [\"error\", { ignorePureComponents: true }],\n\n // Prevent missing props validation in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": [\n \"error\",\n {\n ignore: [],\n customValidators: [],\n skipUndeclared: false,\n },\n ],\n\n // Prevent missing React when using JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": hasJsxRuntime ? \"off\" : \"error\",\n\n // Require render() methods to return something\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md\n \"react/require-render-return\": \"error\",\n\n // Prevent extra closing tags for components without children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Enforce defaultProps declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-default-props.md\n \"react/sort-default-props\": [\n \"error\",\n {\n ignoreCase: true,\n },\n ],\n\n // Enforce component methods order\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md\n \"react/sort-comp\": [\n \"error\",\n {\n order: [\n \"static-variables\",\n \"static-methods\",\n \"instance-variables\",\n \"lifecycle\",\n \"/^handle.+$/\",\n \"/^on.+$/\",\n \"getters\",\n \"setters\",\n \"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/\",\n \"instance-methods\",\n \"everything-else\",\n \"rendering\",\n ],\n groups: {\n lifecycle: [\n \"displayName\",\n \"propTypes\",\n \"contextTypes\",\n \"childContextTypes\",\n \"mixins\",\n \"statics\",\n \"defaultProps\",\n \"constructor\",\n \"getDefaultProps\",\n \"getInitialState\",\n \"state\",\n \"getChildContext\",\n \"getDerivedStateFromProps\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"getSnapshotBeforeUpdate\",\n \"componentDidUpdate\",\n \"componentDidCatch\",\n \"componentWillUnmount\",\n ],\n rendering: [\"/^render.+$/\", \"render\"],\n },\n },\n ],\n\n // Require that the first prop in a JSX element be on a new line when the element is multiline\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md\n \"react/jsx-first-prop-new-line\": [\"error\", \"multiline-multiprop\"],\n\n // Enforce spacing around jsx equals signs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md\n \"react/jsx-equals-spacing\": [\"error\", \"never\"],\n\n // Enforce JSX indentation\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md\n \"react/jsx-indent\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number, { checkAttributes: true, indentLogicalExpressions: true }],\n\n // Disallow target=\"_blank\" on links\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": [\"error\", { enforceDynamicLinks: \"always\" }],\n\n // prevent accidental JS comments from being injected into JSX as text\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // disallow using React.render/ReactDOM.render's return value\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md\n \"react/no-render-return-value\": \"error\",\n\n // require a shouldComponentUpdate method, or PureRenderMixin\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md\n \"react/require-optimization\": [\"off\", { allowDecorators: [] }],\n\n // warn against using findDOMNode()\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n \"react/no-find-dom-node\": \"error\",\n\n // Forbid certain props on Components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md\n \"react/forbid-component-props\": [\"off\", { forbid: [] }],\n\n // Forbid certain elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md\n \"react/forbid-elements\": [\"off\", { forbid: [] }],\n\n // Prevent problem with children and props.dangerouslySetInnerHTML\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // Prevent unused propType definitions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md\n \"react/no-unused-prop-types\": [\n \"error\",\n {\n customValidators: [],\n skipShapeProps: true,\n },\n ],\n\n // Require style prop value be an object or var\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // Prevent invalid characters from appearing in markup\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md\n \"react/no-unescaped-entities\": \"error\",\n\n // Prevent passing of children as props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Validate whitespace in and around the JSX opening and closing brackets\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md\n \"react/jsx-tag-spacing\": [\n \"error\",\n {\n closingSlash: \"never\",\n beforeSelfClosing: \"always\",\n afterOpening: \"never\",\n beforeClosing: \"never\",\n },\n ],\n\n // Enforce spaces before the closing bracket of self-closing JSX elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md\n // Deprecated in favor of jsx-tag-spacing\n \"react/jsx-space-before-closing\": [\"off\", \"always\"],\n\n // Prevent usage of Array index in keys\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md\n \"react/require-default-props\": [\n \"error\",\n {\n forbidDefaultForRequired: true,\n },\n ],\n\n // Forbids using non-exported propTypes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md\n // this is intentionally set to \"warn\". it would be \"error\",\n // but it's only critical if you're stripping propTypes in production.\n \"react/forbid-foreign-prop-types\": [\"warn\", { allowInPropTypes: true }],\n\n // Prevent void DOM elements from receiving children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n // Enforce all defaultProps have a corresponding non-required PropType\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md\n \"react/default-props-match-prop-types\": [\"error\", { allowRequiredDefaults: false }],\n\n // Prevent usage of shouldComponentUpdate when extending React.PureComponent\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md\n \"react/no-redundant-should-component-update\": \"error\",\n\n // Prevent unused state values\n // https://github.com/yannickcr/eslint-plugin-react/pull/1103/\n \"react/no-unused-state\": \"error\",\n\n // Enforces consistent naming for boolean props\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md\n \"react/boolean-prop-naming\": [\n \"off\",\n {\n propTypeNames: [\"bool\", \"mutuallyExclusiveTrueProps\"],\n rule: \"^(is|has)[A-Z]([A-Za-z0-9]?)+\",\n message: \"\",\n },\n ],\n\n // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\"error\", { props: \"never\", children: \"never\" }],\n\n // One JSX Element Per Line\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md\n \"react/jsx-one-expression-per-line\": [\"error\", { allow: \"single-child\" }],\n\n // Enforce consistent usage of destructuring assignment of props, state, and context\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md\n \"react/destructuring-assignment\": [\"error\", \"always\"],\n\n // Prevent using this.state within a this.setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Prevent usage of button elements without an explicit type attribute\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n submit: true,\n reset: false,\n },\n ],\n\n // Ensures inline tags are not rendered without spaces between them\n \"react/jsx-child-element-spacing\": \"off\",\n\n // Prevent this from being used in stateless functional components\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md\n \"react/no-this-in-sfc\": \"error\",\n\n // Validate JSX maximum depth\n // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md\n \"react/jsx-max-depth\": \"off\",\n\n // Disallow multiple spaces between inline JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md\n \"react/jsx-props-no-multi-spaces\": \"error\",\n\n // Prevent usage of UNSAFE_ methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md\n \"react/no-unsafe\": \"off\",\n\n // Enforce shorthand or standard form for React fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/bc976b837abeab1dffd90ac6168b746a83fc83cc/docs/rules/jsx-fragments.md\n \"react/jsx-fragments\": [\"error\", \"syntax\"],\n\n // Enforce linebreaks in curly braces in JSX attributes and expressions.\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md\n \"react/jsx-curly-newline\": [\n \"error\",\n {\n multiline: \"consistent\",\n singleline: \"consistent\",\n },\n ],\n\n // Enforce state initialization style\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md\n // TODO: set to \"never\" once @anolilab/babel-preset supports public class fields\n \"react/state-in-constructor\": [\"error\", \"always\"],\n\n // Enforces where React component static properties should be positioned\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md\n // TODO: set to \"static public field\" once @anolilab/babel-preset supports public class fields\n \"react/static-property-placement\": [\"error\", \"property assignment\"],\n\n // Disallow JSX props spreading\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md\n \"react/jsx-props-no-spreading\": [\n \"error\",\n {\n html: \"enforce\",\n custom: \"enforce\",\n explicitSpread: \"ignore\",\n exceptions: [],\n },\n ],\n\n // Enforce that props are read-only\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md\n \"react/prefer-read-only-props\": \"off\",\n\n // Prevent usage of `javascript:` URLs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md\n \"react/jsx-no-script-url\": [\n \"error\",\n [\n {\n name: \"Link\",\n props: [\"to\"],\n },\n ],\n ],\n\n // Disallow unnecessary fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": \"error\",\n\n // Prevent adjacent inline elements not separated by whitespace\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md\n \"react/no-adjacent-inline-elements\": \"error\",\n\n // Enforce a specific function type for function components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"arrow-function\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Enforce a new line after jsx elements and expressions\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md\n \"react/jsx-newline\": \"off\",\n\n // Prevent react contexts from taking non-stable values\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n ...prettierReactRules,\n },\n },\n {\n files: [\"*.jsx\"],\n rules: {\n // only .jsx files may have JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md\n \"react/jsx-filename-extension\": \"error\",\n\n // Prevents common casing typos\n // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md\n \"react/no-typos\": \"error\",\n\n // Validate closing tag location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md\n \"react/jsx-closing-tag-location\": \"error\",\n\n // Prevent missing parentheses around multilines JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md\n \"react/jsx-wrap-multilines\": [\n \"error\",\n {\n // eslint-disable-next-line sonarjs/no-duplicate-string\n declaration: \"parens-new-line\",\n assignment: \"parens-new-line\",\n return: \"parens-new-line\",\n arrow: \"parens-new-line\",\n condition: \"parens-new-line\",\n logical: \"parens-new-line\",\n prop: \"parens-new-line\",\n },\n ],\n },\n },\n {\n files: [\"*.tsx\"],\n rules: {\n // Disable JS specific rules\n \"react/jsx-filename-extension\": \"off\",\n \"react/default-props-match-prop-types\": \"off\",\n \"react/prop-types\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/react.ts"],"names":["hasAnyDep","pkg","findUp","styleRules","style_default","dangleRules","prettierReactRules","hasJsxRuntime","reactPath","consoleLog","packageDependencies","reactDependency","config","react_default"],"mappings":"wFACA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAOC,MAAY,UAKnB,IAAMC,EAAaC,EAAY,MACzBC,EAAcF,EAAW,sBAAsB,EAEjDG,EAAqB,CAAC,EAGtBN,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAEDM,EAAqB,CACjB,kCAAmC,MACnC,qCAAsC,MACtC,iCAAkC,MAClC,0BAA2B,MAC3B,0BAA2B,MAC3B,2BAA4B,MAC5B,gCAAiC,MACjC,mBAAoB,MACpB,yBAA0B,MAC1B,+BAAgC,MAChC,oBAAqB,MACrB,oCAAqC,MACrC,kCAAmC,MACnC,wBAAyB,MACzB,4BAA6B,KACjC,GAGJ,IAAMC,GAAiB,IAAM,CAEzB,GAAI,CAAC,OAAO,wCAAyC,CACjD,IAAMC,EAAYN,EAAO,KAAK,mCAAmC,EAE7D,OAAOM,GAAc,UACrBC,EAAW;AAAA;AAAA;AAAA;AAAA;AAAA,CAEkE,EAGjF,OAAO,wCAA0C,OAAOD,GAAc,SAG1E,OAAO,OAAO,uCAClB,GAAG,EAEGE,EAAsBT,GAAK,cAAgB,CAAC,EAC5CU,GAAmBD,GAAsB,OAAY,IAAI,MAAM,GAAG,EAElEE,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,QAAS,OAAO,EAExB,QAAS,CAAC,OAAO,EAEjB,IAAK,CACD,QAAS,EACb,EAEA,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EAEA,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,MAAO,OAAQ,QAAS,OAAQ,MA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mC,QAInC,kBAAmB,MAInB,sBAAuB,CAAC,QAAS,QAAQ,EAIzC,0BAA2B,CACvB,QACA,CACI,UAAW,aACX,WAAY,YAChB,CACJ,EAKA,6BAA8B,CAAC,QAAS,QAAQ,EAKhD,kCAAmC,CAAC,QAAS,qBAAqB,EAIlE,+BAAgC,CAC5B,QACA,CACI,KAAM,UACN,OAAQ,UACR,eAAgB,SAChB,WAAY,CAAC,CACjB,CACJ,EAIA,+BAAgC,MAIhC,0BAA2B,CACvB,QACA,CACI,CACI,KAAM,OACN,MAAO,CAAC,IAAI,CAChB,CACJ,CACJ,EAIA,gCAAiC,QAIjC,oCAAqC,QAIrC,sCAAuC,CACnC,QACA,CACI,gBAAiB,iBACjB,kBAAmB,gBACvB,CACJ,EAIA,oBAAqB,MAIrB,0CAA2C,QAE3C,GAAGG,CACP,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAGH,+BAAgC,QAIhC,iBAAkB,QAIlB,iCAAkC,QAIlC,4BAA6B,CACzB,QACA,CAEI,YAAa,kBACb,WAAY,kBACZ,OAAQ,kBACR,MAAO,kBACP,UAAW,kBACX,QAAS,kBACT,KAAM,iBACV,CACJ,CACJ,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAEH,+BAAgC,MAChC,uCAAwC,MACxC,mBAAoB,KACxB,CACJ,CACJ,CACJ,EAEOO,EAAQD","sourcesContent":["// @see https://github.com/yannickcr/eslint-plugin-react\nimport { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport findUp from \"find-up\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\nconst dangleRules = styleRules[\"no-underscore-dangle\"] as any[];\n\nlet prettierReactRules = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n prettierReactRules = {\n \"react/jsx-child-element-spacing\": \"off\",\n \"react/jsx-closing-bracket-location\": \"off\",\n \"react/jsx-closing-tag-location\": \"off\",\n \"react/jsx-curly-newline\": \"off\",\n \"react/jsx-curly-spacing\": \"off\",\n \"react/jsx-equals-spacing\": \"off\",\n \"react/jsx-first-prop-new-line\": \"off\",\n \"react/jsx-indent\": \"off\",\n \"react/jsx-indent-props\": \"off\",\n \"react/jsx-max-props-per-line\": \"off\",\n \"react/jsx-newline\": \"off\",\n \"react/jsx-one-expression-per-line\": \"off\",\n \"react/jsx-props-no-multi-spaces\": \"off\",\n \"react/jsx-tag-spacing\": \"off\",\n \"react/jsx-wrap-multilines\": \"off\",\n };\n}\n\nconst hasJsxRuntime = (() => {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigReactRuntimePath) {\n const reactPath = findUp.sync(\"node_modules/react/jsx-runtime.js\");\n\n if (typeof reactPath === \"string\") {\n consoleLog(`\\n@anolilab/eslint-config found react jsx-runtime. \\n\n Following rules are disabled: \"react/jsx-uses-react\" and \"react/react-in-jsx-scope\".\n If you dont use the new react jsx-runtime in you project, please enable it manually.\\n`);\n }\n\n global.hasAnolilabEsLintConfigReactRuntimePath = typeof reactPath === \"string\";\n }\n\n return global.hasAnolilabEsLintConfigReactRuntimePath;\n})();\n\nconst packageDependencies = pkg?.dependencies ?? {};\nconst reactDependency = (packageDependencies?.[\"react\"] ?? \"\").split(\".\");\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.jsx\", \"*.tsx\"],\n\n plugins: [\"react\"],\n\n env: {\n browser: true,\n },\n\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".js\", \".jsx\", \".json\", \".cjs\", \".mjs\"],\n },\n },\n react: {\n // The default value is \"detect\". Automatic detection works by loading the entire React library\n // into the linter's process, which is inefficient. It is recommended to specify the version\n // explicity.\n version: reactDependency[0] ? `${reactDependency[0]}.${reactDependency[1] ?? \"0\"}}` : \"detect\",\n },\n propWrapperFunctions: [\n \"forbidExtraProps\", // https://www.npmjs.com/package/airbnb-prop-types\n \"exact\", // https://www.npmjs.com/package/prop-types-exact\n \"Object.freeze\", // https://tc39.github.io/ecma262/#sec-object.freeze\n ],\n },\n\n // View link below for react rules documentation\n // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules\n rules: {\n \"no-underscore-dangle\": [\n dangleRules[0],\n {\n ...dangleRules[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n allow: [...dangleRules[1].allow, \"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\"],\n },\n ],\n\n // Specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"error\", \"prefer-double\"],\n\n \"class-methods-use-this\": [\n \"error\",\n {\n exceptMethods: [\n \"render\",\n \"getInitialState\",\n \"getDefaultProps\",\n \"getChildContext\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"componentDidUpdate\",\n \"componentWillUnmount\",\n \"componentDidCatch\",\n \"getSnapshotBeforeUpdate\",\n ],\n },\n ],\n\n // Prevent missing displayName in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md\n \"react/display-name\": [\"off\", { ignoreTranspilerName: false }],\n\n // Forbid certain propTypes (any, array, object)\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md\n \"react/forbid-prop-types\": [\n \"error\",\n {\n forbid: [\"any\", \"array\", \"object\"],\n checkContextTypes: true,\n checkChildContextTypes: true,\n },\n ],\n\n // Forbid certain props on DOM Nodes\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md\n \"react/forbid-dom-props\": [\"off\", { forbid: [] }],\n\n // Enforce boolean attributes notation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\", { always: [] }],\n\n // Validate closing bracket location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md\n \"react/jsx-closing-bracket-location\": [\"error\", \"line-aligned\"],\n\n // Enforce or disallow spaces inside of curly braces in JSX attributes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md\n \"react/jsx-curly-spacing\": [\"error\", \"never\", { allowMultiline: true }],\n\n // Enforce event handler naming conventions in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md\n \"react/jsx-handler-names\": [\n \"off\",\n {\n eventHandlerPrefix: \"handle\",\n eventHandlerPropPrefix: \"on\",\n },\n ],\n\n // Validate props indentation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md\n \"react/jsx-indent-props\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number],\n\n // Validate JSX has key prop when in array or iterator\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": \"off\",\n\n // Limit maximum of props on a single line in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md\n \"react/jsx-max-props-per-line\": [\"error\", { maximum: 1, when: \"multiline\" }],\n\n // Prevent usage of .bind() in JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": [\n \"error\",\n {\n ignoreRefs: true,\n allowArrowFunctions: true,\n allowFunctions: false,\n allowBind: false,\n ignoreDOMComponents: true,\n },\n ],\n\n // Prevent duplicate props in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": [\"error\", { ignoreCase: true }],\n\n // Prevent usage of unwrapped JSX strings\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md\n \"react/jsx-no-literals\": [\"off\", { noStrings: true }],\n\n // Disallow undeclared variables in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // Enforce PascalCase for user-defined JSX components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: true,\n ignore: [],\n },\n ],\n\n // Enforce propTypes declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md\n \"react/sort-prop-types\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n requiredFirst: false,\n sortShapeProp: true,\n },\n ],\n\n // Enforce props alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md\n \"react/jsx-sort-props\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n shorthandFirst: false,\n shorthandLast: false,\n noSortAlphabetically: false,\n reservedFirst: true,\n },\n ],\n\n // Prevent React to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": [hasJsxRuntime ? \"off\" : \"error\"],\n\n // Prevent variables used in JSX to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md\n \"react/jsx-uses-vars\": \"error\",\n\n // Prevent usage of dangerous JSX properties\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Prevent usage of deprecated methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": [\"error\"],\n\n // Prevent usage of setState in componentDidMount\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md\n // this is necessary for server-rendering\n \"react/no-did-mount-set-state\": \"off\",\n\n // Prevent usage of setState in componentDidUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md\n \"react/no-did-update-set-state\": \"error\",\n\n // Prevent usage of setState in componentWillUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md\n \"react/no-will-update-set-state\": \"error\",\n\n // Prevent direct mutation of this.state\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent usage of isMounted\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md\n \"react/no-is-mounted\": \"error\",\n\n // Prevent multiple component definition per file\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"off\",\n\n // Prevent usage of setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md\n \"react/no-set-state\": \"off\",\n\n // Prevent using string references\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Prevent usage of unknown DOM property\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Require ES6 class declarations over React.createClass\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md\n \"react/prefer-es6-class\": [\"error\", \"always\"],\n\n // Require stateless functions when not using lifecycle methods, setState or ref\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md\n \"react/prefer-stateless-function\": [\"error\", { ignorePureComponents: true }],\n\n // Prevent missing props validation in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": [\n \"error\",\n {\n ignore: [],\n customValidators: [],\n skipUndeclared: false,\n },\n ],\n\n // Prevent missing React when using JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": hasJsxRuntime ? \"off\" : \"error\",\n\n // Require render() methods to return something\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md\n \"react/require-render-return\": \"error\",\n\n // Prevent extra closing tags for components without children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Enforce defaultProps declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-default-props.md\n \"react/sort-default-props\": [\n \"error\",\n {\n ignoreCase: true,\n },\n ],\n\n // Enforce component methods order\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md\n \"react/sort-comp\": [\n \"error\",\n {\n order: [\n \"static-variables\",\n \"static-methods\",\n \"instance-variables\",\n \"lifecycle\",\n \"/^handle.+$/\",\n \"/^on.+$/\",\n \"getters\",\n \"setters\",\n \"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/\",\n \"instance-methods\",\n \"everything-else\",\n \"rendering\",\n ],\n groups: {\n lifecycle: [\n \"displayName\",\n \"propTypes\",\n \"contextTypes\",\n \"childContextTypes\",\n \"mixins\",\n \"statics\",\n \"defaultProps\",\n \"constructor\",\n \"getDefaultProps\",\n \"getInitialState\",\n \"state\",\n \"getChildContext\",\n \"getDerivedStateFromProps\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"getSnapshotBeforeUpdate\",\n \"componentDidUpdate\",\n \"componentDidCatch\",\n \"componentWillUnmount\",\n ],\n rendering: [\"/^render.+$/\", \"render\"],\n },\n },\n ],\n\n // Require that the first prop in a JSX element be on a new line when the element is multiline\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md\n \"react/jsx-first-prop-new-line\": [\"error\", \"multiline-multiprop\"],\n\n // Enforce spacing around jsx equals signs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md\n \"react/jsx-equals-spacing\": [\"error\", \"never\"],\n\n // Enforce JSX indentation\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md\n \"react/jsx-indent\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number, { checkAttributes: true, indentLogicalExpressions: true }],\n\n // Disallow target=\"_blank\" on links\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": [\"error\", { enforceDynamicLinks: \"always\" }],\n\n // prevent accidental JS comments from being injected into JSX as text\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // disallow using React.render/ReactDOM.render's return value\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md\n \"react/no-render-return-value\": \"error\",\n\n // require a shouldComponentUpdate method, or PureRenderMixin\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md\n \"react/require-optimization\": [\"off\", { allowDecorators: [] }],\n\n // warn against using findDOMNode()\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n \"react/no-find-dom-node\": \"error\",\n\n // Forbid certain props on Components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md\n \"react/forbid-component-props\": [\"off\", { forbid: [] }],\n\n // Forbid certain elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md\n \"react/forbid-elements\": [\"off\", { forbid: [] }],\n\n // Prevent problem with children and props.dangerouslySetInnerHTML\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // Prevent unused propType definitions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md\n \"react/no-unused-prop-types\": [\n \"error\",\n {\n customValidators: [],\n skipShapeProps: true,\n },\n ],\n\n // Require style prop value be an object or var\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // Prevent invalid characters from appearing in markup\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md\n \"react/no-unescaped-entities\": \"error\",\n\n // Prevent passing of children as props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Validate whitespace in and around the JSX opening and closing brackets\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md\n \"react/jsx-tag-spacing\": [\n \"error\",\n {\n closingSlash: \"never\",\n beforeSelfClosing: \"always\",\n afterOpening: \"never\",\n beforeClosing: \"never\",\n },\n ],\n\n // Enforce spaces before the closing bracket of self-closing JSX elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md\n // Deprecated in favor of jsx-tag-spacing\n \"react/jsx-space-before-closing\": [\"off\", \"always\"],\n\n // Prevent usage of Array index in keys\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md\n \"react/require-default-props\": [\n \"error\",\n {\n forbidDefaultForRequired: true,\n },\n ],\n\n // Forbids using non-exported propTypes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md\n // this is intentionally set to \"warn\". it would be \"error\",\n // but it's only critical if you're stripping propTypes in production.\n \"react/forbid-foreign-prop-types\": [\"warn\", { allowInPropTypes: true }],\n\n // Prevent void DOM elements from receiving children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n // Enforce all defaultProps have a corresponding non-required PropType\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md\n \"react/default-props-match-prop-types\": [\"error\", { allowRequiredDefaults: false }],\n\n // Prevent usage of shouldComponentUpdate when extending React.PureComponent\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md\n \"react/no-redundant-should-component-update\": \"error\",\n\n // Prevent unused state values\n // https://github.com/yannickcr/eslint-plugin-react/pull/1103/\n \"react/no-unused-state\": \"error\",\n\n // Enforces consistent naming for boolean props\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md\n \"react/boolean-prop-naming\": [\n \"off\",\n {\n propTypeNames: [\"bool\", \"mutuallyExclusiveTrueProps\"],\n rule: \"^(is|has)[A-Z]([A-Za-z0-9]?)+\",\n message: \"\",\n },\n ],\n\n // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\"error\", { props: \"never\", children: \"never\" }],\n\n // One JSX Element Per Line\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md\n \"react/jsx-one-expression-per-line\": [\"error\", { allow: \"single-child\" }],\n\n // Enforce consistent usage of destructuring assignment of props, state, and context\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md\n \"react/destructuring-assignment\": [\"error\", \"always\"],\n\n // Prevent using this.state within a this.setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Prevent usage of button elements without an explicit type attribute\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n submit: true,\n reset: false,\n },\n ],\n\n // Ensures inline tags are not rendered without spaces between them\n \"react/jsx-child-element-spacing\": \"off\",\n\n // Prevent this from being used in stateless functional components\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md\n \"react/no-this-in-sfc\": \"error\",\n\n // Validate JSX maximum depth\n // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md\n \"react/jsx-max-depth\": \"off\",\n\n // Disallow multiple spaces between inline JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md\n \"react/jsx-props-no-multi-spaces\": \"error\",\n\n // Prevent usage of UNSAFE_ methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md\n \"react/no-unsafe\": \"off\",\n\n // Enforce shorthand or standard form for React fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/bc976b837abeab1dffd90ac6168b746a83fc83cc/docs/rules/jsx-fragments.md\n \"react/jsx-fragments\": [\"error\", \"syntax\"],\n\n // Enforce linebreaks in curly braces in JSX attributes and expressions.\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md\n \"react/jsx-curly-newline\": [\n \"error\",\n {\n multiline: \"consistent\",\n singleline: \"consistent\",\n },\n ],\n\n // Enforce state initialization style\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md\n // TODO: set to \"never\" once @anolilab/babel-preset supports public class fields\n \"react/state-in-constructor\": [\"error\", \"always\"],\n\n // Enforces where React component static properties should be positioned\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md\n // TODO: set to \"static public field\" once @anolilab/babel-preset supports public class fields\n \"react/static-property-placement\": [\"error\", \"property assignment\"],\n\n // Disallow JSX props spreading\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md\n \"react/jsx-props-no-spreading\": [\n \"error\",\n {\n html: \"enforce\",\n custom: \"enforce\",\n explicitSpread: \"ignore\",\n exceptions: [],\n },\n ],\n\n // Enforce that props are read-only\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md\n \"react/prefer-read-only-props\": \"off\",\n\n // Prevent usage of `javascript:` URLs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md\n \"react/jsx-no-script-url\": [\n \"error\",\n [\n {\n name: \"Link\",\n props: [\"to\"],\n },\n ],\n ],\n\n // Disallow unnecessary fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": \"error\",\n\n // Prevent adjacent inline elements not separated by whitespace\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md\n \"react/no-adjacent-inline-elements\": \"error\",\n\n // Enforce a specific function type for function components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"arrow-function\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Enforce a new line after jsx elements and expressions\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md\n \"react/jsx-newline\": \"off\",\n\n // Prevent react contexts from taking non-stable values\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n ...prettierReactRules,\n },\n },\n {\n files: [\"*.jsx\"],\n rules: {\n // only .jsx files may have JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md\n \"react/jsx-filename-extension\": \"error\",\n\n // Prevents common casing typos\n // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md\n \"react/no-typos\": \"error\",\n\n // Validate closing tag location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md\n \"react/jsx-closing-tag-location\": \"error\",\n\n // Prevent missing parentheses around multilines JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md\n \"react/jsx-wrap-multilines\": [\n \"error\",\n {\n // eslint-disable-next-line sonarjs/no-duplicate-string\n declaration: \"parens-new-line\",\n assignment: \"parens-new-line\",\n return: \"parens-new-line\",\n arrow: \"parens-new-line\",\n condition: \"parens-new-line\",\n logical: \"parens-new-line\",\n prop: \"parens-new-line\",\n },\n ],\n },\n },\n {\n files: [\"*.tsx\"],\n rules: {\n // Disable JS specific rules\n \"react/jsx-filename-extension\": \"off\",\n \"react/default-props-match-prop-types\": \"off\",\n \"react/prop-types\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
@@ -3,7 +3,7 @@ import { a as a$1 } from '../../chunk-6ZQSXLLR.mjs';
3
3
  import { hasAnyDep, pkg } from '@anolilab/package-json-utils';
4
4
  import p from 'find-up';
5
5
 
6
- var t=a$1.rules,e=t["no-underscore-dangle"],c={};hasAnyDep(["react","react-dom"],{peerDeps:!1})&&(c={"react/jsx-indent":"off","react/jsx-closing-tag-location":"off","react/jsx-closing-bracket-location":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off","react/prefer-stateless-function":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off"});var a=(()=>{if(!global.hasAnolilabEsLintConfigReactRuntimePath){let o=p.sync("node_modules/react/jsx-runtime.js");typeof o=="string"&&b(`
6
+ var t=a$1.rules,e=t["no-underscore-dangle"],c={};hasAnyDep(["prettier"],{peerDeps:!1})&&(c={"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":"off","react/jsx-closing-tag-location":"off","react/jsx-curly-newline":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-newline":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off"});var a=(()=>{if(!global.hasAnolilabEsLintConfigReactRuntimePath){let o=p.sync("node_modules/react/jsx-runtime.js");typeof o=="string"&&b(`
7
7
  @anolilab/eslint-config found react jsx-runtime.
8
8
 
9
9
  Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/react.ts"],"names":["hasAnyDep","pkg","findUp","styleRules","style_default","dangleRules","prettierReactRules","hasJsxRuntime","reactPath","consoleLog","packageDependencies","reactDependency","config","react_default"],"mappings":"0FACA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAOC,MAAY,UAKnB,IAAMC,EAAaC,EAAY,MACzBC,EAAcF,EAAW,sBAAsB,EAEjDG,EAAqB,CAAC,EAGtBN,EAAU,CAAC,QAAS,WAAW,EAAG,CAC9B,SAAU,EACd,CAAC,IAEDM,EAAqB,CACjB,mBAAoB,MACpB,iCAAkC,MAClC,qCAAsC,MACtC,0BAA2B,MAC3B,2BAA4B,MAC5B,gCAAiC,MACjC,yBAA0B,MAC1B,+BAAgC,MAChC,wBAAyB,MACzB,4BAA6B,MAC7B,kCAAmC,MACnC,oCAAqC,MACrC,kCAAmC,KACvC,GAGJ,IAAMC,GAAiB,IAAM,CAEzB,GAAI,CAAC,OAAO,wCAAyC,CACjD,IAAMC,EAAYN,EAAO,KAAK,mCAAmC,EAE7D,OAAOM,GAAc,UACrBC,EAAW;AAAA;AAAA;AAAA;AAAA;AAAA,CAEkE,EAGjF,OAAO,wCAA0C,OAAOD,GAAc,SAG1E,OAAO,OAAO,uCAClB,GAAG,EAEGE,EAAsBT,GAAK,cAAgB,CAAC,EAC5CU,GAAmBD,GAAsB,OAAY,IAAI,MAAM,GAAG,EAElEE,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,QAAS,OAAO,EAExB,QAAS,CAAC,OAAO,EAEjB,IAAK,CACD,QAAS,EACb,EAEA,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EAEA,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,MAAO,OAAQ,QAAS,OAAQ,MAAM,CACvD,CACJ,EACA,MAAO,CAIH,QAASD,EAAgB,CAAC,EAAI,GAAGA,EAAg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vB,QACA,CACI,UAAW,aACX,WAAY,YAChB,CACJ,EAKA,6BAA8B,CAAC,QAAS,QAAQ,EAKhD,kCAAmC,CAAC,QAAS,qBAAqB,EAIlE,+BAAgC,CAC5B,QACA,CACI,KAAM,UACN,OAAQ,UACR,eAAgB,SAChB,WAAY,CAAC,CACjB,CACJ,EAIA,+BAAgC,MAIhC,0BAA2B,CACvB,QACA,CACI,CACI,KAAM,OACN,MAAO,CAAC,IAAI,CAChB,CACJ,CACJ,EAIA,gCAAiC,QAIjC,oCAAqC,QAIrC,sCAAuC,CACnC,QACA,CACI,gBAAiB,iBACjB,kBAAmB,gBACvB,CACJ,EAIA,oBAAqB,MAIrB,0CAA2C,QAE3C,GAAGG,CACP,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAGH,+BAAgC,QAIhC,iBAAkB,QAIlB,iCAAkC,QAIlC,4BAA6B,CACzB,QACA,CAEI,YAAa,kBACb,WAAY,kBACZ,OAAQ,kBACR,MAAO,kBACP,UAAW,kBACX,QAAS,kBACT,KAAM,iBACV,CACJ,CACJ,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAEH,+BAAgC,MAChC,uCAAwC,MACxC,mBAAoB,KACxB,CACJ,CACJ,CACJ,EAEOO,EAAQD","sourcesContent":["// @see https://github.com/yannickcr/eslint-plugin-react\nimport { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport findUp from \"find-up\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\nconst dangleRules = styleRules[\"no-underscore-dangle\"] as any[];\n\nlet prettierReactRules = {};\n\nif (\n hasAnyDep([\"react\", \"react-dom\"], {\n peerDeps: false,\n })\n) {\n prettierReactRules = {\n \"react/jsx-indent\": \"off\",\n \"react/jsx-closing-tag-location\": \"off\",\n \"react/jsx-closing-bracket-location\": \"off\",\n \"react/jsx-curly-spacing\": \"off\",\n \"react/jsx-equals-spacing\": \"off\",\n \"react/jsx-first-prop-new-line\": \"off\",\n \"react/jsx-indent-props\": \"off\",\n \"react/jsx-max-props-per-line\": \"off\",\n \"react/jsx-tag-spacing\": \"off\",\n \"react/jsx-wrap-multilines\": \"off\",\n \"react/prefer-stateless-function\": \"off\",\n \"react/jsx-one-expression-per-line\": \"off\",\n \"react/jsx-props-no-multi-spaces\": \"off\",\n };\n}\n\nconst hasJsxRuntime = (() => {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigReactRuntimePath) {\n const reactPath = findUp.sync(\"node_modules/react/jsx-runtime.js\");\n\n if (typeof reactPath === \"string\") {\n consoleLog(`\\n@anolilab/eslint-config found react jsx-runtime. \\n\n Following rules are disabled: \"react/jsx-uses-react\" and \"react/react-in-jsx-scope\".\n If you dont use the new react jsx-runtime in you project, please enable it manually.\\n`);\n }\n\n global.hasAnolilabEsLintConfigReactRuntimePath = typeof reactPath === \"string\";\n }\n\n return global.hasAnolilabEsLintConfigReactRuntimePath;\n})();\n\nconst packageDependencies = pkg?.dependencies ?? {};\nconst reactDependency = (packageDependencies?.[\"react\"] ?? \"\").split(\".\");\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.jsx\", \"*.tsx\"],\n\n plugins: [\"react\"],\n\n env: {\n browser: true,\n },\n\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".js\", \".jsx\", \".json\", \".cjs\", \".mjs\"],\n },\n },\n react: {\n // The default value is \"detect\". Automatic detection works by loading the entire React library\n // into the linter's process, which is inefficient. It is recommended to specify the version\n // explicity.\n version: reactDependency[0] ? `${reactDependency[0]}.${reactDependency[1] ?? \"0\"}}` : \"detect\",\n },\n propWrapperFunctions: [\n \"forbidExtraProps\", // https://www.npmjs.com/package/airbnb-prop-types\n \"exact\", // https://www.npmjs.com/package/prop-types-exact\n \"Object.freeze\", // https://tc39.github.io/ecma262/#sec-object.freeze\n ],\n },\n\n // View link below for react rules documentation\n // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules\n rules: {\n \"no-underscore-dangle\": [\n dangleRules[0],\n {\n ...dangleRules[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n allow: [...dangleRules[1].allow, \"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\"],\n },\n ],\n\n // Specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"error\", \"prefer-double\"],\n\n \"class-methods-use-this\": [\n \"error\",\n {\n exceptMethods: [\n \"render\",\n \"getInitialState\",\n \"getDefaultProps\",\n \"getChildContext\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"componentDidUpdate\",\n \"componentWillUnmount\",\n \"componentDidCatch\",\n \"getSnapshotBeforeUpdate\",\n ],\n },\n ],\n\n // Prevent missing displayName in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md\n \"react/display-name\": [\"off\", { ignoreTranspilerName: false }],\n\n // Forbid certain propTypes (any, array, object)\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md\n \"react/forbid-prop-types\": [\n \"error\",\n {\n forbid: [\"any\", \"array\", \"object\"],\n checkContextTypes: true,\n checkChildContextTypes: true,\n },\n ],\n\n // Forbid certain props on DOM Nodes\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md\n \"react/forbid-dom-props\": [\"off\", { forbid: [] }],\n\n // Enforce boolean attributes notation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\", { always: [] }],\n\n // Validate closing bracket location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md\n \"react/jsx-closing-bracket-location\": [\"error\", \"line-aligned\"],\n\n // Enforce or disallow spaces inside of curly braces in JSX attributes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md\n \"react/jsx-curly-spacing\": [\"error\", \"never\", { allowMultiline: true }],\n\n // Enforce event handler naming conventions in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md\n \"react/jsx-handler-names\": [\n \"off\",\n {\n eventHandlerPrefix: \"handle\",\n eventHandlerPropPrefix: \"on\",\n },\n ],\n\n // Validate props indentation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md\n \"react/jsx-indent-props\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number],\n\n // Validate JSX has key prop when in array or iterator\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": \"off\",\n\n // Limit maximum of props on a single line in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md\n \"react/jsx-max-props-per-line\": [\"error\", { maximum: 1, when: \"multiline\" }],\n\n // Prevent usage of .bind() in JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": [\n \"error\",\n {\n ignoreRefs: true,\n allowArrowFunctions: true,\n allowFunctions: false,\n allowBind: false,\n ignoreDOMComponents: true,\n },\n ],\n\n // Prevent duplicate props in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": [\"error\", { ignoreCase: true }],\n\n // Prevent usage of unwrapped JSX strings\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md\n \"react/jsx-no-literals\": [\"off\", { noStrings: true }],\n\n // Disallow undeclared variables in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // Enforce PascalCase for user-defined JSX components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: true,\n ignore: [],\n },\n ],\n\n // Enforce propTypes declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md\n \"react/sort-prop-types\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n requiredFirst: false,\n sortShapeProp: true,\n },\n ],\n\n // Enforce props alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md\n \"react/jsx-sort-props\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n shorthandFirst: false,\n shorthandLast: false,\n noSortAlphabetically: false,\n reservedFirst: true,\n },\n ],\n\n // Prevent React to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": [hasJsxRuntime ? \"off\" : \"error\"],\n\n // Prevent variables used in JSX to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md\n \"react/jsx-uses-vars\": \"error\",\n\n // Prevent usage of dangerous JSX properties\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Prevent usage of deprecated methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": [\"error\"],\n\n // Prevent usage of setState in componentDidMount\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md\n // this is necessary for server-rendering\n \"react/no-did-mount-set-state\": \"off\",\n\n // Prevent usage of setState in componentDidUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md\n \"react/no-did-update-set-state\": \"error\",\n\n // Prevent usage of setState in componentWillUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md\n \"react/no-will-update-set-state\": \"error\",\n\n // Prevent direct mutation of this.state\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent usage of isMounted\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md\n \"react/no-is-mounted\": \"error\",\n\n // Prevent multiple component definition per file\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"off\",\n\n // Prevent usage of setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md\n \"react/no-set-state\": \"off\",\n\n // Prevent using string references\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Prevent usage of unknown DOM property\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Require ES6 class declarations over React.createClass\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md\n \"react/prefer-es6-class\": [\"error\", \"always\"],\n\n // Require stateless functions when not using lifecycle methods, setState or ref\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md\n \"react/prefer-stateless-function\": [\"error\", { ignorePureComponents: true }],\n\n // Prevent missing props validation in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": [\n \"error\",\n {\n ignore: [],\n customValidators: [],\n skipUndeclared: false,\n },\n ],\n\n // Prevent missing React when using JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": hasJsxRuntime ? \"off\" : \"error\",\n\n // Require render() methods to return something\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md\n \"react/require-render-return\": \"error\",\n\n // Prevent extra closing tags for components without children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Enforce defaultProps declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-default-props.md\n \"react/sort-default-props\": [\n \"error\",\n {\n ignoreCase: true,\n },\n ],\n\n // Enforce component methods order\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md\n \"react/sort-comp\": [\n \"error\",\n {\n order: [\n \"static-variables\",\n \"static-methods\",\n \"instance-variables\",\n \"lifecycle\",\n \"/^handle.+$/\",\n \"/^on.+$/\",\n \"getters\",\n \"setters\",\n \"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/\",\n \"instance-methods\",\n \"everything-else\",\n \"rendering\",\n ],\n groups: {\n lifecycle: [\n \"displayName\",\n \"propTypes\",\n \"contextTypes\",\n \"childContextTypes\",\n \"mixins\",\n \"statics\",\n \"defaultProps\",\n \"constructor\",\n \"getDefaultProps\",\n \"getInitialState\",\n \"state\",\n \"getChildContext\",\n \"getDerivedStateFromProps\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"getSnapshotBeforeUpdate\",\n \"componentDidUpdate\",\n \"componentDidCatch\",\n \"componentWillUnmount\",\n ],\n rendering: [\"/^render.+$/\", \"render\"],\n },\n },\n ],\n\n // Require that the first prop in a JSX element be on a new line when the element is multiline\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md\n \"react/jsx-first-prop-new-line\": [\"error\", \"multiline-multiprop\"],\n\n // Enforce spacing around jsx equals signs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md\n \"react/jsx-equals-spacing\": [\"error\", \"never\"],\n\n // Enforce JSX indentation\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md\n \"react/jsx-indent\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number, { checkAttributes: true, indentLogicalExpressions: true }],\n\n // Disallow target=\"_blank\" on links\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": [\"error\", { enforceDynamicLinks: \"always\" }],\n\n // prevent accidental JS comments from being injected into JSX as text\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // disallow using React.render/ReactDOM.render's return value\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md\n \"react/no-render-return-value\": \"error\",\n\n // require a shouldComponentUpdate method, or PureRenderMixin\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md\n \"react/require-optimization\": [\"off\", { allowDecorators: [] }],\n\n // warn against using findDOMNode()\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n \"react/no-find-dom-node\": \"error\",\n\n // Forbid certain props on Components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md\n \"react/forbid-component-props\": [\"off\", { forbid: [] }],\n\n // Forbid certain elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md\n \"react/forbid-elements\": [\"off\", { forbid: [] }],\n\n // Prevent problem with children and props.dangerouslySetInnerHTML\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // Prevent unused propType definitions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md\n \"react/no-unused-prop-types\": [\n \"error\",\n {\n customValidators: [],\n skipShapeProps: true,\n },\n ],\n\n // Require style prop value be an object or var\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // Prevent invalid characters from appearing in markup\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md\n \"react/no-unescaped-entities\": \"error\",\n\n // Prevent passing of children as props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Validate whitespace in and around the JSX opening and closing brackets\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md\n \"react/jsx-tag-spacing\": [\n \"error\",\n {\n closingSlash: \"never\",\n beforeSelfClosing: \"always\",\n afterOpening: \"never\",\n beforeClosing: \"never\",\n },\n ],\n\n // Enforce spaces before the closing bracket of self-closing JSX elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md\n // Deprecated in favor of jsx-tag-spacing\n \"react/jsx-space-before-closing\": [\"off\", \"always\"],\n\n // Prevent usage of Array index in keys\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md\n \"react/require-default-props\": [\n \"error\",\n {\n forbidDefaultForRequired: true,\n },\n ],\n\n // Forbids using non-exported propTypes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md\n // this is intentionally set to \"warn\". it would be \"error\",\n // but it's only critical if you're stripping propTypes in production.\n \"react/forbid-foreign-prop-types\": [\"warn\", { allowInPropTypes: true }],\n\n // Prevent void DOM elements from receiving children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n // Enforce all defaultProps have a corresponding non-required PropType\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md\n \"react/default-props-match-prop-types\": [\"error\", { allowRequiredDefaults: false }],\n\n // Prevent usage of shouldComponentUpdate when extending React.PureComponent\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md\n \"react/no-redundant-should-component-update\": \"error\",\n\n // Prevent unused state values\n // https://github.com/yannickcr/eslint-plugin-react/pull/1103/\n \"react/no-unused-state\": \"error\",\n\n // Enforces consistent naming for boolean props\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md\n \"react/boolean-prop-naming\": [\n \"off\",\n {\n propTypeNames: [\"bool\", \"mutuallyExclusiveTrueProps\"],\n rule: \"^(is|has)[A-Z]([A-Za-z0-9]?)+\",\n message: \"\",\n },\n ],\n\n // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\"error\", { props: \"never\", children: \"never\" }],\n\n // One JSX Element Per Line\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md\n \"react/jsx-one-expression-per-line\": [\"error\", { allow: \"single-child\" }],\n\n // Enforce consistent usage of destructuring assignment of props, state, and context\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md\n \"react/destructuring-assignment\": [\"error\", \"always\"],\n\n // Prevent using this.state within a this.setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Prevent usage of button elements without an explicit type attribute\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n submit: true,\n reset: false,\n },\n ],\n\n // Ensures inline tags are not rendered without spaces between them\n \"react/jsx-child-element-spacing\": \"off\",\n\n // Prevent this from being used in stateless functional components\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md\n \"react/no-this-in-sfc\": \"error\",\n\n // Validate JSX maximum depth\n // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md\n \"react/jsx-max-depth\": \"off\",\n\n // Disallow multiple spaces between inline JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md\n \"react/jsx-props-no-multi-spaces\": \"error\",\n\n // Prevent usage of UNSAFE_ methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md\n \"react/no-unsafe\": \"off\",\n\n // Enforce shorthand or standard form for React fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/bc976b837abeab1dffd90ac6168b746a83fc83cc/docs/rules/jsx-fragments.md\n \"react/jsx-fragments\": [\"error\", \"syntax\"],\n\n // Enforce linebreaks in curly braces in JSX attributes and expressions.\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md\n \"react/jsx-curly-newline\": [\n \"error\",\n {\n multiline: \"consistent\",\n singleline: \"consistent\",\n },\n ],\n\n // Enforce state initialization style\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md\n // TODO: set to \"never\" once @anolilab/babel-preset supports public class fields\n \"react/state-in-constructor\": [\"error\", \"always\"],\n\n // Enforces where React component static properties should be positioned\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md\n // TODO: set to \"static public field\" once @anolilab/babel-preset supports public class fields\n \"react/static-property-placement\": [\"error\", \"property assignment\"],\n\n // Disallow JSX props spreading\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md\n \"react/jsx-props-no-spreading\": [\n \"error\",\n {\n html: \"enforce\",\n custom: \"enforce\",\n explicitSpread: \"ignore\",\n exceptions: [],\n },\n ],\n\n // Enforce that props are read-only\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md\n \"react/prefer-read-only-props\": \"off\",\n\n // Prevent usage of `javascript:` URLs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md\n \"react/jsx-no-script-url\": [\n \"error\",\n [\n {\n name: \"Link\",\n props: [\"to\"],\n },\n ],\n ],\n\n // Disallow unnecessary fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": \"error\",\n\n // Prevent adjacent inline elements not separated by whitespace\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md\n \"react/no-adjacent-inline-elements\": \"error\",\n\n // Enforce a specific function type for function components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"arrow-function\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Enforce a new line after jsx elements and expressions\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md\n \"react/jsx-newline\": \"off\",\n\n // Prevent react contexts from taking non-stable values\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n ...prettierReactRules,\n },\n },\n {\n files: [\"*.jsx\"],\n rules: {\n // only .jsx files may have JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md\n \"react/jsx-filename-extension\": \"error\",\n\n // Prevents common casing typos\n // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md\n \"react/no-typos\": \"error\",\n\n // Validate closing tag location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md\n \"react/jsx-closing-tag-location\": \"error\",\n\n // Prevent missing parentheses around multilines JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md\n \"react/jsx-wrap-multilines\": [\n \"error\",\n {\n // eslint-disable-next-line sonarjs/no-duplicate-string\n declaration: \"parens-new-line\",\n assignment: \"parens-new-line\",\n return: \"parens-new-line\",\n arrow: \"parens-new-line\",\n condition: \"parens-new-line\",\n logical: \"parens-new-line\",\n prop: \"parens-new-line\",\n },\n ],\n },\n },\n {\n files: [\"*.tsx\"],\n rules: {\n // Disable JS specific rules\n \"react/jsx-filename-extension\": \"off\",\n \"react/default-props-match-prop-types\": \"off\",\n \"react/prop-types\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/react.ts"],"names":["hasAnyDep","pkg","findUp","styleRules","style_default","dangleRules","prettierReactRules","hasJsxRuntime","reactPath","consoleLog","packageDependencies","reactDependency","config","react_default"],"mappings":"0FACA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAOC,MAAY,UAKnB,IAAMC,EAAaC,EAAY,MACzBC,EAAcF,EAAW,sBAAsB,EAEjDG,EAAqB,CAAC,EAGtBN,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAEDM,EAAqB,CACjB,kCAAmC,MACnC,qCAAsC,MACtC,iCAAkC,MAClC,0BAA2B,MAC3B,0BAA2B,MAC3B,2BAA4B,MAC5B,gCAAiC,MACjC,mBAAoB,MACpB,yBAA0B,MAC1B,+BAAgC,MAChC,oBAAqB,MACrB,oCAAqC,MACrC,kCAAmC,MACnC,wBAAyB,MACzB,4BAA6B,KACjC,GAGJ,IAAMC,GAAiB,IAAM,CAEzB,GAAI,CAAC,OAAO,wCAAyC,CACjD,IAAMC,EAAYN,EAAO,KAAK,mCAAmC,EAE7D,OAAOM,GAAc,UACrBC,EAAW;AAAA;AAAA;AAAA;AAAA;AAAA,CAEkE,EAGjF,OAAO,wCAA0C,OAAOD,GAAc,SAG1E,OAAO,OAAO,uCAClB,GAAG,EAEGE,EAAsBT,GAAK,cAAgB,CAAC,EAC5CU,GAAmBD,GAAsB,OAAY,IAAI,MAAM,GAAG,EAElEE,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,QAAS,OAAO,EAExB,QAAS,CAAC,OAAO,EAEjB,IAAK,CACD,QAAS,EACb,EAEA,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EAEA,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,MAAO,OAAQ,QAAS,OAAQ,MAAM,CACvD,CACJ,EACA,MAAO,CAIH,QAASD,EAAg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,QAAQ,EAIzC,0BAA2B,CACvB,QACA,CACI,UAAW,aACX,WAAY,YAChB,CACJ,EAKA,6BAA8B,CAAC,QAAS,QAAQ,EAKhD,kCAAmC,CAAC,QAAS,qBAAqB,EAIlE,+BAAgC,CAC5B,QACA,CACI,KAAM,UACN,OAAQ,UACR,eAAgB,SAChB,WAAY,CAAC,CACjB,CACJ,EAIA,+BAAgC,MAIhC,0BAA2B,CACvB,QACA,CACI,CACI,KAAM,OACN,MAAO,CAAC,IAAI,CAChB,CACJ,CACJ,EAIA,gCAAiC,QAIjC,oCAAqC,QAIrC,sCAAuC,CACnC,QACA,CACI,gBAAiB,iBACjB,kBAAmB,gBACvB,CACJ,EAIA,oBAAqB,MAIrB,0CAA2C,QAE3C,GAAGG,CACP,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAGH,+BAAgC,QAIhC,iBAAkB,QAIlB,iCAAkC,QAIlC,4BAA6B,CACzB,QACA,CAEI,YAAa,kBACb,WAAY,kBACZ,OAAQ,kBACR,MAAO,kBACP,UAAW,kBACX,QAAS,kBACT,KAAM,iBACV,CACJ,CACJ,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CAEH,+BAAgC,MAChC,uCAAwC,MACxC,mBAAoB,KACxB,CACJ,CACJ,CACJ,EAEOO,EAAQD","sourcesContent":["// @see https://github.com/yannickcr/eslint-plugin-react\nimport { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport findUp from \"find-up\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\nconst dangleRules = styleRules[\"no-underscore-dangle\"] as any[];\n\nlet prettierReactRules = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n prettierReactRules = {\n \"react/jsx-child-element-spacing\": \"off\",\n \"react/jsx-closing-bracket-location\": \"off\",\n \"react/jsx-closing-tag-location\": \"off\",\n \"react/jsx-curly-newline\": \"off\",\n \"react/jsx-curly-spacing\": \"off\",\n \"react/jsx-equals-spacing\": \"off\",\n \"react/jsx-first-prop-new-line\": \"off\",\n \"react/jsx-indent\": \"off\",\n \"react/jsx-indent-props\": \"off\",\n \"react/jsx-max-props-per-line\": \"off\",\n \"react/jsx-newline\": \"off\",\n \"react/jsx-one-expression-per-line\": \"off\",\n \"react/jsx-props-no-multi-spaces\": \"off\",\n \"react/jsx-tag-spacing\": \"off\",\n \"react/jsx-wrap-multilines\": \"off\",\n };\n}\n\nconst hasJsxRuntime = (() => {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigReactRuntimePath) {\n const reactPath = findUp.sync(\"node_modules/react/jsx-runtime.js\");\n\n if (typeof reactPath === \"string\") {\n consoleLog(`\\n@anolilab/eslint-config found react jsx-runtime. \\n\n Following rules are disabled: \"react/jsx-uses-react\" and \"react/react-in-jsx-scope\".\n If you dont use the new react jsx-runtime in you project, please enable it manually.\\n`);\n }\n\n global.hasAnolilabEsLintConfigReactRuntimePath = typeof reactPath === \"string\";\n }\n\n return global.hasAnolilabEsLintConfigReactRuntimePath;\n})();\n\nconst packageDependencies = pkg?.dependencies ?? {};\nconst reactDependency = (packageDependencies?.[\"react\"] ?? \"\").split(\".\");\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.jsx\", \"*.tsx\"],\n\n plugins: [\"react\"],\n\n env: {\n browser: true,\n },\n\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".js\", \".jsx\", \".json\", \".cjs\", \".mjs\"],\n },\n },\n react: {\n // The default value is \"detect\". Automatic detection works by loading the entire React library\n // into the linter's process, which is inefficient. It is recommended to specify the version\n // explicity.\n version: reactDependency[0] ? `${reactDependency[0]}.${reactDependency[1] ?? \"0\"}}` : \"detect\",\n },\n propWrapperFunctions: [\n \"forbidExtraProps\", // https://www.npmjs.com/package/airbnb-prop-types\n \"exact\", // https://www.npmjs.com/package/prop-types-exact\n \"Object.freeze\", // https://tc39.github.io/ecma262/#sec-object.freeze\n ],\n },\n\n // View link below for react rules documentation\n // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules\n rules: {\n \"no-underscore-dangle\": [\n dangleRules[0],\n {\n ...dangleRules[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n allow: [...dangleRules[1].allow, \"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\"],\n },\n ],\n\n // Specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"error\", \"prefer-double\"],\n\n \"class-methods-use-this\": [\n \"error\",\n {\n exceptMethods: [\n \"render\",\n \"getInitialState\",\n \"getDefaultProps\",\n \"getChildContext\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"componentDidUpdate\",\n \"componentWillUnmount\",\n \"componentDidCatch\",\n \"getSnapshotBeforeUpdate\",\n ],\n },\n ],\n\n // Prevent missing displayName in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md\n \"react/display-name\": [\"off\", { ignoreTranspilerName: false }],\n\n // Forbid certain propTypes (any, array, object)\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md\n \"react/forbid-prop-types\": [\n \"error\",\n {\n forbid: [\"any\", \"array\", \"object\"],\n checkContextTypes: true,\n checkChildContextTypes: true,\n },\n ],\n\n // Forbid certain props on DOM Nodes\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md\n \"react/forbid-dom-props\": [\"off\", { forbid: [] }],\n\n // Enforce boolean attributes notation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\", { always: [] }],\n\n // Validate closing bracket location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md\n \"react/jsx-closing-bracket-location\": [\"error\", \"line-aligned\"],\n\n // Enforce or disallow spaces inside of curly braces in JSX attributes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md\n \"react/jsx-curly-spacing\": [\"error\", \"never\", { allowMultiline: true }],\n\n // Enforce event handler naming conventions in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md\n \"react/jsx-handler-names\": [\n \"off\",\n {\n eventHandlerPrefix: \"handle\",\n eventHandlerPropPrefix: \"on\",\n },\n ],\n\n // Validate props indentation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md\n \"react/jsx-indent-props\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number],\n\n // Validate JSX has key prop when in array or iterator\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": \"off\",\n\n // Limit maximum of props on a single line in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md\n \"react/jsx-max-props-per-line\": [\"error\", { maximum: 1, when: \"multiline\" }],\n\n // Prevent usage of .bind() in JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": [\n \"error\",\n {\n ignoreRefs: true,\n allowArrowFunctions: true,\n allowFunctions: false,\n allowBind: false,\n ignoreDOMComponents: true,\n },\n ],\n\n // Prevent duplicate props in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": [\"error\", { ignoreCase: true }],\n\n // Prevent usage of unwrapped JSX strings\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md\n \"react/jsx-no-literals\": [\"off\", { noStrings: true }],\n\n // Disallow undeclared variables in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // Enforce PascalCase for user-defined JSX components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: true,\n ignore: [],\n },\n ],\n\n // Enforce propTypes declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md\n \"react/sort-prop-types\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n requiredFirst: false,\n sortShapeProp: true,\n },\n ],\n\n // Enforce props alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md\n \"react/jsx-sort-props\": [\n \"off\",\n {\n ignoreCase: true,\n callbacksLast: false,\n shorthandFirst: false,\n shorthandLast: false,\n noSortAlphabetically: false,\n reservedFirst: true,\n },\n ],\n\n // Prevent React to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": [hasJsxRuntime ? \"off\" : \"error\"],\n\n // Prevent variables used in JSX to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md\n \"react/jsx-uses-vars\": \"error\",\n\n // Prevent usage of dangerous JSX properties\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Prevent usage of deprecated methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": [\"error\"],\n\n // Prevent usage of setState in componentDidMount\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md\n // this is necessary for server-rendering\n \"react/no-did-mount-set-state\": \"off\",\n\n // Prevent usage of setState in componentDidUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md\n \"react/no-did-update-set-state\": \"error\",\n\n // Prevent usage of setState in componentWillUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md\n \"react/no-will-update-set-state\": \"error\",\n\n // Prevent direct mutation of this.state\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent usage of isMounted\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md\n \"react/no-is-mounted\": \"error\",\n\n // Prevent multiple component definition per file\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"off\",\n\n // Prevent usage of setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md\n \"react/no-set-state\": \"off\",\n\n // Prevent using string references\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Prevent usage of unknown DOM property\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Require ES6 class declarations over React.createClass\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md\n \"react/prefer-es6-class\": [\"error\", \"always\"],\n\n // Require stateless functions when not using lifecycle methods, setState or ref\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md\n \"react/prefer-stateless-function\": [\"error\", { ignorePureComponents: true }],\n\n // Prevent missing props validation in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": [\n \"error\",\n {\n ignore: [],\n customValidators: [],\n skipUndeclared: false,\n },\n ],\n\n // Prevent missing React when using JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": hasJsxRuntime ? \"off\" : \"error\",\n\n // Require render() methods to return something\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md\n \"react/require-render-return\": \"error\",\n\n // Prevent extra closing tags for components without children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Enforce defaultProps declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-default-props.md\n \"react/sort-default-props\": [\n \"error\",\n {\n ignoreCase: true,\n },\n ],\n\n // Enforce component methods order\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md\n \"react/sort-comp\": [\n \"error\",\n {\n order: [\n \"static-variables\",\n \"static-methods\",\n \"instance-variables\",\n \"lifecycle\",\n \"/^handle.+$/\",\n \"/^on.+$/\",\n \"getters\",\n \"setters\",\n \"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/\",\n \"instance-methods\",\n \"everything-else\",\n \"rendering\",\n ],\n groups: {\n lifecycle: [\n \"displayName\",\n \"propTypes\",\n \"contextTypes\",\n \"childContextTypes\",\n \"mixins\",\n \"statics\",\n \"defaultProps\",\n \"constructor\",\n \"getDefaultProps\",\n \"getInitialState\",\n \"state\",\n \"getChildContext\",\n \"getDerivedStateFromProps\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"getSnapshotBeforeUpdate\",\n \"componentDidUpdate\",\n \"componentDidCatch\",\n \"componentWillUnmount\",\n ],\n rendering: [\"/^render.+$/\", \"render\"],\n },\n },\n ],\n\n // Require that the first prop in a JSX element be on a new line when the element is multiline\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md\n \"react/jsx-first-prop-new-line\": [\"error\", \"multiline-multiprop\"],\n\n // Enforce spacing around jsx equals signs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md\n \"react/jsx-equals-spacing\": [\"error\", \"never\"],\n\n // Enforce JSX indentation\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md\n \"react/jsx-indent\": [\"error\", (styleRules[\"indent\"] as any[])[1] as number, { checkAttributes: true, indentLogicalExpressions: true }],\n\n // Disallow target=\"_blank\" on links\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": [\"error\", { enforceDynamicLinks: \"always\" }],\n\n // prevent accidental JS comments from being injected into JSX as text\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // disallow using React.render/ReactDOM.render's return value\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md\n \"react/no-render-return-value\": \"error\",\n\n // require a shouldComponentUpdate method, or PureRenderMixin\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md\n \"react/require-optimization\": [\"off\", { allowDecorators: [] }],\n\n // warn against using findDOMNode()\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n \"react/no-find-dom-node\": \"error\",\n\n // Forbid certain props on Components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md\n \"react/forbid-component-props\": [\"off\", { forbid: [] }],\n\n // Forbid certain elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md\n \"react/forbid-elements\": [\"off\", { forbid: [] }],\n\n // Prevent problem with children and props.dangerouslySetInnerHTML\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // Prevent unused propType definitions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md\n \"react/no-unused-prop-types\": [\n \"error\",\n {\n customValidators: [],\n skipShapeProps: true,\n },\n ],\n\n // Require style prop value be an object or var\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // Prevent invalid characters from appearing in markup\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md\n \"react/no-unescaped-entities\": \"error\",\n\n // Prevent passing of children as props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Validate whitespace in and around the JSX opening and closing brackets\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md\n \"react/jsx-tag-spacing\": [\n \"error\",\n {\n closingSlash: \"never\",\n beforeSelfClosing: \"always\",\n afterOpening: \"never\",\n beforeClosing: \"never\",\n },\n ],\n\n // Enforce spaces before the closing bracket of self-closing JSX elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md\n // Deprecated in favor of jsx-tag-spacing\n \"react/jsx-space-before-closing\": [\"off\", \"always\"],\n\n // Prevent usage of Array index in keys\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md\n \"react/require-default-props\": [\n \"error\",\n {\n forbidDefaultForRequired: true,\n },\n ],\n\n // Forbids using non-exported propTypes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md\n // this is intentionally set to \"warn\". it would be \"error\",\n // but it's only critical if you're stripping propTypes in production.\n \"react/forbid-foreign-prop-types\": [\"warn\", { allowInPropTypes: true }],\n\n // Prevent void DOM elements from receiving children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n // Enforce all defaultProps have a corresponding non-required PropType\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md\n \"react/default-props-match-prop-types\": [\"error\", { allowRequiredDefaults: false }],\n\n // Prevent usage of shouldComponentUpdate when extending React.PureComponent\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md\n \"react/no-redundant-should-component-update\": \"error\",\n\n // Prevent unused state values\n // https://github.com/yannickcr/eslint-plugin-react/pull/1103/\n \"react/no-unused-state\": \"error\",\n\n // Enforces consistent naming for boolean props\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md\n \"react/boolean-prop-naming\": [\n \"off\",\n {\n propTypeNames: [\"bool\", \"mutuallyExclusiveTrueProps\"],\n rule: \"^(is|has)[A-Z]([A-Za-z0-9]?)+\",\n message: \"\",\n },\n ],\n\n // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\"error\", { props: \"never\", children: \"never\" }],\n\n // One JSX Element Per Line\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md\n \"react/jsx-one-expression-per-line\": [\"error\", { allow: \"single-child\" }],\n\n // Enforce consistent usage of destructuring assignment of props, state, and context\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md\n \"react/destructuring-assignment\": [\"error\", \"always\"],\n\n // Prevent using this.state within a this.setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Prevent usage of button elements without an explicit type attribute\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n submit: true,\n reset: false,\n },\n ],\n\n // Ensures inline tags are not rendered without spaces between them\n \"react/jsx-child-element-spacing\": \"off\",\n\n // Prevent this from being used in stateless functional components\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md\n \"react/no-this-in-sfc\": \"error\",\n\n // Validate JSX maximum depth\n // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md\n \"react/jsx-max-depth\": \"off\",\n\n // Disallow multiple spaces between inline JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md\n \"react/jsx-props-no-multi-spaces\": \"error\",\n\n // Prevent usage of UNSAFE_ methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md\n \"react/no-unsafe\": \"off\",\n\n // Enforce shorthand or standard form for React fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/bc976b837abeab1dffd90ac6168b746a83fc83cc/docs/rules/jsx-fragments.md\n \"react/jsx-fragments\": [\"error\", \"syntax\"],\n\n // Enforce linebreaks in curly braces in JSX attributes and expressions.\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md\n \"react/jsx-curly-newline\": [\n \"error\",\n {\n multiline: \"consistent\",\n singleline: \"consistent\",\n },\n ],\n\n // Enforce state initialization style\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md\n // TODO: set to \"never\" once @anolilab/babel-preset supports public class fields\n \"react/state-in-constructor\": [\"error\", \"always\"],\n\n // Enforces where React component static properties should be positioned\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md\n // TODO: set to \"static public field\" once @anolilab/babel-preset supports public class fields\n \"react/static-property-placement\": [\"error\", \"property assignment\"],\n\n // Disallow JSX props spreading\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md\n \"react/jsx-props-no-spreading\": [\n \"error\",\n {\n html: \"enforce\",\n custom: \"enforce\",\n explicitSpread: \"ignore\",\n exceptions: [],\n },\n ],\n\n // Enforce that props are read-only\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md\n \"react/prefer-read-only-props\": \"off\",\n\n // Prevent usage of `javascript:` URLs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md\n \"react/jsx-no-script-url\": [\n \"error\",\n [\n {\n name: \"Link\",\n props: [\"to\"],\n },\n ],\n ],\n\n // Disallow unnecessary fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": \"error\",\n\n // Prevent adjacent inline elements not separated by whitespace\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md\n \"react/no-adjacent-inline-elements\": \"error\",\n\n // Enforce a specific function type for function components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"arrow-function\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Enforce a new line after jsx elements and expressions\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md\n \"react/jsx-newline\": \"off\",\n\n // Prevent react contexts from taking non-stable values\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n ...prettierReactRules,\n },\n },\n {\n files: [\"*.jsx\"],\n rules: {\n // only .jsx files may have JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md\n \"react/jsx-filename-extension\": \"error\",\n\n // Prevents common casing typos\n // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md\n \"react/no-typos\": \"error\",\n\n // Validate closing tag location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md\n \"react/jsx-closing-tag-location\": \"error\",\n\n // Prevent missing parentheses around multilines JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md\n \"react/jsx-wrap-multilines\": [\n \"error\",\n {\n // eslint-disable-next-line sonarjs/no-duplicate-string\n declaration: \"parens-new-line\",\n assignment: \"parens-new-line\",\n return: \"parens-new-line\",\n arrow: \"parens-new-line\",\n condition: \"parens-new-line\",\n logical: \"parens-new-line\",\n prop: \"parens-new-line\",\n },\n ],\n },\n },\n {\n files: [\"*.tsx\"],\n rules: {\n // Disable JS specific rules\n \"react/jsx-filename-extension\": \"off\",\n \"react/default-props-match-prop-types\": \"off\",\n \"react/prop-types\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkUJAIXHCQ_js = require('../../chunk-UJAIXHCQ.js');
4
- var chunkYMWD4DNM_js = require('../../chunk-YMWD4DNM.js');
5
4
  var chunk72JA2E3L_js = require('../../chunk-72JA2E3L.js');
6
5
  var chunkPCIKFIV2_js = require('../../chunk-PCIKFIV2.js');
7
6
  var chunkROX6JHFJ_js = require('../../chunk-ROX6JHFJ.js');
@@ -10,9 +9,8 @@ var chunkSV64EPVP_js = require('../../chunk-SV64EPVP.js');
10
9
  var packageJsonUtils = require('@anolilab/package-json-utils');
11
10
  var process = require('process');
12
11
 
13
- var t=chunk6E2RGUNG_js.a.rules,d=chunkSV64EPVP_js.a.rules,e=chunkROX6JHFJ_js.a.rules,g=chunkPCIKFIV2_js.a.rules,b=chunk72JA2E3L_js.a.rules,r=chunkUJAIXHCQ_js.a.rules,{quotes:C,semi:_}=e,{indent:x}=e;packageJsonUtils.hasAnyDep(["prettier"])&&(global.hasAnolilabEsLintConfigTypescriptPrettier||(global.hasAnolilabEsLintConfigTypescriptPrettier=!0,chunkYMWD4DNM_js.b(`
14
- Found prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824`)),x="off");var n=b["import/extensions"],o=b["import/no-extraneous-dependencies"],s=e["comma-dangle"],i={};packageJsonUtils.pkg&&(i=packageJsonUtils.pkg?.anolilab?.["eslint-config"]);var h=process.env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true";i?.warn_on_unsupported_typescript_version!==void 0&&(h=i?.warn_on_unsupported_typescript_version);var j={overrides:[{files:["*.ts","*.mts","*.cts","*.tsx"],extends:["plugin:import/typescript"],plugins:["@typescript-eslint"],parser:"@typescript-eslint/parser",parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},warnOnUnsupportedTypeScriptVersion:h},settings:{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}},"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts"],"import/external-module-folders":["node_modules","node_modules/@types"]},rules:{strict:"off","brace-style":"off","@typescript-eslint/brace-style":e["brace-style"],camelcase:"off","@typescript-eslint/naming-convention":["error",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE"]},{selector:"function",format:["camelCase","PascalCase"]},{selector:"typeLike",format:["PascalCase"]}],"comma-dangle":"off","@typescript-eslint/comma-dangle":[s[0],{...s[1],enums:s[1].arrays,generics:s[1].arrays,tuples:s[1].arrays}],"comma-spacing":"off","@typescript-eslint/comma-spacing":e["comma-spacing"],"dot-notation":"off","func-call-spacing":"off","@typescript-eslint/func-call-spacing":e["func-call-spacing"],indent:"off","@typescript-eslint/indent":x,"keyword-spacing":"off","@typescript-eslint/keyword-spacing":e["keyword-spacing"],"lines-between-class-members":"off","@typescript-eslint/lines-between-class-members":e["lines-between-class-members"],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":e["no-array-constructor"],"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":g["no-dupe-class-members"],"no-empty-function":"off","@typescript-eslint/no-empty-function":t["no-empty-function"],"no-extra-parens":"off","@typescript-eslint/no-extra-parens":d["no-extra-parens"],"no-extra-semi":"off","@typescript-eslint/no-extra-semi":d["no-extra-semi"],"no-implied-eval":"off","no-new-func":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":t["no-loop-func"],"no-magic-numbers":"off","@typescript-eslint/no-magic-numbers":t["no-magic-numbers"],"no-redeclare":"off","@typescript-eslint/no-redeclare":t["no-redeclare"],"no-shadow":"off","@typescript-eslint/no-shadow":r["no-shadow"],"no-throw-literal":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":t["no-unused-expressions"],"no-unused-vars":"off","@typescript-eslint/no-unused-vars":r["no-unused-vars"],"no-use-before-define":"off","@typescript-eslint/no-use-before-define":r["no-use-before-define"],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":g["no-useless-constructor"],quotes:"off","@typescript-eslint/quotes":C,semi:"off","@typescript-eslint/semi":_,"space-before-function-paren":"off","@typescript-eslint/space-before-function-paren":e["space-before-function-paren"],"no-return-await":"off","@typescript-eslint/return-await":t["no-return-await"],"space-infix-ops":"off","@typescript-eslint/space-infix-ops":e["space-infix-ops"],"import/extensions":[n[0],n[1],{...n[2],ts:"never",tsx:"never"}],"import/no-extraneous-dependencies":[o[0],{...o[1],devDependencies:o[1].devDependencies.map(v=>v.replaceAll(/\bjs(x?)\b/g,"ts$1"))}],"constructor-super":"off","getter-return":"off","no-const-assign":"off","no-dupe-args":"off","no-dupe-keys":"off","no-func-assign":"off","no-new-symbol":"off","no-obj-calls":"off","no-this-before-super":"off","no-undef":"off","no-unreachable":"off","no-unsafe-negation":"off","valid-typeof":"off","import/named":"off","import/no-unresolved":"off","react/require-default-props":"off","@typescript-eslint/consistent-type-imports":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-types":["error",{types:{String:{message:"Use string instead",fixWith:"string"},Boolean:{message:"Use boolean instead",fixWith:"boolean"},Number:{message:"Use number instead",fixWith:"number"},Object:{message:"Use object instead",fixWith:"object"},Array:{message:"Provide a more specific type"}}}],"@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/method-signature-style":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/no-import-type-side-effects":"error"}},{files:["*.d.ts"],rules:{"import/no-duplicates":"off"}}]},N=j;
12
+ var t=chunk6E2RGUNG_js.a.rules,m=chunkSV64EPVP_js.a.rules,e=chunkROX6JHFJ_js.a.rules,d=chunkPCIKFIV2_js.a.rules,g=chunk72JA2E3L_js.a.rules,r=chunkUJAIXHCQ_js.a.rules,{quotes:w,semi:_,indent:j}=e,b={};packageJsonUtils.hasAnyDep(["prettier"],{peerDeps:!1})&&(b={"@typescript-eslint/lines-around-comment":0,"@typescript-eslint/quotes":0,"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"});var n=g["import/extensions"],o=g["import/no-extraneous-dependencies"],s=e["comma-dangle"],i={};packageJsonUtils.pkg&&(i=packageJsonUtils.pkg?.anolilab?.["eslint-config"]);var x=process.env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true";i?.warn_on_unsupported_typescript_version!==void 0&&(x=i?.warn_on_unsupported_typescript_version);var C={overrides:[{files:["*.ts","*.mts","*.cts","*.tsx"],extends:["plugin:import/typescript"],plugins:["@typescript-eslint"],parser:"@typescript-eslint/parser",parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},warnOnUnsupportedTypeScriptVersion:x},settings:{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}},"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts"],"import/external-module-folders":["node_modules","node_modules/@types"]},rules:{strict:"off","brace-style":"off","@typescript-eslint/brace-style":e["brace-style"],camelcase:"off","@typescript-eslint/naming-convention":["error",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE"]},{selector:"function",format:["camelCase","PascalCase"]},{selector:"typeLike",format:["PascalCase"]}],"comma-dangle":"off","@typescript-eslint/comma-dangle":[s[0],{...s[1],enums:s[1].arrays,generics:s[1].arrays,tuples:s[1].arrays}],"comma-spacing":"off","@typescript-eslint/comma-spacing":e["comma-spacing"],"dot-notation":"off","func-call-spacing":"off","@typescript-eslint/func-call-spacing":e["func-call-spacing"],indent:"off","@typescript-eslint/indent":j,"keyword-spacing":"off","@typescript-eslint/keyword-spacing":e["keyword-spacing"],"lines-between-class-members":"off","@typescript-eslint/lines-between-class-members":e["lines-between-class-members"],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":e["no-array-constructor"],"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":d["no-dupe-class-members"],"no-empty-function":"off","@typescript-eslint/no-empty-function":t["no-empty-function"],"no-extra-parens":"off","@typescript-eslint/no-extra-parens":m["no-extra-parens"],"no-extra-semi":"off","@typescript-eslint/no-extra-semi":m["no-extra-semi"],"no-implied-eval":"off","no-new-func":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":t["no-loop-func"],"no-magic-numbers":"off","@typescript-eslint/no-magic-numbers":t["no-magic-numbers"],"no-redeclare":"off","@typescript-eslint/no-redeclare":t["no-redeclare"],"no-shadow":"off","@typescript-eslint/no-shadow":r["no-shadow"],"no-throw-literal":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":t["no-unused-expressions"],"no-unused-vars":"off","@typescript-eslint/no-unused-vars":r["no-unused-vars"],"no-use-before-define":"off","@typescript-eslint/no-use-before-define":r["no-use-before-define"],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":d["no-useless-constructor"],quotes:"off","@typescript-eslint/quotes":w,semi:"off","@typescript-eslint/semi":_,"space-before-function-paren":"off","@typescript-eslint/space-before-function-paren":e["space-before-function-paren"],"no-return-await":"off","@typescript-eslint/return-await":t["no-return-await"],"space-infix-ops":"off","@typescript-eslint/space-infix-ops":e["space-infix-ops"],"import/extensions":[n[0],n[1],{...n[2],ts:"never",tsx:"never"}],"import/no-extraneous-dependencies":[o[0],{...o[1],devDependencies:o[1].devDependencies.map(v=>v.replaceAll(/\bjs(x?)\b/g,"ts$1"))}],"constructor-super":"off","getter-return":"off","no-const-assign":"off","no-dupe-args":"off","no-dupe-keys":"off","no-func-assign":"off","no-new-symbol":"off","no-obj-calls":"off","no-this-before-super":"off","no-undef":"off","no-unreachable":"off","no-unsafe-negation":"off","valid-typeof":"off","import/named":"off","import/no-unresolved":"off","react/require-default-props":"off","@typescript-eslint/consistent-type-imports":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-types":["error",{types:{String:{message:"Use string instead",fixWith:"string"},Boolean:{message:"Use boolean instead",fixWith:"boolean"},Number:{message:"Use number instead",fixWith:"number"},Object:{message:"Use object instead",fixWith:"object"},Array:{message:"Provide a more specific type"}}}],"@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/method-signature-style":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/no-import-type-side-effects":"error",...b}},{files:["*.d.ts"],rules:{"import/no-duplicates":"off"}}]},q=C;
15
13
 
16
- module.exports = N;
14
+ module.exports = q;
17
15
  //# sourceMappingURL=out.js.map
18
16
  //# sourceMappingURL=typescript.js.map