-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
82 lines (80 loc) · 2.15 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
module.exports = {
ignorePatterns: [
// 'smart-meter-mbus-dlms.js',
// '.eslintrc.js',
// 'webpack.config.js',
// 'babel.config.js'
'*.js',
'src/lib/cosem/cosem-asn2ts'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
// overrides: [
// {
//files: ['*.ts', '*.tsx'], // Your TypeScript files extension
// As mentioned in the comments, you should extend TypeScript plugins here,
// instead of extending them outside the `overrides`.
// If you don't want to extend any rules, you don't need an `extends` attribute.
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking'//,
//'plugin:import/typescript'
],
parserOptions: {
project: ['./tsconfig.json'] // Specify it only for TypeScript files
},
rules: {
'no-tabs': 0,
'no-mixed-spaces-and-tabs': 1,
indent: 'off',
'@typescript-eslint/indent': ['warn', 'tab'],
semi: 'off',
'@typescript-eslint/semi': 'warn',
'@typescript-eslint/strict-boolean-expressions': ['warn', {
allowNullableObject: true,
allowNullableString: true,
allowNullableNumber: true,
allowString: true,
allowNumber: true
}],
// I don't want to write 'if ( )' but "import { xy } from 'abc';" is standard. Stupid eslint - or stupid eslint doc.
'keyword-spacing': 'off',
'@typescript-eslint/keyword-spacing': ['off', { 'after': false }],
'@typescript-eslint/member-delimiter-style': [
'warn',
{
multiline: {
delimiter: 'semi',
requireLast: true
},
singleline: {
delimiter: 'semi',
requireLast: true
}
}
],
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'no-constant-condition': 'off',
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-unsafe-member-access': 'off',
},
// }
// ],
env: {
browser: false,
es2021: true,
node: true
},
// extends: 'standard-with-typescript',
// parserOptions: {
// ecmaVersion: 'latest',
// sourceType: 'module'
// },
// rules: {
// 'no-tabs': 0,
// 'no-mixed-spaces-and-tabs': 1,
// indent: ['error', 'tab']
// }
}