-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
48 lines (44 loc) · 1.54 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
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'eslint:recommended',
'airbnb-base', // includes plugin:import
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript/recommended',
'plugin:import/typescript',
],
rules: {
semi: ['error', 'never', { beforeStatementContinuationChars: 'always' }],
'import/extensions': ['error', 'ignorePackages', { js: 'never', ts: 'never' }], // https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/imports.js#L139
'import/no-extraneous-dependencies': ['error', { devDependencies: ['.eslintrc.js', 'vite.config.ts'] }],
},
overrides: [
{
files: ['*.vue'],
rules: {
'max-len': 'off',
indent: 'off', // Replaced by vue/script-indent
'vue/block-lang': ['error', { script: { lang: 'ts' } }],
'vue/html-closing-bracket-newline': ['error', { singleline: 'never', multiline: 'never' }],
'vue/no-deprecated-slot-attribute': 'off', // Ionic uses Web Component slots
'vue/multi-word-component-names': 'off',
'vue/script-indent': ['error', 2, { baseIndent: 1, switchCase: 1 }],
},
},
{
files: ['*.ts'],
rules: {
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
'no-param-reassign': 'off', // TODO
'import/prefer-default-export': 'off',
},
},
],
settings: {
'import/resolver': { typescript: {} },
},
}