forked from maidsafe/sn_browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
104 lines (103 loc) · 3.39 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
const aliases = require('./.aliases.config');
const aliasesArray = Object.keys(aliases);
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
'plugin:promise/recommended',
'plugin:unicorn/recommended',
'prettier',
'prettier/react',
'prettier/@typescript-eslint'
],
parserOptions: {
ecmaFeatures: {
jsx: true
},
useJSXTextNode: false,
project: './tsconfig.json',
tsconfigRootDir: '.',
sourceType: 'module',
allowImportExportEverywhere: false,
codeFrame: true
},
rules: {
'unicorn/catch-error-name': 'off',
'unicorn/filename-case': 'off',
'unicorn/prefer-exponentiation-operator': 'off',
'unicorn/prefer-query-selector': 'off',
'unicorn/prefer-text-content': 'off',
'unicorn/no-for-loop': 'off',
'unicorn/throw-new-error': 'off',
'unicorn/regex-shorthand': 'error',
'unicorn/no-new-buffer': 'off',
'unicorn/no-unsafe-regex': 'error',
'no-prototype-builtins': 'off',
'unicorn/prefer-type-error': 'off',
'unicorn/new-for-builtins': 'off',
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'import/no-extraneous-dependencies': [
'off',
{
devDependencies: false,
optionalDependencies: false,
peerDependencies: false,
packageDir: './'
}
],
'react/prefer-stateless-function': 'off',
'jest/no-jasmine-globals': 'off',
'jest/valid-describe': 'off',
'react/destructuring-assignment': 'off',
'space-in-parens': ['error', 'always'],
'react/jsx-filename-extension': 'off',
'no-shadow': 'error',
'react/prefer-stateless-function': 'error',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/array-type': ['error', 'generic'],
indent: 'off',
'@typescript-eslint/indent': ['error', 4]
},
overrides: [
{
files: ['*config*.js'],
rules: {
'no-console': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-default-export': 'off',
'@typescript-eslint/tslint/config': 'off',
'@typescript-eslint/no-var-requires': 'off'
}
},
{
files: ['*.js'],
rules: {
'@typescript-eslint/tslint/config': 'off',
'@typescript-eslint/no-var-requires': 'off'
}
},
{
files: ['*.tsx'],
rules: {
'react/prop-types': 'off',
'member-access': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off'
}
}
],
plugins: ['@typescript-eslint', 'jest', 'promise', 'import', 'unicorn'],
settings: {
'import/core-modules': ['electron'],
'import/resolver': {
'babel-module': {
root: ['.'],
alias: aliases,
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
}
}
};