-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
60 lines (50 loc) · 1.78 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
module.exports = {
root: true,
env: {
es2020: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:tailwindcss/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'plugin:prettier-vue/recommended',
],
plugins: ['simple-import-sort', 'tailwindcss'],
parserOptions: {
ecmaVersion: 2020,
parser: '@typescript-eslint/parser',
},
rules: {
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'tailwindcss/no-custom-classname': 'off',
// Require passing prop names in camelCase
'vue/attribute-hyphenation': ['error', 'never'],
// Inserting html is a potential XSS risk. Consider disabling this rule case-by-case basis
'vue/no-v-html': 'off',
// Our component names are already written in PascalCase.
// And for consistency, it's now required too.
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
// Vue recommends multi word component names, so they don't get mixed with
// regular html elements, but many component's names are already single
// word, so had to turn this off.
'vue/multi-word-component-names': 'off',
// Event names are written in kebab-case, as it's in plugin:vue/vue3-recommended.
// This just turns the autofix option on.
'vue/v-on-event-hyphenation': [
'error',
'always',
{
autofix: true,
},
],
// Typescript forces to check optional props for "undefined" values anyway, so this rule is not needed
'vue/require-default-prop': 'off',
},
};