1 Star 6 Fork 1

残忍的小loli / uniapp+Vue3 + typescript + vite + pinia+ mock框架

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
lixu1995 提交于 2023-07-17 18:08 . feat: init
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'plugin:vue/essential',
'standard'
],
parserOptions: {
ecmaVersion: 13,
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
globals: {
/** 避免uni报错 */
uni: true,
UniApp: true,
defineEmits: true,
defineProps: true
},
plugins: [
'vue',
'@typescript-eslint'
],
rules: {
'no-tabs': 'off',
'import/first': 0,
'vue/multi-word-component-name': 'off',
quotes: ['error', 'single'],
// 'arrow-parens': 'off',
// 'arrow-body-style': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
camelcase: 'off',
'@typescript-eslint/camelcase': 0,
'space-before-function-paren': ['error', 'never'],
'no-unused-expressions': 'off',
'no-useless-constructor': 'off',
// html结束括号换号:关闭
'vue/html-closing-bracket-newline': [0, {
singleline: 'never',
multiline: 'always'
}],
// html缩进为两个空格
'vue/html-indent': ['error', 2, {
attribute: 1, // 属性缩进的乘数
baseIndent: 1, // 顶级语句的缩进倍数
closeBracket: 0, // 右括号缩进的乘数
alignAttributesVertically: true, // 在多行情况下,属性是否应与第一个属性垂直对齐的条件
ignores: [] // 忽略节点的选择器
}],
// html中引号强制使用双引号
'vue/html-quotes': ['error', 'double'],
// 正常标签内左右都不允许有空格,自闭合(单标签)标签可以存在一个或多个空格
'vue/html-closing-bracket-spacing': ['error', {
startTag: 'never',
endTag: 'never',
selfClosingTag: 'always'
}],
// 标签中单行属性最多不能超过3个
'vue/max-attributes-per-line': ['error', {
singleline: {
max: 4
},
multiline: {
max: 1
}
}],
// 需要在多行元素的内容前后换行
'vue/multiline-html-element-content-newline': [0, {
ignoreWhenEmpty: true,
ignores: ['a', 'b', 'u', 'span', 'img', 'input', 'strong', 'select', 'sub', 'sup', 'label', 'em', 'button', 'textarea', 'tt', 'var', 'samp', 'br', 'cite', 'code', 'font', 'strike']
}]
}
}
JavaScript
1
https://gitee.com/tofireloli/cruelLoli-vue3.git
git@gitee.com:tofireloli/cruelLoli-vue3.git
tofireloli
cruelLoli-vue3
uniapp+Vue3 + typescript + vite + pinia+ mock框架
master

搜索帮助