mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 04:45:52 +08:00
build: fix eslint undef
This commit is contained in:
parent
67d02212b4
commit
f215db87e3
@ -82,8 +82,10 @@ export default combine(
|
|||||||
}),
|
}),
|
||||||
unicorn(),
|
unicorn(),
|
||||||
node(),
|
node(),
|
||||||
|
...process.env.ESLINT_CONFIG_INSPECTOR
|
||||||
|
? []
|
||||||
// TODO: remove this when upgrade to nextjs 15
|
// TODO: remove this when upgrade to nextjs 15
|
||||||
compat.extends('next'),
|
: [compat.extends('next')],
|
||||||
{
|
{
|
||||||
ignores: [
|
ignores: [
|
||||||
'**/node_modules/*',
|
'**/node_modules/*',
|
||||||
@ -130,8 +132,16 @@ export default combine(
|
|||||||
// antfu migrate to eslint-plugin-unused-imports
|
// antfu migrate to eslint-plugin-unused-imports
|
||||||
"unused-imports/no-unused-vars": "warn",
|
"unused-imports/no-unused-vars": "warn",
|
||||||
"unused-imports/no-unused-imports": "warn",
|
"unused-imports/no-unused-imports": "warn",
|
||||||
|
},
|
||||||
|
|
||||||
"no-undef": "error",
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.es2025,
|
||||||
|
...globals.node,
|
||||||
|
'React': 'readable',
|
||||||
|
'JSX': 'readable',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
storybook,
|
storybook,
|
||||||
@ -157,24 +167,8 @@ export default combine(
|
|||||||
...globals.browser,
|
...globals.browser,
|
||||||
...globals.es2021,
|
...globals.es2021,
|
||||||
...globals.node,
|
...globals.node,
|
||||||
...globals.jest
|
...globals.jest,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
files: [
|
|
||||||
GLOB_JSX,
|
|
||||||
GLOB_TSX,
|
|
||||||
'**/hooks/*'
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.browser,
|
|
||||||
...globals.es2025,
|
|
||||||
...globals.node,
|
|
||||||
'React': 'readable',
|
|
||||||
'JSX': 'readable',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user