mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
* v2 init * chore: update eslint suppressions and package dependencies - Removed several eslint suppressions related to array sorting and reversing from eslint-suppressions.json to clean up the configuration. - Updated @lobehub/lint package version from 2.0.0-beta.6 to 2.0.0-beta.7 in package.json for improvements and bug fixes. - Made minor formatting adjustments in vitest.config.mts and various SKILL.md files for better readability and consistency. Signed-off-by: Innei <tukon479@gmail.com> * fix: clean up import statements and formatting - Removed unnecessary whitespace in replaceComponentImports.ts for improved readability. - Standardized import statements in contextEngineering.ts and createAgentExecutors.ts by adding missing spaces for consistency. Signed-off-by: Innei <tukon479@gmail.com> * chore: update eslint suppressions and clean up code formatting * 🐛 fix: use vi.hoisted for mock variable initialization Fix TDZ error in persona service test by using vi.hoisted() to ensure mock variables are available when vi.mock factory runs. --------- Signed-off-by: Innei <tukon479@gmail.com>
99 lines
2.3 KiB
JavaScript
99 lines
2.3 KiB
JavaScript
import { eslint } from '@lobehub/lint';
|
|
import { flat as mdxFlat } from 'eslint-plugin-mdx';
|
|
|
|
export default eslint(
|
|
{
|
|
ignores: [
|
|
// dependencies
|
|
'node_modules',
|
|
// ci
|
|
'coverage',
|
|
'.coverage',
|
|
// test
|
|
'jest*',
|
|
'*.test.ts',
|
|
'*.test.tsx',
|
|
// umi
|
|
'.umi',
|
|
'.umi-production',
|
|
'.umi-test',
|
|
'.dumi/tmp*',
|
|
// production
|
|
'dist',
|
|
'es',
|
|
'lib',
|
|
'logs',
|
|
// misc
|
|
'.next',
|
|
// temporary directories
|
|
'tmp',
|
|
'temp',
|
|
'.temp',
|
|
'.local',
|
|
'docs/.local',
|
|
// cache directories
|
|
'.cache',
|
|
// AI coding tools directories
|
|
'.claude',
|
|
'.serena',
|
|
],
|
|
next: true,
|
|
react: 'next',
|
|
},
|
|
// Global rule overrides
|
|
{
|
|
rules: {
|
|
'@next/next/no-img-element': 0,
|
|
'@typescript-eslint/no-use-before-define': 0,
|
|
'@typescript-eslint/no-useless-constructor': 0,
|
|
'no-extra-boolean-cast': 0,
|
|
'react/no-unknown-property': 0,
|
|
'unicorn/catch-error-name': 0,
|
|
'unicorn/explicit-length-check': 0,
|
|
'unicorn/no-array-callback-reference': 0,
|
|
'unicorn/require-module-specifiers': 0,
|
|
'unicorn/no-array-for-each': 0,
|
|
'unicorn/no-negated-condition': 0,
|
|
'unicorn/no-null': 0,
|
|
'unicorn/no-typeof-undefined': 0,
|
|
'unicorn/no-useless-undefined': 0,
|
|
'unicorn/prefer-code-point': 0,
|
|
'unicorn/prefer-logical-operator-over-ternary': 0,
|
|
'unicorn/prefer-number-properties': 0,
|
|
'unicorn/prefer-query-selector': 0,
|
|
'unicorn/prefer-spread': 0,
|
|
'unicorn/prefer-ternary': 0,
|
|
'unicorn/prefer-type-error': 0,
|
|
},
|
|
},
|
|
// MDX files
|
|
{
|
|
...mdxFlat,
|
|
files: ['**/*.mdx'],
|
|
rules: {
|
|
...mdxFlat.rules,
|
|
'@typescript-eslint/no-unused-vars': 1,
|
|
'no-undef': 0,
|
|
'react/jsx-no-undef': 0,
|
|
'react/no-unescaped-entities': 0,
|
|
},
|
|
},
|
|
// Store/image and types/generation - disable sorting
|
|
{
|
|
files: ['src/store/image/**/*', 'src/types/generation/**/*'],
|
|
rules: {
|
|
'perfectionist/sort-interfaces': 0,
|
|
'perfectionist/sort-object-types': 0,
|
|
'perfectionist/sort-objects': 0,
|
|
},
|
|
},
|
|
// CLI scripts
|
|
{
|
|
files: ['scripts/**/*'],
|
|
rules: {
|
|
'unicorn/no-process-exit': 0,
|
|
'unicorn/prefer-top-level-await': 0,
|
|
},
|
|
},
|
|
);
|