-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
49 lines (49 loc) · 1.32 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
module.exports = {
root: true,
env: {
browser: true,
jest: true,
es6: true
},
extends: [
'nava',
'plugin:react/recommended',
'plugin:jest/recommended',
'plugin:jest-dom/recommended',
"plugin:jsx-a11y/strict",
'plugin:testing-library/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
"plugin:prettier/recommended"
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
project: ['./tsconfig.json'],
sourceType: 'module',
tsconfigRootDir: __dirname,
},
settings: {
react: {
version: "detect" // Tells eslint-plugin-react to autodetect the React version to use
}
},
plugins: [
'jest',
'jest-dom',
'jsx-a11y',
'react',
'testing-library',
'@typescript-eslint'
],
rules: {
"no-use-before-define": "off", //recommended by TS lint
"@typescript-eslint/no-use-before-define": ["error"], //recommended by TS lint
"react/react-in-jsx-scope": "off", //React is provided by NextJS instead
"react/prop-types": "off", //strict TypeScript provides the same benefits
"camelcase": ["error", {"allow": ["user_key"]}], // parameter named by external API gateway and used in index.tsx
}
}