Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 09409ea

Browse files
committed
Migrate eslint rules/deps to use ethjs monorepo current
1 parent 61cdfbd commit 09409ea

File tree

6 files changed

+705
-581
lines changed

6 files changed

+705
-581
lines changed

.eslintrc.js

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,53 @@
11
module.exports = {
2-
extends: '@ethereumjs/eslint-config-defaults',
3-
parserOptions: {
4-
project: ['./tsconfig.json'],
5-
},
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint', 'implicit-dependencies', 'import', 'prettier'],
64
env: {
7-
mocha: true,
5+
es2020: true,
6+
node: true,
7+
mocha: true
88
},
9+
ignorePatterns: [
10+
'node_modules/',
11+
'dist/',
12+
'coverage/',
13+
'prettier.config.js',
14+
'typedoc.js',
15+
'karma.conf.js',
16+
],
17+
extends: ['typestrict', 'eslint:recommended'],
918
rules: {
10-
'no-constant-condition': 'off',
11-
'@typescript-eslint/no-use-before-define': 'off',
19+
'no-console': 'warn',
20+
'no-debugger': 'error',
21+
'prefer-const': 'error',
22+
'no-var': 'error',
23+
'no-constant-condition': 'warn',
24+
'implicit-dependencies/no-implicit': ['error', { peer: true, dev: true, optional: true }],
25+
'@typescript-eslint/prefer-nullish-coalescing': 'error',
26+
'@typescript-eslint/no-use-before-define': 'warn',
27+
'@typescript-eslint/naming-convention': [
28+
'error',
29+
{
30+
selector: 'interface',
31+
format: ['PascalCase', 'camelCase'],
32+
custom: {
33+
regex: '^I[A-Z]',
34+
match: false,
35+
},
36+
},
37+
],
38+
'no-unused-vars': 'off',
39+
'@typescript-eslint/no-unused-vars': [
40+
'error',
41+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
42+
],
1243
'@typescript-eslint/no-unnecessary-condition': 'off',
44+
'no-dupe-class-members': 'off',
45+
'no-extra-semi': 'off',
46+
'prettier/prettier': 'error',
47+
'no-redeclare': 'off',
48+
'@typescript-eslint/no-redeclare': ['error'],
49+
'@typescript-eslint/restrict-plus-operands': 'off',
50+
'import/no-default-export' : 'off'
1351
},
1452
overrides: [
1553
{
@@ -21,4 +59,9 @@ module.exports = {
2159
},
2260
},
2361
],
62+
parserOptions: {
63+
sourceType: 'module',
64+
project: './tsconfig.json',
65+
},
2466
}
67+

0 commit comments

Comments
 (0)