-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
51 lines (50 loc) · 1.14 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
/*
* SPDX-FileCopyrightText: 2022 Zextras <https://www.zextras.com>
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
module.exports = {
extends: ['./node_modules/@zextras/carbonio-ui-configs/rules/eslint.js'],
plugins: ['import', 'notice'],
rules: {
camelcase: 'off',
'no-console': 'off',
eqeqeq: ['error', 'smart'],
'react/jsx-wrap-multilines': 'warn',
'@typescript-eslint/no-shadow': ['off'],
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'react/jsx-no-useless-fragment': 'error',
'import/no-cycle': 'off',
'no-nested-ternary': 'warn',
'class-methods-use-this': 'off',
'notice/notice': [
'error',
{
templateFile: './notice.template.ts'
}
],
'sonarjs/cognitive-complexity': 'warn',
'@typescript-eslint/no-explicit-any': 'warn'
},
overrides: [
{
files: [
'**/__tests__/**/*.[jt]s?(x)',
'**/?(*.)+(spec|test).[jt]s?(x)',
'**/utils/test-utils.tsx',
'jest-setup.ts'
],
rules: {
'testing-library/no-node-access': 'off',
'jest-dom/prefer-in-document': 'off',
'import/no-extraneous-dependencies': 'off'
}
}
],
ignorePatterns: ['notice.template.ts']
};