forked from flyerman/lace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
56 lines (56 loc) · 1.85 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['lodash'],
extends: [
'@atixlabs/eslint-config/configurations/react',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript'
],
settings: {
'import/resolver': { typescript: { project: ['packages/*/src/tsconfig.json', 'apps/*/src/tsconfig.json'] } },
// Fixes eslint not being able to detect react version
react: { pragma: 'React', fragment: 'Fragment', version: 'detect' }
},
rules: {
quotes: ['error', 'single', { avoidEscape: true }],
'new-cap': ['error', { properties: false }],
// needed for Cardano.*
'unicorn/filename-case': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/prefer-object-from-entries': 'off',
'unicorn/prefer-node-protocol': 'off',
'unicorn/no-array-for-each': 'off',
'unicorn/prefer-module': 'off',
'promise/always-return': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-invalid-this': 0,
'react/prop-types': 'off',
'max-len': 'off', // prettier is already handling this automatically,
'no-console': 'off', // Fine to disable here, prod webpack config strips console logs
'lodash/import-scope': ['error', 'method']
},
overrides: [
{
files: ['stories/desktop/**/*.stories.{ts,tsx}', 'stories/desktop/decorators/**'],
rules: {
'react/no-multi-comp': [0, { ignoreStateless: true }]
}
},
{
files: '**/*jest.config.js',
rules: {
'@typescript-eslint/no-var-requires': 'off'
}
},
{
// https://github.com/SonarSource/eslint-plugin-sonarjs/issues/176
files: ['**/*.{test,integration,spec}.{ts,tsx}'],
rules: {
'sonarjs/no-duplicate-string': 'off'
}
}
]
};