1 Star 0 Fork 17

尘心/Vue3+Ts+Vite+pinia+ element plus+windicss

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.eslintrc.js 6.62 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"./.eslintrc-auto-import.json",
"plugin:vue/vue3-recommended",
"plugin:@typescript-eslint/recommended",
],
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["@typescript-eslint"],
rules: {
quotes: ["error", "single"],
eqeqeq: ["error", "always"],
"no-unused-vars": "error",
"keyword-spacing": [
"error",
{
overrides: {
if: {
after: true,
},
for: {
after: true,
},
while: {
after: true,
},
else: {
after: true,
},
},
},
],
camelcase: ["error", { properties: "never" }],
indent: [
"error",
2,
{
SwitchCase: 1,
flatTernaryExpressions: true,
},
],
"array-bracket-spacing": ["error", "never"],
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"arrow-parens": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
semi: ["error", "never"],
"space-before-function-paren": [
"error",
{
anonymous: "never",
named: "never",
asyncArrow: "never",
},
],
"no-trailing-spaces": ["error"],
"spaced-comment": [
"error",
"always",
{
line: {
markers: ["*package", "!", "/", ",", "="],
},
block: {
balanced: false,
markers: ["*package", "!", ",", ":", "::", "flow-include"],
exceptions: ["*"],
},
},
],
"no-template-curly-in-string": "off",
"no-useless-escape": "off",
"prefer-const": "error",
"vue/valid-v-slot": "error",
"vue/experimental-script-setup-vars": "off",
"vue/array-bracket-spacing": ["error", "never"],
"vue/arrow-spacing": ["error", { before: true, after: true }],
"vue/attribute-hyphenation": ["error", "always"],
"vue/attributes-order": "off",
"vue/block-spacing": ["error", "always"],
"vue/camelcase": ["error", { properties: "never" }],
"vue/comma-dangle": ["error", "never"],
"vue/comment-directive": "error",
"vue/component-name-in-template-casing": "off",
"vue/eqeqeq": ["error", "always", { null: "ignore" }],
"vue/html-closing-bracket-newline": "off",
"vue/html-closing-bracket-spacing": [
"error",
{
startTag: "never",
endTag: "never",
selfClosingTag: "always",
},
],
"vue/html-end-tags": "error",
"vue/html-indent": [
"error",
2,
{
attribute: 1,
baseIndent: 1,
closeBracket: 0,
alignAttributesVertically: false,
ignores: [],
},
],
"vue/html-quotes": ["error", "double"],
"vue/html-self-closing": "off",
"vue/jsx-uses-vars": "warn",
"vue/key-spacing": ["error", { beforeColon: false, afterColon: true }],
"vue/match-component-file-name": "off",
"vue/max-attributes-per-line": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/mustache-interpolation-spacing": "off",
// "vue/name-property-casing": ["error", "kebab-case"],
"vue/no-async-in-computed-properties": "error",
"vue/no-boolean-default": "off",
"vue/no-confusing-v-for-v-if": "off",
"vue/no-dupe-keys": "error",
"vue/no-duplicate-attributes": "error",
"vue/no-multi-spaces": "error",
"vue/no-parsing-error": "error",
"vue/no-reserved-keys": "error",
"vue/no-restricted-syntax": "off",
"vue/no-shared-component-data": "error",
"vue/no-side-effects-in-computed-properties": "off",
"vue/no-spaces-around-equal-signs-in-attribute": "error",
"vue/no-template-key": "off",
"vue/no-textarea-mustache": "error",
"vue/no-unused-components": "error",
"vue/no-unused-vars": "error",
"vue/no-use-v-if-with-v-for": "off",
"vue/no-v-html": "off",
"vue/object-curly-spacing": ["error", "always"],
"vue/order-in-components": [
"error",
{
order: [
"el",
"name",
"parent",
"functional",
["delimiters", "comments"],
["components", "directives", "filters"],
"extends",
"mixins",
"inheritAttrs",
"model",
["props", "propsData"],
"data",
"computed",
"watch",
"LIFECYCLE_HOOKS",
"methods",
["template", "render"],
"renderError",
],
},
],
"vue/prop-name-casing": ["error", "camelCase"],
"vue/require-component-is": "error",
"vue/require-default-prop": "off",
"vue/require-direct-export": "off",
"vue/require-prop-type-constructor": "error",
"vue/require-prop-types": "error",
"vue/require-render-return": "error",
"vue/require-v-for-key": "error",
"vue/require-valid-default-prop": "off",
"vue/return-in-computed-property": "error",
"vue/script-indent": [
"error",
2,
{
baseIndent: 1,
switchCase: 1,
},
],
"vue/singleline-html-element-content-newline": "off",
"vue/space-infix-ops": "error",
"vue/space-unary-ops": ["error", { words: true, nonwords: false }],
"vue/this-in-template": ["error", "never"],
"vue/use-v-on-exact": "off",
"vue/v-bind-style": "off",
"vue/v-on-function-call": "off",
"vue/v-on-style": ["error", "shorthand"],
"vue/valid-template-root": "error",
"vue/valid-v-bind": "error",
"vue/valid-v-cloak": "error",
"vue/valid-v-else-if": "error",
"vue/valid-v-else": "error",
"vue/valid-v-for": "error",
"vue/valid-v-html": "error",
"vue/valid-v-if": "error",
"vue/valid-v-model": "error",
"vue/valid-v-on": "error",
"vue/valid-v-once": "error",
"vue/valid-v-pre": "error",
"vue/valid-v-show": "error",
"vue/valid-v-text": "error",
"vue/script-setup-uses-vars": "error",
"vue/multi-word-component-names": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
},
overrides: [
{
files: ["*.vue"],
rules: {
indent: "off",
},
},
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jacklinyao/xt-admin-vue3.git
git@gitee.com:jacklinyao/xt-admin-vue3.git
jacklinyao
xt-admin-vue3
Vue3+Ts+Vite+pinia+ element plus+windicss
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385