-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
47 lines (39 loc) · 1.44 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
47
module.exports = {
root: true,
parserOptions: {
parser: '@typescript-eslint/parser',
project: './tsconfig.json',
sourceType: 'module',
},
env: {
node: true,
},
// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
'eslint:recommended',
// ESLint typescript rules
// See https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
// Usage with Prettier, provided by 'eslint-config-prettier'.
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage-with-prettier
'prettier',
],
plugins: [
// Required to apply rules which need type information
'@typescript-eslint',
// Prettier has not been included as plugin to avoid performance impact
// See https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Add it as an extension for your IDE
],
// add your custom rules here
rules: {
'prefer-promise-reject-errors': 'off',
quotes: ['warn', 'single'],
// allow console.log during development only
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
};