forked from animo/paradym-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
85 lines (85 loc) · 2.06 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
module.exports = {
extends: [
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
settings: {
react: {
version: 'detect',
},
'import/extensions': ['.js', '.ts', '.tsx', 'jsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
project: ['./tsconfig.json', 'packages/*/tsconfig.json', 'apps/*/tsconfig.json'],
alwaysTryTypes: true,
},
},
},
rules: {
'react/react-in-jsx-scope': 'off', // included by default
'react/no-unescaped-entities': 'off',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-console': 'error',
'no-void': [
'error',
{
allowAsStatement: true,
},
],
// @typescript-eslint adds a type-aware no-shadow rule
'no-shadow': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'import/no-cycle': 'error',
'react/prop-types': 'off',
'react/display-name': 'off',
'react/jsx-curly-brace-presence': [
'error',
{
props: 'never',
children: 'never',
},
],
'import/order': [
'error',
{
groups: ['type', ['builtin', 'external'], 'parent', 'sibling', 'index'],
alphabetize: {
order: 'asc',
},
pathGroups: [
{
pattern: '@internal',
group: 'parent',
position: 'before',
},
],
'newlines-between': 'always',
},
],
},
globals: {
require: true,
},
overrides: [
{
files: ['.eslintrc.js', '*.config.js'],
env: {
node: true,
},
},
],
}