-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path.eslintrc.cjs
61 lines (60 loc) · 1.5 KB
/
.eslintrc.cjs
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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:cypress/recommended',
'plugin:vue/vue3-recommended',
'@vue/airbnb',
],
globals: {
ENV: true, // defined in vite.config.js
},
ignorePatterns: ['dist'],
overrides: [
{
files: ['*.html'],
parser: '@html-eslint/parser',
extends: ['plugin:@html-eslint/recommended'],
},
],
parserOptions: {
ecmaVersion: 'latest',
},
plugins: [
'@html-eslint',
'html',
],
rules: {
'@html-eslint/indent': ['error', 'tab', {
tagChildrenIndent: { html: 0 },
}],
'@html-eslint/require-closing-tags': ['error', {
selfClosingCustomPatterns: ['html'],
}],
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['tests/unit/index.js'],
}],
indent: ['error', 'tab', { SwitchCase: 1 }],
'no-continue': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-tabs': 'off',
'object-curly-newline': ['error', {
ImportDeclaration: { multiline: true },
}],
'vue/attribute-hyphenation': ['error', 'never'],
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
registeredComponentsOnly: false,
}],
'vue/html-indent': ['error', 'tab'],
'vue/max-len': ['error', 120],
'vue/no-v-html': 'off',
},
settings: {
'import/resolver': {
typescript: {}, // load <rootdir>/tsconfig.json to eslint, required for @iiif/parser
},
},
};