-
Notifications
You must be signed in to change notification settings - Fork 142
/
Copy patheslint.config.mjs
56 lines (55 loc) · 1.48 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
51
52
53
54
55
56
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': 'error',
'jsx-a11y/click-events-have-key-events': 'error',
'jsx-a11y/no-static-element-interactions': 'error',
'jsx-a11y/label-has-associated-control': [
'error',
{
controlComponents: ['Input', 'InputWithTooltip'],
},
],
'jsx-a11y/role-has-required-aria-props': 'error',
'jsx-a11y/mouse-events-have-key-events': 'error',
'jsx-a11y/no-noninteractive-element-interactions': 'error',
'@typescript-eslint/consistent-type-definitions': [
'error',
'type',
],
'react-hooks/exhaustive-deps': 'error',
'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',
}
],
'smarthr/a11y-prohibit-sectioning-content-in-form': 'error'
},
},
{
ignores: [
'**/*.{mjs,js}',
'**/*.stories.tsx',
'sandbox/',
'storybook-static/',
'packages/smarthr-ui/esm/',
'packages/smarthr-ui/lib/',
'packages/smarthr-ui/.storybook',
]
},
]