forked from tektoncd/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
104 lines (104 loc) · 2.94 KB
/
.eslintrc.cjs
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
Copyright 2019-2023 The Tekton Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'airbnb',
'plugin:prettier/recommended',
'plugin:cypress/recommended',
'plugin:storybook/recommended'
],
globals: {
afterAll: true,
Atomics: 'readonly',
beforeAll: true,
globalThis: false,
SharedArrayBuffer: 'readonly',
vi: true
},
overrides: [
{
files: ['*.cy.js'],
rules: {
'func-names': 'off'
}
}
],
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2021,
sourceType: 'module'
},
plugins: ['notice', 'react', 'formatjs'],
rules: {
curly: ['error', 'all'],
'cypress/assertion-before-screenshot': 'warn',
'default-param-last': 'off',
'formatjs/enforce-default-message': 'error',
'formatjs/enforce-id': 'error',
'formatjs/no-complex-selectors': 'error',
'formatjs/no-literal-string-in-jsx': 'error',
'formatjs/no-multiple-whitespaces': 'error',
'formatjs/no-multiple-plurals': 'error',
'import/named': 'off',
'import/no-cycle': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'import/prefer-default-export': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'no-case-declarations': 'off',
'no-restricted-exports': 'off',
'no-template-curly-in-string': 'off',
'no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
vars: 'all'
}
],
'notice/notice': [
'error',
{
templateFile: 'config_frontend/copyright.txt',
nonMatchingTolerance: 0.95
}
],
'react/destructuring-assignment': 'off',
'react/forbid-prop-types': 'off',
'react/function-component-definition': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-no-bind': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-unstable-nested-components': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off', // defaultProps for functional components deprecated in react 18.3.0, to be removed in a future release
'react/state-in-constructor': 'off',
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true
}
]
}
};