1 Star 0 Fork 0

好的web开发模板/meadmin-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.cjs 2.50 KB
一键复制 编辑 原始数据 按行查看 历史
yuntian001 提交于 2023-07-18 18:50 . fix: 修复类型错误
module.exports = {
root: true,
extends: [
// add more generic rulesets here, such as:
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
'plugin:vue/vue3-recommended',
'prettier',
],
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
// Script parser for `<script>`
js: '@typescript-eslint/parser',
// Script parser for `<script lang="ts">`
ts: '@typescript-eslint/parser',
},
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
extraFileExtensions: ['.vue'],
},
overrides: [
{
files: ['*.vue'],
rules: {},
},
{
files: ['*.cjs'],
rules: {},
},
],
rules: {
// override/add rules settings here, such as:
'lines-around-comment': ['warn', { beforeBlockComment: true }],
'vue/multi-word-component-names': 'off',
'vue/require-default-prop': 'off',
'vue/no-v-html': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { args: 'after-used' }],
'no-undef': 'off', // ts(2304)
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
leadingUnderscore: 'allowSingleOrDouble',
filter: {
// you can expand this regex to add more allowed names
regex: '^((__v_.*)|([0-9]+))$',
match: false,
},
},
{
selector: 'variable',
modifiers: ['const'],
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allowSingleOrDouble',
},
{
selector: ['memberLike'],
format: null,
// format: ['camelCase', 'PascalCase'],
// leadingUnderscore: 'allowSingleOrDouble',
// filter: {
// // you can expand this regex to add more allowed names
// regex: '^((__v_.*)|([0-9]+))$',
// match: false,
// },
},
{
selector: 'enumMember',
format: ['camelCase', 'PascalCase', 'UPPER_CASE'],
leadingUnderscore: 'allowSingleOrDouble',
},
{
selector: ['typeLike', 'enum'],
format: ['PascalCase'],
leadingUnderscore: 'allowSingleOrDouble',
},
{
selector: ['default'],
modifiers: ['destructured', 'exported'],
format: null,
},
],
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/web-development-template/meadmin-template.git
git@gitee.com:web-development-template/meadmin-template.git
web-development-template
meadmin-template
meadmin-template
main

搜索帮助