-
Notifications
You must be signed in to change notification settings - Fork 18
/
.eslintrc.cjs
43 lines (43 loc) · 1.74 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
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020, // allows for the parsing of modern ECMAScript features
sourceType: 'module', // allows for the use of imports
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
rules: {
quotes: ['error', 'single', { avoidEscape: true }],
'no-return-await': 'off',
'no-unused-vars': 'off',
'import/no-extraneous-dependencies': 'off', // ['error', { devDependencies: true }],
'import/no-mutable-exports': 'off',
'import/order': [
'error',
{
groups: [
['builtin', 'external', 'internal'],
['parent', 'sibling', 'index'],
],
'newlines-between': 'always',
},
],
'no-labels': 'off',
'no-restricted-syntax': 'off',
'no-nested-ternary': 'off',
'@typescript-eslint/return-await': 'off', // we want ['error', 'in-try-catch'] but if we enable it we get false positives
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-redeclare': 'off', // we should enable this in future and fix all the reported issues
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 1,
},
plugins: ['@typescript-eslint', 'import'],
extends: [
'airbnb-base',
'airbnb-typescript/base', // uses rules from AirBnb codestyle
'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.
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
],
};