forked from gelatodigital/web3-functions-hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
36 lines (35 loc) · 1.18 KB
/
.eslintrc.cjs
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
/* eslint-env node */
module.exports = {
root: true,
env: { es2020: true },
extends: ['typestrict'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: true,
tsconfigRootDir: __dirname,
},
plugins: ['simple-import-sort', 'unused-imports', 'import'],
rules: {
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowDirectConstAssertionInArrowFunctions: true,
},
],
'@typescript-eslint/no-useless-constructor': 'error',
// this rule can't find automatically mistakes and needs to be guided
'import/no-internal-modules': ['error', { forbid: ['**/abis/*'] }],
'import/no-useless-path-segments': ['error', { noUselessIndex: true }],
'no-console': 'error',
'no-debugger': 'error',
'no-with': 'error',
'one-var': ['error', { initialized: 'never' }],
'prefer-const': ['error', { destructuring: 'all' }],
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'unused-imports/no-unused-imports-ts': 'error',
},
}