4 Star 26 Fork 4

陈随易/yipack-cli

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 3.29 KB
一键复制 编辑 原始数据 按行查看 历史
陈随易 提交于 2021-03-04 14:11 . fix: 整体结构大调整
let path = require('path');
let myConfig = require('./.yipack/webpack.config.my.js');
module.exports = {
// 找到当前目录就不往上找了
root: true,
parser: 'vue-eslint-parser',
env: {
es6: true,
browser: true,
node: true,
es2017: false
},
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 2016,
sourceType: 'module',
// 指定babel的参数 https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser#additional-parser-configuration
babelOptions: {
configFile: path.join(myConfig.cliDir, 'babel.config.js')
}
},
plugins: [
//
'@babel/eslint-plugin',
'eslint-plugin-vue',
'eslint-plugin-prettier'
],
extends: [
//
'plugin:vue/recommended',
'eslint:recommended',
'plugin:prettier/recommended'
],
rules: {
'prettier/prettier': [
'warn',
{
printWidth: 80,
singleQuote: true,
semi: true,
tabWidth: 4,
trailingComma: 'none',
bracketSpacing: true
},
{
usePrettierrc: false
}
],
'no-unused-vars': 'off',
'no-var': 'warn',
eqeqeq: 'warn',
'vue/component-tags-order': [
'warn',
{
order: ['template', 'script', 'style']
}
],
'vue/html-end-tags': 'warn',
'vue/html-self-closing': [
'warn',
{
html: {
void: 'never',
normal: 'never',
component: 'never'
},
svg: 'never',
math: 'never'
}
],
'vue/prop-name-casing': ['warn', 'camelCase'],
'vue/require-default-prop': 'warn',
'vue/order-in-components': [
'warn',
{
order: [
//
'el',
'name',
'key',
'parent',
'functional',
'delimiters',
'comments',
'components',
'directives',
'filters',
'extends',
'mixins',
'provide',
'inject',
'ROUTER_GUARDS',
'layout',
'middleware',
'validate',
'scrollToTop',
'transition',
'loading',
'inheritAttrs',
'model',
'props',
'propsData',
'emits',
'setup',
'asyncData',
'data',
'fetch',
'head',
'computed',
'watch',
'watchQuery',
'LIFECYCLE_HOOKS',
'methods',
'template',
'render',
'renderError'
]
}
]
}
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
NodeJS
1
https://gitee.com/chenbimo/yipack-cli.git
git@gitee.com:chenbimo/yipack-cli.git
chenbimo
yipack-cli
yipack-cli
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385