You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
extends: [
'plugin:vue/essential',
'plugin:prettier/recommended'
// ,
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
// 'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
"prettier/prettier": [
"error", {
"printWidth": 80, // 每行代码长度默认80
"tabWidth": 2, // 每个tab相当于多少个空格默认2
"useTabs": false, // 是否使用tab进行缩进默认false推荐使用软tab即多个空格来替代tab
"semi": true, // 声明结尾使用分号(默认true)
"trailingComma": "all", // 多行使用拖尾逗号默认none
"bracketSpacing": true, // 对象字面量的大括号间使用空格默认true
"jsxBracketSameLine": true, // 多行JSX中的>放置在最后一行的结尾而不是另起一行默认false
"arrowParens": "avoid" // 只有一个参数的箭头函数的参数是否带圆括号默认avoid
}
],
}
}