-
Notifications
You must be signed in to change notification settings - Fork 37
/
eslint.config.mjs
48 lines (43 loc) · 1.46 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
import eslintKongUiConfig from '@kong/eslint-config-kong-ui'
import pluginVueA11y from 'eslint-plugin-vuejs-accessibility'
import playwright from 'eslint-plugin-playwright'
import kongponentsUtilityClasses from './kongponent-utility-classes.js'
export default [
...eslintKongUiConfig,
...pluginVueA11y.configs['flat/recommended'],
{
files: ['**/*.js', '**/*.vue', '**/*.ts'],
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '_',
},
],
// Vue
'vue/attributes-order': 'off',
'vue/no-restricted-class': ['error', '/^k-/', ...kongponentsUtilityClasses],
// a11y
'vuejs-accessibility/label-has-for': 'off',
'vuejs-accessibility/no-autofocus': 'off',
'vuejs-accessibility/form-control-has-label': 'off',
'vuejs-accessibility/click-events-have-key-events': 'off',
'vuejs-accessibility/mouse-events-have-key-events': 'off',
'vuejs-accessibility/no-static-element-interactions': 'off',
},
},
// e2e tests
{
...playwright.configs['flat/recommended'],
files: ['tests/playwright/**'],
rules: {
'playwright/missing-playwright-await': 'error',
'playwright/no-page-pause': 'error',
'playwright/prefer-to-have-length': 'error',
'playwright/valid-expect': 'error',
'playwright/no-skipped-test': 'off',
'playwright/no-force-option': 'off',
'playwright/no-wait-for-timeout': 'off',
},
},
]