-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy patheslint.config.mjs
50 lines (49 loc) · 1.17 KB
/
eslint.config.mjs
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
import smarthr from 'eslint-config-smarthr'
import storybook from 'eslint-plugin-storybook'
/**
* @type {import('eslint').Linter.Config[]}
*/
export default [
...smarthr,
...storybook.configs['flat/recommended'],
{
rules: {
'jsx-a11y/anchor-is-valid': 'warn',
'jsx-a11y/click-events-have-key-events': 'warn',
'jsx-a11y/no-static-element-interactions': 'warn',
'jsx-a11y/label-has-associated-control': [
'error',
{
controlComponents: ['Input', 'InputWithTooltip'],
},
],
'@typescript-eslint/consistent-type-definitions': [
'error',
'type',
],
'smarthr/require-barrel-import': 'off',
'smarthr/a11y-anchor-has-href-attribute': [
'error',
{
checkType: 'allow-spread-attributes',
}
],
'smarthr/a11y-input-has-name-attribute': [
'error',
{
checkType: 'allow-spread-attributes',
}
],
},
},
{
ignores: [
'**/*.{mjs,js}',
'sandbox/',
'storybook-static/',
'packages/smarthr-ui/esm/',
'packages/smarthr-ui/lib/',
'packages/smarthr-ui/.storybook',
]
},
]