-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
45 lines (45 loc) · 1.63 KB
/
.eslintrc.js
File metadata and controls
45 lines (45 loc) · 1.63 KB
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
40
41
42
43
44
45
module.exports = {
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:react/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true,
},
},
plugins: ['import', '@typescript-eslint', 'unused-imports'],
settings: {
react: {
pragma: 'React', // Pragma to use, default to "React"
version: 'detect', // React version. "detect" automatically picks the version you have installed.
},
},
rules: {
'import/order': [
'error',
{
'newlines-between': 'always',
alphabetize: {
order: 'asc' /* sort in ascending order. Options: ['ignore', 'asc', 'desc'] */,
caseInsensitive: true /* ignore case. Options: [true, false] */,
},
},
],
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports-ts': 'error',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/display-name': 0,
eqeqeq: 'error',
},
ignorePatterns: ['**/*.js'],
};