-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
49 lines (49 loc) · 1.43 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,
parser: '@typescript-eslint/parser',
env: {
jest: true,
node: true,
},
plugins: ['@typescript-eslint', 'react', 'jest'],
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:jest/recommended',
'prettier',
],
settings: {
'import/resolver': {
typescript: {
project: 'packages/*/tsconfig.json',
},
},
},
rules: {
'import/extensions': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'test/**', // tape, common npm pattern
'tests/**', // also common npm pattern
'spec/**', // mocha, rspec-like pattern
'**/__tests__/**', // jest pattern
'**/__mocks__/**', // jest pattern
'test.{js,jsx}', // repos with a single test file
'test-*.{js,jsx}', // repos with multiple top-level test files
'**/*{.,_}{test,spec}.{js,jsx}', // tests where the extension or filename suffix denotes that it is a test
'**/jest.config.ts', // jest config
'**/webpack.config.js',
],
optionalDependencies: false,
},
],
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
'import/no-default-export': 'warn',
'import/prefer-default-export': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
},
};