1 Star 0 Fork 77

张兴龙/金合技术中台Web端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 3.51 KB
一键复制 编辑 原始数据 按行查看 历史
qiye.mo 提交于 2023-11-13 14:17 . fix:bug修改
/*
* @Author : wfl
* @LastEditors: qiye
* @description :
* @updateInfo :
* @Date : 2023-01-05 13:58:20
* @LastEditTime: 2023-11-13 14:16:55
*/
module.exports = {
root: true,
parser: 'vue-eslint-parser',
ignorePatterns: ['**/*.json', '**/*.tsx', '**/*.d.ts'],
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
tsx: true
}
},
env: {
browser: true,
node: true
},
extends: [
'@antfu',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'off' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// 'no-unused-vars': ["error", { "args": "after-used", "ignoreRestSiblings": false }],
'eol-last': 'error',
'no-trailing-spaces': 'error',
'comma-style': ['error', 'last'],
'comma-dangle': ['error', 'never'],
quotes: [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: true }
],
camelcase: 0,
semi: ['error', 'never'],
indent: 'off',
'no-tabs': 'off',
'sort-imports': [
1,
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single']
}
],
'object-curly-spacing': ['error', 'always'],
'arrow-parens': ['error', 'as-needed'],
'quote-props': ['error', 'as-needed'],
'prefer-template': 'error',
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-duplicate-enum-values': 0,
'@typescript-eslint/no-this-alias': ['off'],
'@typescript-eslint/comma-dangle': ['error', 'never'],
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: true
}
}
],
'vue/first-attribute-linebreak': ['error', {
singleline: 'ignore',
multiline: 'below'
}],
'@typescript-eslint/no-use-before-define': 'off',
// '@typescript-eslint/indent': ['warn', 2, { SwitchCase: 1 }],
'vue/no-v-html': 'off',
'vue/no-setup-props-destructure': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'never',
normal: 'never',
component: 'always'
}
}
],
'vue/max-attributes-per-line': [
'error',
{
singleline: 3,
multiline: 1
}
],
'max-statements-per-line': [
'error',
{
max: 1
}
],
'vue/custom-event-name-casing': [
'error',
'camelCase',
{
// Vue3推荐自定义事件 驼峰命名 为适配某些组件取消验证即 'kebab-case' 'camelCase'都可以
ignores: ['/^[a-z]+(-[a-z]+)*$/u']
}
],
'vue/require-default-prop': 'off',
'vue/html-closing-bracket-spacing': 'error',
'vue/no-mutating-props': 'off',
'vue/multi-word-component-names': 'off',
'vue/v-on-event-hyphenation': 'off',
'prettier/prettier': 'off'
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/z550/iking-platform-web.git
git@gitee.com:z550/iking-platform-web.git
z550
iking-platform-web
金合技术中台Web端
dev

搜索帮助