Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dc610f02
authored
Jan 01, 2026
by
MT-Joer
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style: eslint注释
1 parent
26da7184
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
40 additions
and
148 deletions
internal/lint-configs/eslint-config/src/configs/import.ts
internal/lint-configs/eslint-config/src/configs/javascript.ts
internal/lint-configs/eslint-config/src/configs/jsdoc.ts
internal/lint-configs/eslint-config/src/configs/jsonc.ts
internal/lint-configs/eslint-config/src/configs/node.ts
internal/lint-configs/eslint-config/src/configs/perfectionist.ts
internal/lint-configs/eslint-config/src/configs/prettier.ts
internal/lint-configs/eslint-config/src/configs/regexp.ts
internal/lint-configs/eslint-config/src/configs/test.ts
internal/lint-configs/eslint-config/src/configs/turbo.ts
internal/lint-configs/eslint-config/src/configs/typescript.ts
internal/lint-configs/eslint-config/src/configs/unicorn.ts
internal/lint-configs/eslint-config/src/configs/vue.ts
internal/lint-configs/eslint-config/src/custom-config.ts
internal/lint-configs/eslint-config/src/index.ts
packages/effects/common-ui/src/components/json-viewer/index.vue
internal/lint-configs/eslint-config/src/configs/import.ts
View file @
dc610f0
...
@@ -20,10 +20,7 @@ export async function importPluginConfig(): Promise<Linter.Config[]> {
...
@@ -20,10 +20,7 @@ export async function importPluginConfig(): Promise<Linter.Config[]> {
},
},
rules
:
{
rules
:
{
// 优先在顶层位置声明类型导出,减少嵌套导致的类型混淆
// 优先在顶层位置声明类型导出,减少嵌套导致的类型混淆
'import/consistent-type-specifier-style'
:
[
'import/consistent-type-specifier-style'
:
[
'error'
,
'prefer-top-level'
],
'error'
,
'prefer-top-level'
,
],
// 导入应集中在文件顶部
// 导入应集中在文件顶部
'import/first'
:
'error'
,
'import/first'
:
'error'
,
// 导入后需换行以增强可读性
// 导入后需换行以增强可读性
...
...
internal/lint-configs/eslint-config/src/configs/javascript.ts
View file @
dc610f0
...
@@ -44,10 +44,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -44,10 +44,7 @@ export async function javascript(): Promise<Linter.Config[]> {
},
},
rules
:
{
rules
:
{
...
js
.
configs
.
recommended
.
rules
,
...
js
.
configs
.
recommended
.
rules
,
'accessor-pairs'
:
[
'accessor-pairs'
:
[
'error'
,
{
enforceForClassMembers
:
true
,
setWithoutGet
:
true
}],
'error'
,
{
enforceForClassMembers
:
true
,
setWithoutGet
:
true
},
],
'array-callback-return'
:
'error'
,
'array-callback-return'
:
'error'
,
'block-scoped-var'
:
'error'
,
'block-scoped-var'
:
'error'
,
'constructor-super'
:
'error'
,
'constructor-super'
:
'error'
,
...
@@ -56,10 +53,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -56,10 +53,7 @@ export async function javascript(): Promise<Linter.Config[]> {
eqeqeq
:
[
'error'
,
'always'
],
eqeqeq
:
[
'error'
,
'always'
],
'keyword-spacing'
:
'off'
,
'keyword-spacing'
:
'off'
,
'new-cap'
:
[
'new-cap'
:
[
'error'
,
{
capIsNew
:
false
,
newIsCap
:
true
,
properties
:
true
}],
'error'
,
{
capIsNew
:
false
,
newIsCap
:
true
,
properties
:
true
},
],
'no-alert'
:
'error'
,
'no-alert'
:
'error'
,
'no-array-constructor'
:
'error'
,
'no-array-constructor'
:
'error'
,
'no-async-promise-executor'
:
'error'
,
'no-async-promise-executor'
:
'error'
,
...
@@ -94,10 +88,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -94,10 +88,7 @@ export async function javascript(): Promise<Linter.Config[]> {
'no-invalid-regexp'
:
'error'
,
'no-invalid-regexp'
:
'error'
,
'no-irregular-whitespace'
:
'error'
,
'no-irregular-whitespace'
:
'error'
,
'no-iterator'
:
'error'
,
'no-iterator'
:
'error'
,
'no-labels'
:
[
'no-labels'
:
[
'error'
,
{
allowLoop
:
false
,
allowSwitch
:
false
}],
'error'
,
{
allowLoop
:
false
,
allowSwitch
:
false
},
],
'no-lone-blocks'
:
'error'
,
'no-lone-blocks'
:
'error'
,
'no-loss-of-precision'
:
'error'
,
'no-loss-of-precision'
:
'error'
,
'no-misleading-character-class'
:
'error'
,
'no-misleading-character-class'
:
'error'
,
...
@@ -122,8 +113,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -122,8 +113,7 @@ export async function javascript(): Promise<Linter.Config[]> {
'no-restricted-properties'
:
[
'no-restricted-properties'
:
[
'error'
,
'error'
,
{
{
message
:
message
:
'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.'
,
'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.'
,
property
:
'__proto__'
,
property
:
'__proto__'
,
},
},
{
{
...
@@ -135,13 +125,11 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -135,13 +125,11 @@ export async function javascript(): Promise<Linter.Config[]> {
property
:
'__defineSetter__'
,
property
:
'__defineSetter__'
,
},
},
{
{
message
:
message
:
'Use `Object.getOwnPropertyDescriptor` instead.'
,
'Use `Object.getOwnPropertyDescriptor` instead.'
,
property
:
'__lookupGetter__'
,
property
:
'__lookupGetter__'
,
},
},
{
{
message
:
message
:
'Use `Object.getOwnPropertyDescriptor` instead.'
,
'Use `Object.getOwnPropertyDescriptor` instead.'
,
property
:
'__lookupSetter__'
,
property
:
'__lookupSetter__'
,
},
},
],
],
...
@@ -187,10 +175,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -187,10 +175,7 @@ export async function javascript(): Promise<Linter.Config[]> {
vars
:
'all'
,
vars
:
'all'
,
},
},
],
],
'no-use-before-define'
:
[
'no-use-before-define'
:
[
'error'
,
{
classes
:
false
,
functions
:
false
,
variables
:
false
}],
'error'
,
{
classes
:
false
,
functions
:
false
,
variables
:
false
},
],
'no-useless-backreference'
:
'error'
,
'no-useless-backreference'
:
'error'
,
'no-useless-call'
:
'error'
,
'no-useless-call'
:
'error'
,
'no-useless-catch'
:
'error'
,
'no-useless-catch'
:
'error'
,
...
@@ -200,11 +185,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -200,11 +185,7 @@ export async function javascript(): Promise<Linter.Config[]> {
'no-useless-return'
:
'error'
,
'no-useless-return'
:
'error'
,
'no-var'
:
'error'
,
'no-var'
:
'error'
,
'no-with'
:
'error'
,
'no-with'
:
'error'
,
'object-shorthand'
:
[
'object-shorthand'
:
[
'error'
,
'always'
,
{
avoidQuotes
:
true
,
ignoreConstructors
:
false
}],
'error'
,
'always'
,
{
avoidQuotes
:
true
,
ignoreConstructors
:
false
},
],
'one-var'
:
[
'error'
,
{
initialized
:
'never'
}],
'one-var'
:
[
'error'
,
{
initialized
:
'never'
}],
'prefer-arrow-callback'
:
[
'prefer-arrow-callback'
:
[
'error'
,
'error'
,
...
@@ -223,10 +204,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -223,10 +204,7 @@ export async function javascript(): Promise<Linter.Config[]> {
'prefer-exponentiation-operator'
:
'error'
,
'prefer-exponentiation-operator'
:
'error'
,
'prefer-promise-reject-errors'
:
'error'
,
'prefer-promise-reject-errors'
:
'error'
,
'prefer-regex-literals'
:
[
'prefer-regex-literals'
:
[
'error'
,
{
disallowRedundantWrapping
:
true
}],
'error'
,
{
disallowRedundantWrapping
:
true
},
],
'prefer-rest-params'
:
'error'
,
'prefer-rest-params'
:
'error'
,
'prefer-spread'
:
'error'
,
'prefer-spread'
:
'error'
,
'prefer-template'
:
'error'
,
'prefer-template'
:
'error'
,
...
@@ -245,10 +223,7 @@ export async function javascript(): Promise<Linter.Config[]> {
...
@@ -245,10 +223,7 @@ export async function javascript(): Promise<Linter.Config[]> {
varsIgnorePattern
:
'^_'
,
varsIgnorePattern
:
'^_'
,
},
},
],
],
'use-isnan'
:
[
'use-isnan'
:
[
'error'
,
{
enforceForIndexOf
:
true
,
enforceForSwitchCase
:
true
}],
'error'
,
{
enforceForIndexOf
:
true
,
enforceForSwitchCase
:
true
},
],
'valid-typeof'
:
[
'error'
,
{
requireStringLiterals
:
true
}],
'valid-typeof'
:
[
'error'
,
{
requireStringLiterals
:
true
}],
'vars-on-top'
:
'error'
,
'vars-on-top'
:
'error'
,
...
...
internal/lint-configs/eslint-config/src/configs/jsdoc.ts
View file @
dc610f0
...
@@ -12,9 +12,7 @@ import type { Linter } from 'eslint';
...
@@ -12,9 +12,7 @@ import type { Linter } from 'eslint';
import
{
interopDefault
}
from
'../util'
;
import
{
interopDefault
}
from
'../util'
;
export
async
function
jsdoc
():
Promise
<
Linter
.
Config
[]
>
{
export
async
function
jsdoc
():
Promise
<
Linter
.
Config
[]
>
{
const
[
pluginJsdoc
]
=
await
Promise
.
all
([
const
[
pluginJsdoc
]
=
await
Promise
.
all
([
interopDefault
(
import
(
'eslint-plugin-jsdoc'
))]
as
const
);
interopDefault
(
import
(
'eslint-plugin-jsdoc'
)),
]
as
const
);
return
[
return
[
{
{
...
...
internal/lint-configs/eslint-config/src/configs/jsonc.ts
View file @
dc610f0
...
@@ -20,12 +20,7 @@ export async function jsonc(): Promise<Linter.Config[]> {
...
@@ -20,12 +20,7 @@ export async function jsonc(): Promise<Linter.Config[]> {
return
[
return
[
{
{
files
:
[
files
:
[
'**/*.json'
,
'**/*.json5'
,
'**/*.jsonc'
,
'*.code-workspace'
],
'**/*.json'
,
'**/*.json5'
,
'**/*.jsonc'
,
'*.code-workspace'
,
],
languageOptions
:
{
languageOptions
:
{
parser
:
parserJsonc
as
any
,
parser
:
parserJsonc
as
any
,
},
},
...
@@ -130,8 +125,7 @@ function sortPackageJson(): Linter.Config {
...
@@ -130,8 +125,7 @@ function sortPackageJson(): Linter.Config {
},
},
{
{
order
:
{
type
:
'asc'
},
order
:
{
type
:
'asc'
},
pathPattern
:
pathPattern
:
'^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$'
,
'^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$'
,
},
},
{
{
order
:
{
type
:
'asc'
},
order
:
{
type
:
'asc'
},
...
@@ -148,23 +142,12 @@ function sortPackageJson(): Linter.Config {
...
@@ -148,23 +142,12 @@ function sortPackageJson(): Linter.Config {
function
sortTsconfig
():
Linter
.
Config
{
function
sortTsconfig
():
Linter
.
Config
{
return
{
return
{
files
:
[
files
:
[
'**/tsconfig.json'
,
'**/tsconfig.*.json'
,
'internal/tsconfig/*.json'
],
'**/tsconfig.json'
,
'**/tsconfig.*.json'
,
'internal/tsconfig/*.json'
,
],
rules
:
{
rules
:
{
'jsonc/sort-keys'
:
[
'jsonc/sort-keys'
:
[
'error'
,
'error'
,
{
{
order
:
[
order
:
[
'extends'
,
'compilerOptions'
,
'references'
,
'files'
,
'include'
,
'exclude'
],
'extends'
,
'compilerOptions'
,
'references'
,
'files'
,
'include'
,
'exclude'
,
],
pathPattern
:
'^$'
,
pathPattern
:
'^$'
,
},
},
{
{
...
...
internal/lint-configs/eslint-config/src/configs/node.ts
View file @
dc610f0
...
@@ -55,10 +55,7 @@ export async function node(): Promise<Linter.Config[]> {
...
@@ -55,10 +55,7 @@ export async function node(): Promise<Linter.Config[]> {
},
},
},
},
{
{
files
:
[
files
:
[
'scripts/**/*.?([cm])[jt]s?(x)'
,
'internal/**/*.?([cm])[jt]s?(x)'
],
'scripts/**/*.?([cm])[jt]s?(x)'
,
'internal/**/*.?([cm])[jt]s?(x)'
,
],
rules
:
{
rules
:
{
'n/prefer-global/process'
:
'off'
,
'n/prefer-global/process'
:
'off'
,
},
},
...
...
internal/lint-configs/eslint-config/src/configs/perfectionist.ts
View file @
dc610f0
...
@@ -13,9 +13,7 @@ import type { Linter } from 'eslint';
...
@@ -13,9 +13,7 @@ import type { Linter } from 'eslint';
import
{
interopDefault
}
from
'../util'
;
import
{
interopDefault
}
from
'../util'
;
export
async
function
perfectionist
():
Promise
<
Linter
.
Config
[]
>
{
export
async
function
perfectionist
():
Promise
<
Linter
.
Config
[]
>
{
const
perfectionistPlugin
=
await
interopDefault
(
const
perfectionistPlugin
=
await
interopDefault
(
import
(
'eslint-plugin-perfectionist'
));
import
(
'eslint-plugin-perfectionist'
),
);
return
[
return
[
perfectionistPlugin
.
configs
[
'recommended-natural'
],
perfectionistPlugin
.
configs
[
'recommended-natural'
],
...
...
internal/lint-configs/eslint-config/src/configs/prettier.ts
View file @
dc610f0
...
@@ -12,9 +12,7 @@ import type { Linter } from 'eslint';
...
@@ -12,9 +12,7 @@ import type { Linter } from 'eslint';
import
{
interopDefault
}
from
'../util'
;
import
{
interopDefault
}
from
'../util'
;
export
async
function
prettier
():
Promise
<
Linter
.
Config
[]
>
{
export
async
function
prettier
():
Promise
<
Linter
.
Config
[]
>
{
const
[
pluginPrettier
]
=
await
Promise
.
all
([
const
[
pluginPrettier
]
=
await
Promise
.
all
([
interopDefault
(
import
(
'eslint-plugin-prettier'
))]
as
const
);
interopDefault
(
import
(
'eslint-plugin-prettier'
)),
]
as
const
);
return
[
return
[
{
{
plugins
:
{
plugins
:
{
...
...
internal/lint-configs/eslint-config/src/configs/regexp.ts
View file @
dc610f0
...
@@ -12,9 +12,7 @@ import type { Linter } from 'eslint';
...
@@ -12,9 +12,7 @@ import type { Linter } from 'eslint';
import
{
interopDefault
}
from
'../util'
;
import
{
interopDefault
}
from
'../util'
;
export
async
function
regexp
():
Promise
<
Linter
.
Config
[]
>
{
export
async
function
regexp
():
Promise
<
Linter
.
Config
[]
>
{
const
[
pluginRegexp
]
=
await
Promise
.
all
([
const
[
pluginRegexp
]
=
await
Promise
.
all
([
interopDefault
(
import
(
'eslint-plugin-regexp'
))]
as
const
);
interopDefault
(
import
(
'eslint-plugin-regexp'
)),
]
as
const
);
return
[
return
[
{
{
...
...
internal/lint-configs/eslint-config/src/configs/test.ts
View file @
dc610f0
...
@@ -40,10 +40,7 @@ export async function test(): Promise<Linter.Config[]> {
...
@@ -40,10 +40,7 @@ export async function test(): Promise<Linter.Config[]> {
rules
:
{
rules
:
{
'no-console'
:
'off'
,
'no-console'
:
'off'
,
'node/prefer-global/process'
:
'off'
,
'node/prefer-global/process'
:
'off'
,
'test/consistent-test-it'
:
[
'test/consistent-test-it'
:
[
'error'
,
{
fn
:
'it'
,
withinDescribe
:
'it'
}],
'error'
,
{
fn
:
'it'
,
withinDescribe
:
'it'
},
],
'test/no-identical-title'
:
'error'
,
'test/no-identical-title'
:
'error'
,
'test/no-import-node-test'
:
'error'
,
'test/no-import-node-test'
:
'error'
,
'test/no-only-tests'
:
'error'
,
'test/no-only-tests'
:
'error'
,
...
...
internal/lint-configs/eslint-config/src/configs/turbo.ts
View file @
dc610f0
...
@@ -11,9 +11,7 @@ import type { Linter } from 'eslint';
...
@@ -11,9 +11,7 @@ import type { Linter } from 'eslint';
import
{
interopDefault
}
from
'../util'
;
import
{
interopDefault
}
from
'../util'
;
export
async
function
turbo
():
Promise
<
Linter
.
Config
[]
>
{
export
async
function
turbo
():
Promise
<
Linter
.
Config
[]
>
{
const
[
pluginTurbo
]
=
await
Promise
.
all
([
const
[
pluginTurbo
]
=
await
Promise
.
all
([
interopDefault
(
import
(
'eslint-config-turbo'
))]
as
const
);
interopDefault
(
import
(
'eslint-config-turbo'
)),
]
as
const
);
return
[
return
[
{
{
...
...
internal/lint-configs/eslint-config/src/configs/typescript.ts
View file @
dc610f0
...
@@ -39,8 +39,7 @@ export async function typescript(): Promise<Linter.Config[]> {
...
@@ -39,8 +39,7 @@ export async function typescript(): Promise<Linter.Config[]> {
'@typescript-eslint'
:
pluginTs
as
any
,
'@typescript-eslint'
:
pluginTs
as
any
,
},
},
rules
:
{
rules
:
{
...
pluginTs
.
configs
[
'eslint-recommended'
]?.
overrides
?.[
0
]
...
pluginTs
.
configs
[
'eslint-recommended'
]?.
overrides
?.[
0
]?.
rules
,
?.
rules
,
...
pluginTs
.
configs
.
strict
?.
rules
,
...
pluginTs
.
configs
.
strict
?.
rules
,
// 对 @ts-xxx 注释进行限制:允许带说明的忽略以便在确有必要时记录原因
// 对 @ts-xxx 注释进行限制:允许带说明的忽略以便在确有必要时记录原因
'@typescript-eslint/ban-ts-comment'
:
[
'@typescript-eslint/ban-ts-comment'
:
[
...
...
internal/lint-configs/eslint-config/src/configs/unicorn.ts
View file @
dc610f0
...
@@ -13,9 +13,7 @@ import type { Linter } from 'eslint';
...
@@ -13,9 +13,7 @@ import type { Linter } from 'eslint';
import
{
interopDefault
}
from
'../util'
;
import
{
interopDefault
}
from
'../util'
;
export
async
function
unicorn
():
Promise
<
Linter
.
Config
[]
>
{
export
async
function
unicorn
():
Promise
<
Linter
.
Config
[]
>
{
const
[
pluginUnicorn
]
=
await
Promise
.
all
([
const
[
pluginUnicorn
]
=
await
Promise
.
all
([
interopDefault
(
import
(
'eslint-plugin-unicorn'
))]
as
const
);
interopDefault
(
import
(
'eslint-plugin-unicorn'
)),
]
as
const
);
return
[
return
[
{
{
...
@@ -36,20 +34,14 @@ export async function unicorn(): Promise<Linter.Config[]> {
...
@@ -36,20 +34,14 @@ export async function unicorn(): Promise<Linter.Config[]> {
'unicorn/no-useless-undefined'
:
'off'
,
'unicorn/no-useless-undefined'
:
'off'
,
'unicorn/prefer-at'
:
'off'
,
'unicorn/prefer-at'
:
'off'
,
'unicorn/prefer-dom-node-text-content'
:
'off'
,
'unicorn/prefer-dom-node-text-content'
:
'off'
,
'unicorn/prefer-export-from'
:
[
'unicorn/prefer-export-from'
:
[
'error'
,
{
ignoreUsedVariables
:
true
}],
'error'
,
{
ignoreUsedVariables
:
true
},
],
'unicorn/prefer-global-this'
:
'off'
,
'unicorn/prefer-global-this'
:
'off'
,
'unicorn/prefer-top-level-await'
:
'off'
,
'unicorn/prefer-top-level-await'
:
'off'
,
'unicorn/prevent-abbreviations'
:
'off'
,
'unicorn/prevent-abbreviations'
:
'off'
,
},
},
},
},
{
{
files
:
[
files
:
[
'scripts/**/*.?([cm])[jt]s?(x)'
,
'internal/**/*.?([cm])[jt]s?(x)'
],
'scripts/**/*.?([cm])[jt]s?(x)'
,
'internal/**/*.?([cm])[jt]s?(x)'
,
],
rules
:
{
rules
:
{
'unicorn/no-process-exit'
:
'off'
,
'unicorn/no-process-exit'
:
'off'
,
},
},
...
...
internal/lint-configs/eslint-config/src/configs/vue.ts
View file @
dc610f0
...
@@ -19,8 +19,7 @@ export async function vue(): Promise<Linter.Config[]> {
...
@@ -19,8 +19,7 @@ export async function vue(): Promise<Linter.Config[]> {
]
as
const
);
]
as
const
);
const
flatEssential
=
pluginVue
.
configs
?.[
'flat/essential'
]
||
[];
const
flatEssential
=
pluginVue
.
configs
?.[
'flat/essential'
]
||
[];
const
flatStronglyRecommended
=
const
flatStronglyRecommended
=
pluginVue
.
configs
?.[
'flat/strongly-recommended'
]
||
[];
pluginVue
.
configs
?.[
'flat/strongly-recommended'
]
||
[];
const
flatRecommended
=
pluginVue
.
configs
?.[
'flat/recommended'
]
||
[];
const
flatRecommended
=
pluginVue
.
configs
?.[
'flat/recommended'
]
||
[];
return
[
return
[
...
@@ -82,21 +81,13 @@ export async function vue(): Promise<Linter.Config[]> {
...
@@ -82,21 +81,13 @@ export async function vue(): Promise<Linter.Config[]> {
},
},
],
],
// 组件在模板中使用 PascalCase 命名,便于组件识别与一致性
// 组件在模板中使用 PascalCase 命名,便于组件识别与一致性
'vue/component-name-in-template-casing'
:
[
'vue/component-name-in-template-casing'
:
[
'error'
,
'PascalCase'
],
'error'
,
'PascalCase'
,
],
'vue/component-options-name-casing'
:
[
'error'
,
'PascalCase'
],
'vue/component-options-name-casing'
:
[
'error'
,
'PascalCase'
],
'vue/custom-event-name-casing'
:
[
'error'
,
'camelCase'
],
'vue/custom-event-name-casing'
:
[
'error'
,
'camelCase'
],
'vue/define-macros-order'
:
[
'vue/define-macros-order'
:
[
'error'
,
'error'
,
{
{
order
:
[
order
:
[
'defineOptions'
,
'defineProps'
,
'defineEmits'
,
'defineSlots'
],
'defineOptions'
,
'defineProps'
,
'defineEmits'
,
'defineSlots'
,
],
},
},
],
],
'vue/dot-location'
:
[
'error'
,
'property'
],
'vue/dot-location'
:
[
'error'
,
'property'
],
...
@@ -125,12 +116,7 @@ export async function vue(): Promise<Linter.Config[]> {
...
@@ -125,12 +116,7 @@ export async function vue(): Promise<Linter.Config[]> {
'vue/no-irregular-whitespace'
:
'error'
,
'vue/no-irregular-whitespace'
:
'error'
,
'vue/no-loss-of-precision'
:
'error'
,
'vue/no-loss-of-precision'
:
'error'
,
'vue/no-reserved-component-names'
:
'off'
,
'vue/no-reserved-component-names'
:
'off'
,
'vue/no-restricted-syntax'
:
[
'vue/no-restricted-syntax'
:
[
'error'
,
'DebuggerStatement'
,
'LabeledStatement'
,
'WithStatement'
],
'error'
,
'DebuggerStatement'
,
'LabeledStatement'
,
'WithStatement'
,
],
'vue/no-restricted-v-bind'
:
[
'error'
,
'/^v-/'
],
'vue/no-restricted-v-bind'
:
[
'error'
,
'/^v-/'
],
'vue/no-sparse-arrays'
:
'error'
,
'vue/no-sparse-arrays'
:
'error'
,
'vue/no-unused-refs'
:
'error'
,
'vue/no-unused-refs'
:
'error'
,
...
@@ -154,10 +140,7 @@ export async function vue(): Promise<Linter.Config[]> {
...
@@ -154,10 +140,7 @@ export async function vue(): Promise<Linter.Config[]> {
'vue/require-prop-types'
:
'off'
,
'vue/require-prop-types'
:
'off'
,
'vue/singleline-html-element-content-newline'
:
'off'
,
'vue/singleline-html-element-content-newline'
:
'off'
,
'vue/space-infix-ops'
:
'error'
,
'vue/space-infix-ops'
:
'error'
,
'vue/space-unary-ops'
:
[
'vue/space-unary-ops'
:
[
'error'
,
{
nonwords
:
false
,
words
:
true
}],
'error'
,
{
nonwords
:
false
,
words
:
true
},
],
'vue/v-on-event-hyphenation'
:
[
'vue/v-on-event-hyphenation'
:
[
'error'
,
'error'
,
'always'
,
'always'
,
...
...
internal/lint-configs/eslint-config/src/custom-config.ts
View file @
dc610f0
...
@@ -10,11 +10,7 @@
...
@@ -10,11 +10,7 @@
import
type
{
Linter
}
from
'eslint'
;
import
type
{
Linter
}
from
'eslint'
;
const
restrictedImportIgnores
=
[
const
restrictedImportIgnores
=
[
'**/vite.config.mts'
,
'**/tailwind.config.mjs'
,
'**/postcss.config.mjs'
];
'**/vite.config.mts'
,
'**/tailwind.config.mjs'
,
'**/postcss.config.mjs'
,
];
const
customConfig
:
Linter
.
Config
[]
=
[
const
customConfig
:
Linter
.
Config
[]
=
[
// shadcn-ui 内部组件是自动生成的,不做太多限制
// shadcn-ui 内部组件是自动生成的,不做太多限制
...
@@ -56,23 +52,19 @@ const customConfig: Linter.Config[] = [
...
@@ -56,23 +52,19 @@ const customConfig: Linter.Config[] = [
patterns
:
[
patterns
:
[
{
{
group
:
[
'#/api/*'
],
group
:
[
'#/api/*'
],
message
:
message
:
'The #/api package cannot be imported, please use the @core package itself'
,
'The #/api package cannot be imported, please use the @core package itself'
,
},
},
{
{
group
:
[
'#/layouts/*'
],
group
:
[
'#/layouts/*'
],
message
:
message
:
'The #/layouts package cannot be imported, please use the @core package itself'
,
'The #/layouts package cannot be imported, please use the @core package itself'
,
},
},
{
{
group
:
[
'#/locales/*'
],
group
:
[
'#/locales/*'
],
message
:
message
:
'The #/locales package cannot be imported, please use the @core package itself'
,
'The #/locales package cannot be imported, please use the @core package itself'
,
},
},
{
{
group
:
[
'#/stores/*'
],
group
:
[
'#/stores/*'
],
message
:
message
:
'The #/stores package cannot be imported, please use the @core package itself'
,
'The #/stores package cannot be imported, please use the @core package itself'
,
},
},
],
],
},
},
...
@@ -139,8 +131,7 @@ const customConfig: Linter.Config[] = [
...
@@ -139,8 +131,7 @@ const customConfig: Linter.Config[] = [
patterns
:
[
patterns
:
[
{
{
group
:
[
'@vben/*'
],
group
:
[
'@vben/*'
],
message
:
message
:
'The @vben package cannot be imported, please use the @core package itself'
,
'The @vben package cannot be imported, please use the @core package itself'
,
},
},
],
],
},
},
...
...
internal/lint-configs/eslint-config/src/index.ts
View file @
dc610f0
...
@@ -33,11 +33,7 @@ import { customConfig } from './custom-config';
...
@@ -33,11 +33,7 @@ import { customConfig } from './custom-config';
type
FlatConfig
=
Linter
.
Config
;
type
FlatConfig
=
Linter
.
Config
;
type
FlatConfigPromise
=
type
FlatConfigPromise
=
FlatConfig
|
FlatConfig
[]
|
Promise
<
FlatConfig
>
|
Promise
<
FlatConfig
[]
>
;
|
FlatConfig
|
FlatConfig
[]
|
Promise
<
FlatConfig
>
|
Promise
<
FlatConfig
[]
>
;
async
function
defineConfig
(
config
:
FlatConfig
[]
=
[])
{
async
function
defineConfig
(
config
:
FlatConfig
[]
=
[])
{
const
configs
:
FlatConfigPromise
[]
=
[
const
configs
:
FlatConfigPromise
[]
=
[
...
...
packages/effects/common-ui/src/components/json-viewer/index.vue
View file @
dc610f0
...
@@ -3,12 +3,7 @@ import type { SetupContext } from 'vue';
...
@@ -3,12 +3,7 @@ import type { SetupContext } from 'vue';
import
type
{
Recordable
}
from
'@vben/types'
;
import
type
{
Recordable
}
from
'@vben/types'
;
import
type
{
import
type
{
JsonViewerAction
,
JsonViewerProps
,
JsonViewerToggle
,
JsonViewerValue
}
from
'./types'
;
JsonViewerAction
,
JsonViewerProps
,
JsonViewerToggle
,
JsonViewerValue
,
}
from
'./types'
;
import
{
computed
,
useAttrs
}
from
'vue'
;
import
{
computed
,
useAttrs
}
from
'vue'
;
// @ts-ignore
// @ts-ignore
...
@@ -46,10 +41,7 @@ const emit = defineEmits<{
...
@@ -46,10 +41,7 @@ const emit = defineEmits<{
const
attrs
:
SetupContext
[
'attrs'
]
=
useAttrs
();
const
attrs
:
SetupContext
[
'attrs'
]
=
useAttrs
();
function
handleClick
(
event
:
MouseEvent
)
{
function
handleClick
(
event
:
MouseEvent
)
{
if
(
if
(
event
.
target
instanceof
HTMLElement
&&
event
.
target
.
classList
.
contains
(
'jv-item'
))
{
event
.
target
instanceof
HTMLElement
&&
event
.
target
.
classList
.
contains
(
'jv-item'
)
)
{
const
pathNode
=
event
.
target
.
closest
(
'.jv-push'
);
const
pathNode
=
event
.
target
.
closest
(
'.jv-push'
);
if
(
!
pathNode
||
!
pathNode
.
hasAttribute
(
'path'
))
{
if
(
!
pathNode
||
!
pathNode
.
hasAttribute
(
'path'
))
{
return
;
return
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment