-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.js
executable file
·73 lines (69 loc) · 1.84 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
module.exports = {
root: true,
extends: ['alloy', 'alloy/typescript', 'plugin:vue/vue3-recommended', 'plugin:vuejs-accessibility/recommended'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
sourceType: 'module',
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
rules: {
'vue/html-indent': ['warn', 2],
// to fix windicss scanning in cases like `:class="{ invisible: true }"`
'vue/quote-props': ['warn', 'always'],
// make possible `/// <reference...`
'spaced-comment': ['error', 'always', { markers: ['/'] }],
},
overrides: [
{
files: ['**/cypress/**/*.{j,t}s', '**/*.cy.{js,ts}', 'cypress.config.ts'],
plugins: ['cypress'],
extends: ['plugin:cypress/recommended'],
env: {
'cypress/globals': true,
},
},
{
files: ['**/packages/ui/**/*.{ts,vue,js}'],
extends: ['./packages/ui/.eslintrc-auto-import.json'],
},
{
files: ['**/*.spec.{js,ts}'],
env: {
jest: true,
},
},
// It is OK to define a lot of components in stories or tests
{
files: ['**/packages/ui/stories/**/*.stories.ts', '**/*.cy.{js,ts}'],
rules: {
'vue/one-component-per-file': 'off',
},
},
{
files: ['**/*.spec.ts', '**/*.spec.cy.ts'],
rules: {
'max-nested-callbacks': 'off',
},
},
// FIXME - temporary disables to fix them in a different PRs
{
files: ['**/ui/src/components/Select/**/*.vue'],
rules: {
'vuejs-accessibility/click-events-have-key-events': 'off',
},
},
{
files: ['**/STextField.vue', '**/SSwitch.vue'],
rules: {
'vuejs-accessibility/label-has-for': 'off',
},
},
],
}