forked from opossum-tool/OpossumUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
61 lines (60 loc) · 1.77 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
// SPDX-FileCopyrightText: Meta Platforms, Inc. and its affiliates
// SPDX-FileCopyrightText: TNG Technology Consulting GmbH <https://www.tngtech.com>
//
// SPDX-License-Identifier: Apache-2.0
module.exports = {
env: {
browser: true,
es6: true,
node: true,
jest: true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
project: ['tsconfig.json', 'src/ElectronBackend/tsconfig.json'],
},
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier',
'plugin:react-hooks/recommended',
'plugin:testing-library/react',
'plugin:jest-dom/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
plugins: ['react', 'prettier', 'testing-library', 'jest-dom', 'filenames'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 2,
'@typescript-eslint/no-unused-vars': 2,
'@typescript-eslint/explicit-function-return-type': 2,
'@typescript-eslint/await-thenable': 2,
'@typescript-eslint/require-await': 2,
'@typescript-eslint/no-magic-numbers': [
'error',
{ ignore: [-1, 0, 1, 2, 100] },
],
'@typescript-eslint/no-unnecessary-type-assertion': 2,
'object-shorthand': 2,
'react/prop-types': 'off',
'testing-library/no-node-access': 'off', // TODO: remove this line and fix warnings
'filenames/match-regex': [2, '^[a-zA-Z0-9\\-]+(.d|.test)?$', true],
quotes: [2, 'single', { avoidEscape: true }],
},
};