-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
46 lines (46 loc) · 1.58 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
41
42
43
44
45
46
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'import', "jest-extended"],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'prettier',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', '**/*.spec.ts', '**/*.d.ts', '**/*.test.ts', '**/*.js'],
rules: {
'no-console': 'error',
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: '*', next: 'block-like' },
{ blankLine: 'always', prev: '*', next: 'block' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
{ blankLine: 'always', prev: 'block', next: '*' },
{ blankLine: 'always', prev: '*', next: 'if' },
{ blankLine: 'always', prev: 'if', next: '*' },
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: ['if', 'block', 'function', 'iife', 'expression'] },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
],
curly: ['error', 'all'],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'index'],
},
],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/array-type': ['error'],
},
};