73 lines
2.2 KiB
JavaScript
73 lines
2.2 KiB
JavaScript
module.exports = {
|
|
parser: '@typescript-eslint/parser',
|
|
extends: [
|
|
'airbnb',
|
|
'plugin:react/recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:jest/recommended',
|
|
// config-prettier + plugin-prettier to integrate prettier into eslint
|
|
'prettier',
|
|
'plugin:prettier/recommended',
|
|
],
|
|
plugins: ['@typescript-eslint', 'react-hooks', 'react', 'jest', 'prettier'],
|
|
env: {
|
|
browser: true,
|
|
es6: true,
|
|
},
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
// global variables
|
|
globals: {
|
|
__LOCALE__: false,
|
|
__DEV__: false,
|
|
__STAGING__: false,
|
|
__BROWSER__: true,
|
|
__SSR__: false,
|
|
__TEST__: false,
|
|
__PLATFORM__: 'readonly',
|
|
__ENV__: 'readonly',
|
|
__PROVIDER__: 'readonly',
|
|
},
|
|
rules: {
|
|
'linebreak-style': 'off',
|
|
'global-require': 'off',
|
|
'no-restricted-globals': 'off',
|
|
'func-names': 'off',
|
|
'no-console': 'off',
|
|
'no-continue': 'off',
|
|
'no-param-reassign': 'off',
|
|
'no-plusplus': 'off',
|
|
'no-loop-func': 'off',
|
|
//"class-methods-use-this": "off",
|
|
'jsx-a11y/no-static-element-interactions': 'off',
|
|
'jsx-a11y/click-events-have-key-events': 'off',
|
|
'react-hooks/exhaustive-deps': 'warn',
|
|
'react/prop-types': 'off',
|
|
'react/require-default-props': 'off',
|
|
'react/jsx-filename-extension': 'off',
|
|
'react/no-array-index-key': 'off',
|
|
'react/default-props-match-prop-types': 'off',
|
|
'react/jsx-props-no-multi-spaces': 'off',
|
|
'import/no-webpack-loader-syntax': 'off',
|
|
'import/no-extraneous-dependencies': 'off',
|
|
'no-underscore-dangle': 'off',
|
|
'prefer-destructuring': 'off',
|
|
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
|
'jsx-a11y/label-has-associated-control': 'off',
|
|
'jsx-a11y/label-has-for': 'off',
|
|
'jsx-a11y/no-noninteractive-tabindex': 'off',
|
|
'react/prefer-stateless-function': 0,
|
|
'prettier/prettier': 'error',
|
|
'import/extensions': 'off',
|
|
// Typescript
|
|
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
'@typescript-eslint/indent': 'off',
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/no-empty-interface': 'off',
|
|
},
|
|
};
|