mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
52 lines
1.2 KiB
JavaScript
52 lines
1.2 KiB
JavaScript
import globals from 'globals'
|
|
import pluginJs from '@eslint/js'
|
|
import tseslint from 'typescript-eslint'
|
|
import pluginVue from 'eslint-plugin-vue'
|
|
import unusedImports from 'eslint-plugin-unused-imports'
|
|
|
|
export default [
|
|
{
|
|
files: ['src/**/*.{js,mjs,cjs,ts,vue}']
|
|
},
|
|
{
|
|
ignores: [
|
|
'src/scripts/*',
|
|
'src/extensions/core/*',
|
|
'src/types/vue-shim.d.ts'
|
|
]
|
|
},
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
__COMFYUI_FRONTEND_VERSION__: 'readonly'
|
|
}
|
|
}
|
|
},
|
|
pluginJs.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...pluginVue.configs['flat/essential'],
|
|
{
|
|
files: ['src/**/*.vue'],
|
|
languageOptions: { parserOptions: { parser: tseslint.parser } }
|
|
},
|
|
{
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
'@typescript-eslint/prefer-as-const': 'off'
|
|
}
|
|
},
|
|
{
|
|
plugins: {
|
|
'unused-imports': unusedImports
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'off',
|
|
'@typescript-eslint/prefer-as-const': 'off',
|
|
'unused-imports/no-unused-imports': 'error'
|
|
}
|
|
}
|
|
]
|