-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
49 lines (49 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parser: 'vue-eslint-parser',
// https://github.com/yoyoys/eslint-config-vue-typescript-prettier-airbnb/blob/master/index.js
extends: [
'plugin:vue/essential',
'@vue/prettier',
'@vue/airbnb',
'@vue/typescript',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json'],
parser: '@typescript-eslint/parser',
},
plugins: [],
// add your custom rules here
rules: {
'prettier/prettier': [
'warn',
{
printWidth: 100,
singleQuote: true,
trailingComma: 'all',
},
],
// https://github.com/typescript-eslint/typescript-eslint/issues/2483
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'import/no-extraneous-dependencies': 'off',
},
settings: {
// resolve import/no-unresolved when importing .ts files without writing
// extension. In general we should not import typescript with extensions
// https://stackoverflow.com/questions/58159144/vue-sfc-import-typescript-file-throws-an-import-path-cannot-end-with-a-ts-ex
// https://stackoverflow.com/questions/59265981/typescript-eslint-missing-file-extension-ts-import-extensions
'import/resolver': {
node: {
extensions: ['.ts'],
},
},
},
};