Files
ragflow/web/.eslintrc.cjs
balibabu a442c9cac6 Fix: Fixed an issue where ESLint suggestions were not working in VS Code after upgrading to Vite. #12483 (#12484)
### What problem does this PR solve?

Fix: Fixed an issue where ESLint suggestions were not working in VS Code
after upgrading to Vite. #12483

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2026-01-07 14:32:17 +08:00

77 lines
1.7 KiB
JavaScript

module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
plugins: ['@typescript-eslint', 'react', 'react-refresh', 'check-file'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
env: {
browser: true,
es2021: true,
node: true,
},
rules: {
'@typescript-eslint/no-use-before-define': [
'warn',
{
functions: false,
variables: true,
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/no-unescaped-entities': [
'warn',
{
forbid: [
{
char: "'",
alternatives: [''', '''],
},
{
char: '"',
alternatives: ['"', '"'],
},
],
},
],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'no-console': ['warn', { allow: ['warn', 'error'] }],
'check-file/filename-naming-convention': [
'error',
{
'**/*.{jsx,tsx}': '[a-z0-9.-]*',
'**/*.{js,ts}': '[a-z0-9.-]*',
},
],
'check-file/folder-naming-convention': [
'error',
{
'src/**/': 'KEBAB_CASE',
'mocks/*/': 'KEBAB_CASE',
},
],
},
};