forked from ava-labs/avalanchejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
34 lines (34 loc) · 1.14 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
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parser: '@typescript-eslint/parser',
settings: {},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
// TODO: Why does uncommenting this remove the type imports?
// project: ['./tsconfig.json'],
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'error',
// Uncomment prefer-readonly and parserOptions.project to apply the rule.
// TODO: Uncomment both permanently after fixing the type import issue.
// '@typescript-eslint/prefer-readonly': 'error',
},
};