-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
40 lines (39 loc) · 1.02 KB
/
.eslintrc.js
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
const airBnbBase = require('eslint-config-airbnb-base/rules/style')
const noRestrictedSyntaxSelectors = airBnbBase.rules['no-restricted-syntax']
.filter(({selector}) => selector && selector !== 'ForInStatement' && selector !== 'ForOfStatement');
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir : __dirname,
sourceType: 'module',
},
plugins: ['import'],
extends: [
'airbnb-base',
'airbnb-typescript/base',
],
rules: {
'no-underscore-dangle': 'warn',
'import/prefer-default-export': 'warn',
'import/no-cycle': 'warn',
'class-methods-use-this': 'off',
'max-len': ['error', 120],
'no-restricted-syntax': ['error', ...noRestrictedSyntaxSelectors],
'implicit-arrow-linebreak': ['warn', 'below'],
},
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
overrides: [
{
files: ['**/*.spec.ts'],
rules: {
'max-classes-per-file': 0,
},
},
],
};