-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
61 lines (60 loc) · 1.54 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// @ts-check
/** @type { import("@types/eslint").Linter.Config } */
module.exports = {
env: {
browser: true,
es6: true,
node: true,
jest: true,
},
extends: [
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['import', 'react', 'prettier', '@typescript-eslint'],
rules: {
'react/jsx-filename-extension': 'off',
'no-underscore-dangle': ['error', { allow: ['__'], allowAfterThis: true }],
'no-confusing-arrow': 'off',
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
'react/prefer-stateless-function': 'off',
'prettier/prettier': 'error',
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
ts: 'never',
tsx: 'never',
js: 'never',
jsx: 'never',
},
],
'import/prefer-default-export': 'off',
'react/prop-types': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'react/jsx-props-no-spreading': 'off',
'react/react-in-jsx-scope': 'off',
'no-shadow': 'off',
'react/function-component-definition': 'off',
'react/require-default-props': 'off',
},
globals: {
graphql: true,
page: true,
browser: true,
context: true,
},
overrides: [
{
files: ['specs/**/*.ts', 'playwright.config.ts'],
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
}