-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.cjs
51 lines (50 loc) · 1.25 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
const eslintExtends = [
'airbnb-typescript/base',
];
const parser = '@typescript-eslint/parser';
const parserOptions = {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './tsconfig.lint.json'],
};
const plugins = [
'@typescript-eslint',
];
const root = true;
const rules = {
'@typescript-eslint/lines-between-class-members': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
format: ['camelCase', 'PascalCase'],
leadingUnderscore: 'allow',
selector: ['variable'],
},
],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/quotes': [
'error',
'single',
{ allowTemplateLiterals: true, avoidEscape: true },
],
'arrow-parens': ['error', 'as-needed'],
'import/export': 'off',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'lines-between-class-members': 'off',
'no-console': 'off',
'no-control-regex': 'off',
'object-curly-newline': ['error', { consistent: true }],
'spaced-comment': ['error', 'always', { block: { exceptions: ['*'] } }],
'wrap-iife': ['error', 'inside'],
};
module.exports = {
parser,
parserOptions,
plugins,
root,
rules,
extends: eslintExtends,
};