-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
34 lines (33 loc) · 1.14 KB
/
.eslintrc.js
File metadata and controls
34 lines (33 loc) · 1.14 KB
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
// // http://eslint.org/docs/user-guide/configuring
// // http://eslint.cn/docs/user-guide/configuring 中文,注意版本是否和官网一致
// module.exports = {
// env: { //指定代码的运行环境
// browser: true, //如果你的代码是运行在浏览器环境
// node: true // 让 ESLint 识别 Node.js 语法(包括 module、require 等)
// },
// extends: [
// ],
// rules: {}
// };
// // http://eslint.org/docs/user-guide/configuring
// // http://eslint.cn/docs/user-guide/configuring 中文,注意版本是否和官网一致
module.exports = {
env: {
//指定代码的运行环境
browser: true, //如果你的代码是运行在浏览器环境
node: true // 让 ESLint 识别 Node.js 语法(包括 module、require 等)
},
extends: [
'plugin:vue/essential', // 'plugin:prettier/recommended', // 启用 eslint-plugin-prettier
'eslint:recommended' //默认使用recommended规则,https://eslint.org/docs/latest/rules/
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
plugins: [
'vue' // 添加 vue 插件
],
rules: {}
};