-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.eslintrc.cjs
74 lines (74 loc) · 2.02 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
62
63
64
65
66
67
68
69
70
71
72
73
74
module.exports = {
root: true,
env: {
node: true,
jest: true,
},
extends: [
/*
Provides Airbnb's base JS .eslintrc as an extensible shared config.
https://github.com/airbnb/javascript
*/
'airbnb-base',
/*
Use the recommended rule preset for `eslint-plugin-vue`.
https://eslint.vuejs.org/rules/
*/
'plugin:vue/vue3-recommended',
/*
Use as the last extension in order to override conflicting ESLint rules.
https://github.com/prettier/eslint-plugin-prettier
*/
'plugin:prettier/recommended',
],
plugins: [
/*
Official ESLint plugin for Vue.js. Allows us to check the `<template>` and
`<script>` of `.vue` files with ESLint, as well as Vue code in `.js` files.
https://eslint.vuejs.org
*/
'vue',
/*
Enable `eslint-plugin-prettier`, which sets the `prettier/prettier`
rule to "error". Prevents code formatting conflicts between rules
from ESLint and Prettier.
https://github.com/prettier/eslint-plugin-prettier
*/
'prettier',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-param-reassign': 'off',
'vue/no-v-html': 'off',
'no-use-before-define': 'off',
// TODO: Re-enable and lint this rule separately.
'vue/multi-word-component-names': 'off',
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
registeredComponentsOnly: true,
ignores: [],
},
],
'vue/v-on-event-hyphenation': ['warn', 'always', { ignore: ['onClick'] }],
'vue/require-explicit-emits': 'off',
'func-names': 'off',
'no-restricted-syntax': 'off',
'import/extensions': [0, 'never'],
'prefer-destructuring': 'off',
'no-underscore-dangle': 'off',
curly: ['error', 'all'],
},
parserOptions: {
parser: '@babel/eslint-parser',
},
settings: {
'import/resolver': {
alias: {
map: [['@', './src']],
},
},
},
};