-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.eslintrc.js
More file actions
47 lines (46 loc) · 1.41 KB
/
.eslintrc.js
File metadata and controls
47 lines (46 loc) · 1.41 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
46
47
const { resolve } = require('path')
/** @type { import('eslint').Linter.Config } */
module.exports = {
overrides: [
{
files: ['*.js'],
extends: ['airbnb', 'prettier', 'prettier/react'],
rules: {
'import/no-extraneous-dependencies': 'off',
'no-restricted-syntax': 'off',
},
},
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'airbnb-typescript',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: resolve(__dirname, 'tsconfig.json'),
},
rules: {
'no-restricted-syntax': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/media-has-caption': 'off',
'react/destructuring-assignment': [
'error',
'always',
{ ignoreClassFields: true },
],
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'react/state-in-constructor': ['error', 'never'],
'react/static-property-placement': ['error', 'static public field'],
},
},
],
}