This repository has been archived by the owner on Sep 29, 2022. It is now read-only.
generated from alexk111/node-red-node-typescript-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (55 loc) · 1.89 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
48
49
50
51
52
53
54
55
56
module.exports = {
env: {
node: true,
jest: true,
es6: true,
},
extends: ['eslint:recommended', 'prettier'],
parser: '@typescript-eslint/parser',
plugins: ['jest', 'no-only-tests', 'prettier'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
rules: {
'no-shadow': 'error',
'sort-imports': 'error',
'no-only-tests/no-only-tests': 'error',
'no-console': 'error',
'prettier/prettier': 'error',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parserOptions: {
project: './tsconfig.json',
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
rules: {
'no-shadow': 'off',
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
},
],
// note you must disable the base rule as it can report incorrect errors
'init-declarations': 'off',
'@typescript-eslint/init-declarations': ['error', 'always'],
},
},
],
};