Created
January 13, 2022 17:26
-
-
Save DanielHoffmann/4c709366626149c84208cb3f16ded1c0 to your computer and use it in GitHub Desktop.
eslint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
ignorePatterns: [ | |
'config/**/*', | |
'**/build/**/*', | |
'**/.yarn/**/*', | |
'**/artifacts/**/*', | |
'**/storybook-static/**/*', | |
'**/node_modules/**/*', | |
'**/*.config.js', | |
'**/*rc.js', | |
'**/generated.ts', | |
'**/.pnp.cjs', | |
'**/package-lock.json', | |
'**/yarn.lock.json', | |
], | |
env: { | |
browser: true, | |
es6: true, | |
jest: true, | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:import/recommended', | |
'plugin:import/typescript', | |
'plugin:@typescript-eslint/eslint-recommended', | |
'plugin:@typescript-eslint/recommended', | |
'prettier', | |
'plugin:react/recommended', | |
], | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
ecmaVersion: '2018', | |
}, | |
plugins: ['import-helpers', 'react-hooks'], | |
settings: { | |
react: { | |
version: 'detect', | |
}, | |
linkComponents: [{ name: 'Link', linkAttribute: 'to' }], | |
'import/resolver': { | |
[require.resolve('./eslint-resolver.js')]: {}, | |
}, | |
}, | |
rules: { | |
'@typescript-eslint/ban-ts-comment': 'off', | |
'@typescript-eslint/ban-ts-ignore': 'off', | |
'@typescript-eslint/ban-types': [ | |
'error', | |
{ | |
extendDefaults: true, | |
types: { | |
'{}': false, | |
}, | |
}, | |
], | |
'@typescript-eslint/camelcase': 'off', | |
'@typescript-eslint/explicit-function-return-type': 'off', | |
'@typescript-eslint/explicit-member-accessibility': 'off', | |
'@typescript-eslint/no-explicit-any': 'off', | |
'@typescript-eslint/explicit-module-boundary-types': 'off', | |
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }], | |
'@typescript-eslint/no-use-before-define': 'off', | |
'@typescript-eslint/no-var-requires': 'off', | |
'dot-notation': 'error', | |
eqeqeq: ['error', 'smart'], | |
'no-alert': 'error', | |
'no-async-promise-executor': 'error', | |
'no-await-in-loop': 'off', | |
'no-caller': 'error', | |
'no-case-declarations': 'off', | |
'no-console': ['error', { allow: ['warn', 'error'] }], | |
'no-div-regex': 'error', | |
'no-duplicate-imports': 'error', | |
'no-else-return': 'off', | |
'no-empty-function': 'error', | |
'no-eval': 'error', | |
'no-extend-native': 'error', | |
'no-implicit-coercion': 'off', | |
'no-implied-eval': 'error', | |
'no-lonely-if': 'error', | |
'no-loop-func': 'error', | |
'no-multi-str': 'error', | |
'no-negated-condition': 'off', | |
'no-new': 'error', | |
'no-new-func': 'error', | |
'no-new-object': 'error', | |
'no-new-require': 'error', | |
'no-new-wrappers': 'error', | |
'no-octal-escape': 'error', | |
'no-param-reassign': 'off', | |
'no-process-env': 'off', | |
'no-return-assign': 'error', | |
'no-return-await': 'error', | |
'no-script-url': 'error', | |
'no-sequences': 'error', | |
'no-shadow': 'off', | |
'no-shadow-restricted-names': 'error', | |
'no-template-curly-in-string': 'error', | |
'no-throw-literal': 'error', | |
'no-undef-init': 'error', | |
'no-unused-expressions': 'error', | |
'no-useless-catch': 'error', | |
'no-useless-concat': 'error', | |
'no-useless-rename': 'error', | |
'no-useless-return': 'error', | |
'no-var': 'error', | |
'no-void': 'error', | |
'object-shorthand': 'error', | |
'prefer-arrow-callback': 'off', | |
'prefer-const': 'error', | |
'prefer-object-spread': 'error', | |
'prefer-promise-reject-errors': 'off', | |
'prefer-rest-params': 'error', | |
'prefer-template': 'error', | |
'require-atomic-updates': 'error', | |
'require-await': 'off', | |
'import/default': 'off', | |
'import/export': 'error', | |
'import/extensions': 'off', | |
'import/first': 'error', | |
'import/named': 'off', | |
'import/namespace': 'off', | |
'import/newline-after-import': 'error', | |
'import/no-absolute-path': 'error', | |
'import/no-amd': 'error', | |
'import/no-commonjs': 'error', | |
'import/no-cycle': 'error', | |
'import/no-dynamic-require': 'error', | |
'import/no-mutable-exports': 'error', | |
'import/no-named-as-default': 'off', | |
'import/no-nodejs-modules': 'error', | |
'import/no-useless-path-segments': 'error', | |
'import-helpers/order-imports': [ | |
'error', | |
{ | |
alphabetize: { order: 'asc' }, | |
}, | |
], | |
'sort-imports': ['error', { ignoreDeclarationSort: true }], | |
'react/default-props-match-prop-types': 'error', | |
'react/jsx-boolean-value': 'off', | |
'react/jsx-fragments': 'error', | |
'react/jsx-pascal-case': 'error', | |
'react/jsx-sort-default-props': 'error', | |
'react/jsx-sort-props': 'error', | |
'react/no-danger': 'error', | |
'react/no-this-in-sfc': 'error', | |
'react/no-typos': 'error', | |
'react/no-unused-prop-types': 'error', | |
'react/no-unused-state': 'error', | |
'react/prefer-es6-class': 'error', | |
'react/prefer-stateless-function': 'error', | |
'react/prop-types': 'off', | |
'react/sort-prop-types': 'error', | |
'react/void-dom-elements-no-children': 'error', | |
'react-hooks/exhaustive-deps': 'error', | |
'react-hooks/rules-of-hooks': 'error', | |
'react/react-in-jsx-scope': 'off', | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment