mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-04-22 05:39:42 +08:00
chore: find code with high complexity (#17679)
This commit is contained in:
parent
df03c89a48
commit
c9f18aae0f
3
web/.vscode/extensions.json
vendored
3
web/.vscode/extensions.json
vendored
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"bradlc.vscode-tailwindcss",
|
"bradlc.vscode-tailwindcss",
|
||||||
"firsttris.vscode-jest-runner"
|
"firsttris.vscode-jest-runner",
|
||||||
|
"kisstkondoros.vscode-codemetrics"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -65,8 +65,6 @@ export default combine(
|
|||||||
// use `ESLINT_CONFIG_INSPECTOR=true pnpx @eslint/config-inspector` to check the config
|
// use `ESLINT_CONFIG_INSPECTOR=true pnpx @eslint/config-inspector` to check the config
|
||||||
// ...process.env.ESLINT_CONFIG_INSPECTOR
|
// ...process.env.ESLINT_CONFIG_INSPECTOR
|
||||||
// ? []
|
// ? []
|
||||||
// TODO: remove this when upgrade to nextjs 15
|
|
||||||
// : fixupConfigRules(compat.extends('next')),
|
|
||||||
{
|
{
|
||||||
rules: {
|
rules: {
|
||||||
// performance issue, and not used.
|
// performance issue, and not used.
|
||||||
@ -87,6 +85,7 @@ export default combine(
|
|||||||
{
|
{
|
||||||
// orignal config
|
// orignal config
|
||||||
rules: {
|
rules: {
|
||||||
|
'complexity': ['warn', { max: 10 }],
|
||||||
// orignal ts/no-var-requires
|
// orignal ts/no-var-requires
|
||||||
'ts/no-require-imports': 'off',
|
'ts/no-require-imports': 'off',
|
||||||
'no-console': 'off',
|
'no-console': 'off',
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
"fix": "next lint --fix",
|
"fix": "next lint --fix",
|
||||||
"eslint-fix": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix",
|
"eslint-fix": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix",
|
||||||
"eslint-fix-only-show-error": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix --quiet",
|
"eslint-fix-only-show-error": "eslint --cache --cache-location node_modules/.cache/eslint/.eslint-cache --fix --quiet",
|
||||||
|
"eslint-complexity": "eslint --rule 'complexity: [error, {max: 15}]' --quiet",
|
||||||
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",
|
"prepare": "cd ../ && node -e \"if (process.env.NODE_ENV !== 'production'){process.exit(1)} \" || husky ./web/.husky",
|
||||||
"gen-icons": "node ./app/components/base/icons/script.mjs",
|
"gen-icons": "node ./app/components/base/icons/script.mjs",
|
||||||
"uglify-embed": "node ./bin/uglify-embed",
|
"uglify-embed": "node ./bin/uglify-embed",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user