forked from ethereumjs/ethereumjs-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.js
123 lines (123 loc) · 3.54 KB
/
eslint.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'github',
'implicit-dependencies',
'import',
'prettier',
'simple-import-sort',
],
env: {
es2020: true,
node: true,
},
ignorePatterns: [
'.eslintrc.js',
'benchmarks',
'coverage',
'dist',
'examples',
'karma.conf.js',
'node_modules',
'prettier.config.js',
'recipes',
'scripts',
'typedoc.js',
'webpack.config.js',
],
extends: [
'typestrict',
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-use-before-define': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase', 'camelCase'],
custom: {
regex: '^I[A-Z]',
match: false,
},
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-redeclare': ['error'],
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/strict-boolean-expressions': ['error'],
eqeqeq: 'error',
'github/array-foreach': 'error',
'implicit-dependencies/no-implicit': ['error', { peer: true, dev: true, optional: true }],
'import/default': 'error',
'import/export': 'error',
'import/exports-last': 'off', // TODO: set to `warn` for fixing and then `error`
'import/extensions': 'off',
'import/first': 'error',
'import/group-exports': 'off',
'import/named': 'error',
'import/namespace': 'error',
'import/no-absolute-path': 'error',
'import/no-anonymous-default-export': 'error',
'import/no-cycle': 'off', // TODO: set to `warn` for fixing and then `error`
'import/no-default-export': ['error'],
'import/no-deprecated': 'off', // TODO: set to `warn` for fixing and then `error`
'import/no-duplicates': 'error',
'import/no-dynamic-require': 'off',
'import/no-extraneous-dependencies': 'error',
'import/no-mutable-exports': 'error',
'import/no-namespace': 'off',
'import/no-self-import': 'error',
'import/no-unresolved': 'off',
'import/no-unused-modules': 'error',
'import/no-useless-path-segments': 'error',
'import/no-webpack-loader-syntax': 'error',
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
},
groups: ['object', ['builtin', 'external'], 'parent', 'sibling', 'index', 'type'],
'newlines-between': 'always',
},
],
'no-console': 'warn',
'no-debugger': 'error',
'no-dupe-class-members': 'off',
'no-extra-semi': 'off',
'no-redeclare': 'off',
'no-unused-vars': 'off',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-const': 'error',
'prettier/prettier': 'error',
'simple-import-sort/exports': 'error',
'sort-imports': ['error', { ignoreDeclarationSort: true }],
},
parserOptions: {
extraFileExtensions: ['.json'],
sourceType: 'module',
project: './tsconfig.json',
},
overrides: [
{
files: ['test/**/*.ts', 'tests/**/*.ts'],
rules: {
'implicit-dependencies/no-implicit': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
],
}