mirror of https://github.com/langgenius/dify.git
chore: disable some auto fix, disable e18e rules (#33265)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
0fad13370c
commit
8b12389e19
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,5 @@
|
|||
// @ts-check
|
||||
import antfu, { GLOB_TESTS, GLOB_TS, GLOB_TSX } from '@antfu/eslint-config'
|
||||
import antfu, { GLOB_TESTS, GLOB_TS, GLOB_TSX, isInEditorEnv, isInGitHooksOrLintStaged } from '@antfu/eslint-config'
|
||||
import pluginQuery from '@tanstack/eslint-plugin-query'
|
||||
import tailwindcss from 'eslint-plugin-better-tailwindcss'
|
||||
import hyoban from 'eslint-plugin-hyoban'
|
||||
|
|
@ -12,6 +12,8 @@ import dify from './plugins/eslint/index.js'
|
|||
// See: tailwind-css-plugin.ts
|
||||
process.env.TAILWIND_MODE ??= 'ESLINT'
|
||||
|
||||
const disableRuleAutoFix = !(isInEditorEnv() || isInGitHooksOrLintStaged())
|
||||
|
||||
export default antfu(
|
||||
{
|
||||
react: {
|
||||
|
|
@ -46,6 +48,7 @@ export default antfu(
|
|||
'antfu/top-level-function': 'off',
|
||||
},
|
||||
},
|
||||
e18e: false,
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
|
|
@ -218,6 +221,10 @@ export default antfu(
|
|||
},
|
||||
},
|
||||
)
|
||||
.disableRulesFix([
|
||||
'e18e/prefer-array-at',
|
||||
])
|
||||
.disableRulesFix(disableRuleAutoFix
|
||||
? [
|
||||
'tailwindcss/enforce-consistent-class-order',
|
||||
'tailwindcss/no-duplicate-classes',
|
||||
'tailwindcss/no-unnecessary-whitespace',
|
||||
]
|
||||
: [])
|
||||
|
|
|
|||
Loading…
Reference in New Issue