-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
99 lines (87 loc) · 2.58 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// .eslintrc.js
module.exports = {
root: true,
env: {
node: true
},
extends: [
"plugin:vue/recommended",
//"plugin:prettier-vue/recommended",
// Do not add `'prettier/vue'` if you don't want to use prettier for `<template>` blocks
//"prettier/vue",
"plugin:prettier/recommended",
"prettier"
],
settings: {
"prettier/prettier": {
// Settings for how to process Vue SFC Blocks
SFCBlocks: {
/**
* Use prettier to process `<template>` blocks or not
*
* If set to `false`, remember not to `extends: ['prettier/vue']`, as you need the rules from `eslint-plugin-vue` to lint `<template>` blocks
*
* @default true
*/
template: true,
/**
* Use prettier to process `<script>` blocks or not
*
* @default true
*/
script: true,
/**
* Use prettier to process `<style>` blocks or not
*
* @default true
*/
style: true,
// Settings for how to process custom blocks
customBlocks: {
// Treat the `<docs>` block as a `.markdown` file
docs: { lang: "markdown" },
// Treat the `<config>` block as a `.json` file
config: { lang: "json" },
// Treat the `<module>` block as a `.js` file
module: { lang: "js" },
// Ignore `<comments>` block (omit it or set it to `false` to ignore the block)
comments: false
// Other custom blocks that are not listed here will be ignored
}
},
// Use prettierrc for prettier options or not (default: `true`)
usePrettierrc: true,
// Set the options for `prettier.getFileInfo`.
// @see https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath-options
fileInfoOptions: {
// Path to ignore file (default: `'.prettierignore'`)
// Notice that the ignore file is only used for this plugin
ignorePath: ".testignore",
// Process the files in `node_modules` or not (default: `false`)
withNodeModules: false
}
}
},
rules: {
"prettier/prettier": [
"error",
{
// Override all options of `prettier` here
// @see https://prettier.io/docs/en/options.html
semi: false,
singleQuote: true,
tabWidth: 2,
useTabs: false,
trailingComma: "es5",
arrowParens: "always"
}
],
"vue/multi-word-component-names": 0
}
// globals: {
// $nuxt: true
// }
// parserOptions: {
// parser: "babel-eslint"
// }
}