-
Notifications
You must be signed in to change notification settings - Fork 111
/
.eslintrc.js
56 lines (56 loc) · 1.62 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 = {
extends: ['@grafana/eslint-config'],
root: true,
plugins: ['@emotion', 'lodash', 'jest', 'import', 'jsx-a11y'],
globals: {
page: true,
__COMMIT_HASH__: 'readonly',
},
rules: {
eqeqeq: 'off',
'react/prop-types': 'off',
// need to ignore emotion's `css` prop, see https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options
// 'react/no-unknown-property': ['error', { ignore: ['css'] }],
// 'import/order': [
// 'error',
// {
// groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'],
// 'newlines-between': 'always',
// alphabetize: { order: 'asc' },
// },
// ],
'import/order': 'off',
'react/jsx-key': 'off',
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'react-redux',
importNames: ['useDispatch', 'useSelector'],
message: 'Please import from app/types instead.',
},
{
name: 'react-i18next',
importNames: ['Trans', 't'],
message: 'Please import from app/core/internationalization instead',
},
],
},
],
'no-duplicate-imports': 'off',
"import/no-duplicates": "warn",
'react/no-deprecated': 'off',
'react/no-unknown-property': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/array-type': 'off',
},
overrides: [
{
files: ['packages/velaux-ui/src/utils/common.ts'],
rules: {
'no-redeclare': 'off',
},
},
],
};