-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
55 lines (52 loc) · 1.44 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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-airbnb-with-typescript',
'@vue/eslint-config-prettier/skip-formatting',
],
rules: {
'max-classes-per-file': ['error', 2],
// Use trailing slash to indicate param reassignment.
'no-param-reassign': [
'error',
{ props: true, ignorePropertyModificationsForRegex: ['_$'] },
],
// Since this is a static site, nearly all dependencies are dev dependencies.
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
// Named exports are more consistent that default.
'import/prefer-default-export': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
},
overrides: [
{
// JS files should be excluded from type-checking.
files: ['*.js'],
parserOptions: {
project: null,
},
},
{
files: ['*.vue'],
rules: {
// Lots of components have short single-word names. It's fine.
'vue/multi-word-component-names': 'off',
},
},
{
files: ['components.d.ts'],
rules: {
// Autogenerated file imports '@vue/runtime-core'.
'import/no-extraneous-dependencies': 'off',
},
},
],
settings: {
'import/core-modules': [
'vue', // Vue comes with îles.
],
},
}