mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
- Replace .eslintrc.json with eslint.config.mjs - Simplify configuration using @antfu/eslint-config - Add necessary ESLint plugin dependencies - Disable overly strict style rules - Set package.json type to module for ESM support - Fix ESLint disable comment format 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
68 lines
1.4 KiB
JavaScript
68 lines
1.4 KiB
JavaScript
import { combine, javascript, typescript, stylistic } from '@antfu/eslint-config'
|
|
import globals from 'globals'
|
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
|
|
export default combine(
|
|
javascript({
|
|
overrides: {
|
|
'no-unused-vars': 'off',
|
|
'no-console': 'off',
|
|
},
|
|
}),
|
|
|
|
typescript(),
|
|
|
|
stylistic({
|
|
lessOpinionated: true,
|
|
jsx: false,
|
|
semi: false,
|
|
quotes: 'single',
|
|
overrides: {
|
|
'style/indent': ['error', 2],
|
|
'style/quotes': ['error', 'single'],
|
|
'style/max-statements-per-line': 'off',
|
|
},
|
|
}),
|
|
|
|
{
|
|
plugins: {
|
|
'react-hooks': reactHooks,
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
'react-hooks/exhaustive-deps': 'warn',
|
|
'unused-imports/no-unused-vars': 'warn',
|
|
'unused-imports/no-unused-imports': 'warn',
|
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
'ts/no-use-before-define': 'off',
|
|
'style/brace-style': 'off',
|
|
},
|
|
},
|
|
|
|
{
|
|
ignores: [
|
|
'**/node_modules/**',
|
|
'**/dist/**',
|
|
'**/build/**',
|
|
'**/out/**',
|
|
'**/.next/**',
|
|
'**/public/**',
|
|
'**/*.json',
|
|
'tailwind.config.js',
|
|
'next.config.js',
|
|
],
|
|
},
|
|
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.es2025,
|
|
...globals.node,
|
|
React: 'readable',
|
|
JSX: 'readable',
|
|
},
|
|
},
|
|
},
|
|
)
|