-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
39 lines (39 loc) · 1.31 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* eslint-disable no-undef */
module.exports = {
root: true,
parser: '@typescript-eslint/parser', // the TypeScript parser we installed earlier
parserOptions: {
ecmaFeatures: { jsx: true }, // Allows for the parsing of JSX
},
env: {
browser: true,
node: true,
},
plugins: ['prettier'],
extends: [
'eslint:recommended', // eslint default rules
'plugin:@typescript-eslint/eslint-recommended', // eslint TypeScript rules (github.com/typescript-eslint/typescript-eslint)
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended', // eslint react rules (github.com/yannickcr/eslint-plugin-react)
'plugin:jsx-a11y/recommended', // accessibility plugin
// Prettier plugin and recommended rules
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
rules: {
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'react/prop-types': 'off', // We turn off prop-types rule, as we will use TypeScript's types instead.
'no-undef': 'error',
'no-restricted-imports': [
'error',
{
patterns: ['@material-ui/*/*/*', '!@material-ui/core/test-utils/*'],
},
],
},
settings: {
react: { version: 'latest' },
},
};