@evojs/eslint-plugin
Version:
Plugin for eslint
186 lines (185 loc) • 6.73 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const reactPlugin = require("eslint-plugin-react");
const reactHooksPlugin = require("eslint-plugin-react-hooks");
const stylisticPlugin = require("@stylistic/eslint-plugin");
exports.default = {
name: 'react',
plugins: {
'@stylistic': stylisticPlugin,
'react': reactPlugin,
'react-hooks': reactHooksPlugin,
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
jsxPragma: null,
},
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/boolean-prop-naming': 'off',
'react/button-has-type': 'off',
'react/checked-requires-onchange-or-readonly': 'off',
'react/default-props-match-prop-types': 'off',
'react/destructuring-assignment': 'off',
'react/display-name': 'error',
'react/forbid-component-props': 'off',
'react/forbid-dom-props': 'off',
'react/forbid-elements': 'off',
'react/forbid-foreign-prop-types': 'off',
'react/forbid-prop-types': 'off',
'react/function-component-definition': 'off',
'react/hook-use-state': 'off',
'react/iframe-missing-sandbox': 'off',
'react/jsx-boolean-value': 'off',
'react/jsx-child-element-spacing': 'off',
'react/jsx-closing-bracket-location': 'off',
'react/jsx-closing-tag-location': 'off',
'react/jsx-curly-brace-presence': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-curly-spacing': 'off',
'react/jsx-equals-spacing': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-first-prop-new-line': 'off',
'react/jsx-fragments': 'off',
'react/jsx-handler-names': 'off',
'react/jsx-indent-props': 'off',
'react/jsx-indent': 'off',
'react/jsx-key': 'error',
'react/jsx-max-depth': 'off',
'react/jsx-max-props-per-line': 'off',
'react/jsx-newline': 'off',
'react/jsx-no-bind': 'off',
'react/jsx-no-comment-textnodes': 'error',
'react/jsx-no-constructed-context-values': 'off',
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-leaked-render': 'off',
'react/jsx-no-literals': 'off',
'react/jsx-no-script-url': 'off',
'react/jsx-no-target-blank': 'error',
'react/jsx-no-undef': 'error',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-pascal-case': 'off',
'react/jsx-props-no-multi-spaces': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-sort-default-props': 'off',
'react/jsx-sort-props': 'off',
'react/jsx-space-before-closing': 'off',
'react/jsx-tag-spacing': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-uses-vars': 'error',
'react/jsx-wrap-multilines': 'off',
'react/no-access-state-in-setstate': 'off',
'react/no-adjacent-inline-elements': 'off',
'react/no-array-index-key': 'off',
'react/no-arrow-function-lifecycle': 'off',
'react/no-children-prop': 'error',
'react/no-danger-with-children': 'error',
'react/no-danger': 'off',
'react/no-deprecated': 'error',
'react/no-did-mount-set-state': 'off',
'react/no-did-update-set-state': 'off',
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'error',
'react/no-invalid-html-attribute': 'off',
'react/no-is-mounted': 'error',
'react/no-multi-comp': 'off',
'react/no-namespace': 'off',
'react/no-object-type-as-default-prop': 'off',
'react/no-redundant-should-component-update': 'off',
'react/no-render-return-value': 'error',
'react/no-set-state': 'off',
'react/no-string-refs': 'error',
'react/no-this-in-sfc': 'off',
'react/no-typos': 'off',
'react/no-unescaped-entities': 'error',
'react/no-unknown-property': 'warn',
'react/no-unsafe': 'off',
'react/no-unstable-nested-components': 'off',
'react/no-unused-class-component-methods': 'off',
'react/no-unused-prop-types': 'off',
'react/no-unused-state': 'off',
'react/no-will-update-set-state': 'off',
'react/prefer-es6-class': 'off',
'react/prefer-exact-props': 'off',
'react/prefer-read-only-props': 'off',
'react/prefer-stateless-function': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
'react/require-optimization': 'off',
'react/require-render-return': 'error',
'react/self-closing-comp': 'off',
'react/sort-comp': 'off',
'react/sort-default-props': 'off',
'react/sort-prop-types': 'off',
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'react/style-prop-object': 'off',
'react/void-dom-elements-no-children': 'off',
'no-empty-pattern': 'off',
'@stylistic/jsx-child-element-spacing': 'off',
'@stylistic/jsx-closing-bracket-location': 'off',
'@stylistic/jsx-closing-tag-location': 'off',
'@stylistic/jsx-curly-brace-presence': 'off',
'@stylistic/jsx-curly-newline': 'off',
'@stylistic/jsx-curly-spacing': 'off',
'@stylistic/jsx-equals-spacing': 'off',
'@stylistic/jsx-first-prop-new-line': 'off',
'@stylistic/jsx-function-call-newline': 'off',
'@stylistic/jsx-indent-props': 'off',
'@stylistic/jsx-indent': 'off',
'@stylistic/jsx-max-props-per-line': 'off',
'@stylistic/jsx-newline': 'off',
'@stylistic/jsx-one-expression-per-line': 'off',
'@stylistic/jsx-pascal-case': 'off',
'@stylistic/jsx-props-no-multi-spaces': 'off',
'@stylistic/jsx-quotes': 'warn',
'@stylistic/jsx-self-closing-comp': 'off',
'@stylistic/jsx-sort-props': 'off',
'@stylistic/jsx-tag-spacing': 'off',
'@stylistic/jsx-wrap-multilines': 'off',
'react-hooks/automatic-effect-dependencies': 'off',
'react-hooks/capitalized-calls': 'off',
'react-hooks/component-hook-factories': 'off',
'react-hooks/config': 'off',
'react-hooks/error-boundaries': 'off',
'react-hooks/fbt': 'off',
'react-hooks/fire': 'off',
'react-hooks/gating': 'off',
'react-hooks/globals': 'off',
'react-hooks/hooks': 'off',
'react-hooks/immutability': 'off',
'react-hooks/incompatible-library': 'off',
'react-hooks/invariant': 'off',
'react-hooks/memoized-effect-dependencies': 'off',
'react-hooks/no-deriving-state-in-effects': 'off',
'react-hooks/preserve-manual-memoization': 'off',
'react-hooks/purity': 'off',
'react-hooks/refs': 'off',
'react-hooks/rule-suppression': 'off',
'react-hooks/set-state-in-effect': 'off',
'react-hooks/set-state-in-render': 'off',
'react-hooks/static-components': 'off',
'react-hooks/syntax': 'off',
'react-hooks/todo': 'off',
'react-hooks/unsupported-syntax': 'off',
'react-hooks/use-memo': 'off',
'react-hooks/void-use-memo': 'off',
'react/forward-ref-uses-ref': 'off',
'react/jsx-props-no-spread-multi': 'off',
},
};