-
Notifications
You must be signed in to change notification settings - Fork 37
/
.eslintrc.cjs
53 lines (53 loc) · 1.75 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module.exports = {
env: {
es2021: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier'
],
overrides: [
{
env: {
node: true
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script'
}
}
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'simple-import-sort'],
rules: {
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'array-callback-return': 'error',
'no-template-curly-in-string': 'error',
'prefer-template': 'error',
'no-param-reassign': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'prefer-arrow-callback': 'error',
'no-var': 'error',
'@typescript-eslint/explicit-function-return-type': ['error'],
eqeqeq: 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_', // Ignore argument variables starting with _
varsIgnorePattern: '^_' // Ignore local variables starting with _
}
],
'@typescript-eslint/ban-ts-comment': 'off',
'prefer-const': 'off', // For azle let is used to indicate mutability not only re-assignability
'no-undef': 'off', // TS compiler handles this for us
'@typescript-eslint/no-explicit-any': 'off' // TODO https://github.com/demergent-labs/azle/issues/1737
}
};