保存进度!
This commit is contained in:
153
code/web/regulatory-management-util/eslint.config.js.bak
Normal file
153
code/web/regulatory-management-util/eslint.config.js.bak
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
import js from "@eslint/js";
|
||||||
|
import globals from "globals";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
import pluginVue from "eslint-plugin-vue";
|
||||||
|
// import json from "@eslint/json";
|
||||||
|
import css from "@eslint/css";
|
||||||
|
import { defineConfig } from "eslint/config";
|
||||||
|
import stylistic from "@stylistic/eslint-plugin";
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
name: "通用设置",
|
||||||
|
files: [
|
||||||
|
"src/**/*.{js,mjs,cjs,ts,mts,cts}",
|
||||||
|
"eslint.config.ts",
|
||||||
|
],
|
||||||
|
plugins: {
|
||||||
|
js,
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
extends: ["js/recommended",],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node, },
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
|
||||||
|
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
||||||
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-unused-vars": "warn",
|
||||||
|
"semi-spacing": ["error", {"before": false,
|
||||||
|
"after": true,},], // 控制行尾部分号
|
||||||
|
"quotes": ["error", "double",],
|
||||||
|
"comma-dangle": ["error", {
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},], // 数组和对象键值对最后一个逗号
|
||||||
|
"comma-style": ["error", "last",], // 逗号在行位
|
||||||
|
"no-undef-init": "error",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"no-use-before-define": "error",
|
||||||
|
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
|
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"prefer-const": "warn",
|
||||||
|
"space-before-function-paren": ["error", {
|
||||||
|
anonymous: "always",
|
||||||
|
named: "never",
|
||||||
|
asyncArrow: "always",
|
||||||
|
},],
|
||||||
|
"array-bracket-spacing": ["error", "never", {
|
||||||
|
singleValue: false,
|
||||||
|
objectsInArrays: false,
|
||||||
|
arraysInArrays: false,
|
||||||
|
},],
|
||||||
|
"comma-spacing": ["error", {
|
||||||
|
before: false,
|
||||||
|
after: true, },],
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// vue设置
|
||||||
|
// pluginVue.configs["flat/base"],
|
||||||
|
pluginVue.configs["flat/essential"],
|
||||||
|
{
|
||||||
|
files: ["**/*.vue",],
|
||||||
|
languageOptions: {
|
||||||
|
sourceType: "module",
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
parserOptions: { parser: tseslint.parser }
|
||||||
|
},
|
||||||
|
// rules: {
|
||||||
|
// "vue/html-indent": ["error", 4,],
|
||||||
|
// "vue/max-attributes-per-line": ["error", {
|
||||||
|
// "singleline": {
|
||||||
|
// "max": 3,
|
||||||
|
// },
|
||||||
|
// "multiline": {
|
||||||
|
// "max": 2,
|
||||||
|
// },
|
||||||
|
// },],
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.css",],
|
||||||
|
plugins: { css, },
|
||||||
|
language: "css/css",
|
||||||
|
extends: ["css/recommended",],
|
||||||
|
},
|
||||||
|
// Typescript设置
|
||||||
|
tseslint.configs.recommended,
|
||||||
|
{
|
||||||
|
files: ["src/**/*.ts", "eslint.config.ts",],
|
||||||
|
plugins: {
|
||||||
|
"@stylistic": stylistic,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"space-before-function-paren": "off",
|
||||||
|
"semi-spacing": ["error", {"before": false,
|
||||||
|
"after": true,},],
|
||||||
|
"@typescript-eslint/no-unused-vars": "warn",
|
||||||
|
"@stylistic/indent": ["error", 4, { SwitchCase: 1, },],
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
"@typescript-eslint/no-extra-semi": "off",
|
||||||
|
"@typescript-eslint/no-inferrable-types": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "warn",
|
||||||
|
"@typescript-eslint/member-delimiter-style": "off",
|
||||||
|
"@stylistic/semi": ["error", "always",], // 控制行尾部分号
|
||||||
|
"@stylistic/brace-style": ["error", "allman", { allowSingleLine: true, },],
|
||||||
|
"@stylistic/comma-dangle": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
arrays: "always",
|
||||||
|
objects: "always",
|
||||||
|
imports: "never",
|
||||||
|
exports: "never",
|
||||||
|
functions: "never",
|
||||||
|
},
|
||||||
|
], // 数组和对象键值对最后一个逗号
|
||||||
|
"@stylistic/quotes": ["error", "double",],
|
||||||
|
"@typescript-eslint/space-before-function-paren": "off",
|
||||||
|
"@typescript-eslint/comma-spacing": ["off", { before: false,
|
||||||
|
after: true, },], // 使用eslint的,不用ts的
|
||||||
|
// "@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||||
|
// allowString: false,
|
||||||
|
// },],
|
||||||
|
"@stylistic/object-property-newline": "warn",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// files: ["**/*.json"],
|
||||||
|
// plugins: { json },
|
||||||
|
// language: "json/json",
|
||||||
|
// extends: ["json/recommended"],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// files: ["**/*.jsonc"],
|
||||||
|
// plugins: { json },
|
||||||
|
// language: "json/jsonc",
|
||||||
|
// extends: ["json/recommended"],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// files: ["**/*.json5"],
|
||||||
|
// plugins: { json },
|
||||||
|
// language: "json/json5",
|
||||||
|
// extends: ["json/recommended"],
|
||||||
|
// },
|
||||||
|
]);
|
||||||
@@ -2,94 +2,20 @@ import js from "@eslint/js";
|
|||||||
import globals from "globals";
|
import globals from "globals";
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
import pluginVue from "eslint-plugin-vue";
|
import pluginVue from "eslint-plugin-vue";
|
||||||
// import json from "@eslint/json";
|
|
||||||
import css from "@eslint/css";
|
|
||||||
import { defineConfig } from "eslint/config";
|
import { defineConfig } from "eslint/config";
|
||||||
import stylistic from "@stylistic/eslint-plugin";
|
import stylistic from "@stylistic/eslint-plugin";
|
||||||
|
|
||||||
export default defineConfig([
|
export default defineConfig([
|
||||||
{
|
{
|
||||||
files: [
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts}",],
|
||||||
"src/**/*.{js,mjs,cjs,ts,mts,cts,vue}",
|
plugins: { js, },
|
||||||
"eslint.config.ts",
|
|
||||||
],
|
|
||||||
plugins: {
|
|
||||||
js,
|
|
||||||
"@stylistic": stylistic,
|
|
||||||
},
|
|
||||||
extends: ["js/recommended",],
|
extends: ["js/recommended",],
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
globals: {
|
globals: {
|
||||||
...globals.browser,
|
...globals.browser,
|
||||||
...globals.node, },
|
...globals.node,}, },
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"no-trailing-spaces": ["error", {"ignoreComments": true,},],
|
|
||||||
"space-in-parens": ["error", "always", { exceptions: ["{}", "[]", "()", "empty",], },],
|
|
||||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
||||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
||||||
"no-unused-vars": "warn",
|
|
||||||
"semi-spacing": ["error", {"before": false,
|
|
||||||
"after": true,},], // 控制行尾部分号
|
|
||||||
"quotes": ["error", "double",],
|
|
||||||
"comma-dangle": ["error", {
|
|
||||||
arrays: "always",
|
|
||||||
objects: "always",
|
|
||||||
imports: "never",
|
|
||||||
exports: "never",
|
|
||||||
functions: "never",
|
|
||||||
},], // 数组和对象键值对最后一个逗号
|
|
||||||
"comma-style": ["error", "last",], // 逗号在行位
|
|
||||||
"no-undef-init": "error",
|
|
||||||
"no-invalid-this": "error",
|
|
||||||
"no-use-before-define": "error",
|
|
||||||
"no-shadow-restricted-names": "error", // 禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
|
||||||
"brace-style": ["error", "allman", { allowSingleLine: true, },],
|
|
||||||
"prefer-const": "warn",
|
|
||||||
"space-before-function-paren": ["error", {
|
|
||||||
anonymous: "always",
|
|
||||||
named: "never",
|
|
||||||
asyncArrow: "always",
|
|
||||||
},],
|
|
||||||
"array-bracket-spacing": ["error", "never", {
|
|
||||||
singleValue: false,
|
|
||||||
objectsInArrays: false,
|
|
||||||
arraysInArrays: false,
|
|
||||||
},],
|
|
||||||
"comma-spacing": ["error", {
|
|
||||||
before: false,
|
|
||||||
after: true, },],
|
|
||||||
"@stylistic/quotes": ["error", "double",],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
tseslint.configs.recommended,
|
tseslint.configs.recommended,
|
||||||
pluginVue.configs["flat/essential"],
|
|
||||||
{
|
|
||||||
files: ["src/**/*.vue",],
|
|
||||||
languageOptions: {
|
|
||||||
parserOptions: {
|
|
||||||
parser: tseslint.parser,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"vue/html-indent": ["error", 4,],
|
|
||||||
"vue/max-attributes-per-line": ["error", {
|
|
||||||
"singleline": {
|
|
||||||
"max": 3,
|
|
||||||
},
|
|
||||||
"multiline": {
|
|
||||||
"max": 2,
|
|
||||||
},
|
|
||||||
},],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
files: ["**/*.css",],
|
|
||||||
plugins: { css, },
|
|
||||||
language: "css/css",
|
|
||||||
extends: ["css/recommended",],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
files: ["src/**/*.ts", "eslint.config.ts",],
|
files: ["src/**/*.ts", "eslint.config.ts",],
|
||||||
plugins: {
|
plugins: {
|
||||||
@@ -129,22 +55,7 @@ export default defineConfig([
|
|||||||
"@stylistic/object-property-newline": "warn",
|
"@stylistic/object-property-newline": "warn",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
pluginVue.configs["flat/essential"],
|
||||||
// files: ["**/*.json"],
|
{ files: ["**/*.vue",],
|
||||||
// plugins: { json },
|
languageOptions: { parserOptions: { parser: tseslint.parser, }, }, },
|
||||||
// language: "json/json",
|
|
||||||
// extends: ["json/recommended"],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// files: ["**/*.jsonc"],
|
|
||||||
// plugins: { json },
|
|
||||||
// language: "json/jsonc",
|
|
||||||
// extends: ["json/recommended"],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// files: ["**/*.json5"],
|
|
||||||
// plugins: { json },
|
|
||||||
// language: "json/json5",
|
|
||||||
// extends: ["json/recommended"],
|
|
||||||
// },
|
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
<!--
|
|
||||||
author: Kane Wang <wangkane@qq.com>
|
|
||||||
date: 2025-10-14 15:57:34
|
|
||||||
component: AppMain
|
|
||||||
Copyright © CPIC All rights reserved
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<router-view />
|
<router-view />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,12 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @Author: Kane
|
|
||||||
* @Date: 2023-03-23 15:07:31
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /task_schedule/src/layout/Index.vue
|
|
||||||
* @Description:
|
|
||||||
*
|
|
||||||
* Copyright (c) ${2022} by Kane, All Rights Reserved.
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<el-container class="layout-container">
|
<el-container class="layout-container">
|
||||||
<el-header class="layout-header">
|
<el-header class="layout-header">
|
||||||
|
|||||||
Reference in New Issue
Block a user