-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
75 lines (75 loc) · 2.95 KB
/
Copy path.eslintrc.cjs
File metadata and controls
75 lines (75 loc) · 2.95 KB
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
74
75
module.exports = {
env: {
browser: true,
es2021: true,
webextensions: true,
node: true,
},
extends: ['plugin:vue/recommended', 'airbnb-base', 'plugin:jsdoc/recommended', 'plugin:vuejs-accessibility/recommended'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['vue', 'import', 'jsdoc', 'vuejs-accessibility'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'max-len': 'off',
'vue/no-v-model-argument': 'off',
'no-plusplus': 'off',
'no-continue': 'off',
'class-methods-use-this': 'off',
'no-unused-expressions': 'off',
'object-curly-newline': 'off',
'no-new': 'off',
'no-bitwise': 'off',
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'no-use-before-define': ['error', { functions: false }],
'no-param-reassign': ['error', { props: false }],
'import/no-unresolved': ['error', { ignore: ['^~icons/', '^floating-vue', '^floating-vue/dist/style', '^floating-vue/style', '\\.css$', '\\.scss$', '\\.sass$'] }],
'import/extensions': ['error', { ignore: ['^~icons/', '^floating-vue', '^floating-vue/dist/style', '^floating-vue/style', '\\.css$', '\\.scss$', '\\.sass$'] }],
// JSDoc rules
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-returns': 'off',
'no-await-in-loop': 'off',
// Accessibility rules
'vuejs-accessibility/alt-text': 'error',
'vuejs-accessibility/anchor-has-content': 'error',
'vuejs-accessibility/aria-props': 'error',
'vuejs-accessibility/aria-unsupported-elements': 'error',
'vuejs-accessibility/click-events-have-key-events': 'error',
'vuejs-accessibility/heading-has-content': 'error',
'vuejs-accessibility/iframe-has-title': 'error',
'vuejs-accessibility/interactive-supports-focus': 'error',
'vuejs-accessibility/label-has-for': 'error',
'vuejs-accessibility/media-has-caption': 'warn',
'vuejs-accessibility/mouse-events-have-key-events': 'error',
'vuejs-accessibility/no-access-key': 'error',
'vuejs-accessibility/no-autofocus': 'error',
'vuejs-accessibility/no-distracting-elements': 'error',
'vuejs-accessibility/no-redundant-roles': 'error',
'vuejs-accessibility/role-has-required-aria-props': 'error',
'vuejs-accessibility/tabindex-no-positive': 'error',
'vuejs-accessibility/no-static-element-interactions': 'error',
'vuejs-accessibility/form-control-has-label': 'error',
},
settings: {
'import/resolver': {
alias: {
map: [['@', './src']],
extensions: ['.ts', '.js', '.jsx', '.tsx', '.json'],
},
},
'import/ignore': [
],
},
ignorePatterns: ['vite.config.js', 'vite.config.firefox.js', 'src/ext/browser/app.js'],
};