diff --git a/src/eslint/constants.js b/src/eslint/constants.js index abded8a..9b0bb8e 100644 --- a/src/eslint/constants.js +++ b/src/eslint/constants.js @@ -39,6 +39,7 @@ export const sharedEslintConfig = { }; export const typescriptLanguageOptions = { + extends: ['plugin:vitest/recommended'], files: sharedEslintConfig.TYPESCRIPT_FILES, languageOptions: { globals: { diff --git a/src/eslint/eslint.base.js b/src/eslint/eslint.base.js index b02e174..701209f 100644 --- a/src/eslint/eslint.base.js +++ b/src/eslint/eslint.base.js @@ -6,34 +6,20 @@ * * Explore our open-source projects: {@link https://github.com/kurocado-studio} */ -import eslintPluginImport from 'eslint-plugin-import'; -import vitestRecommended from 'eslint-plugin-vitest'; import globals from 'globals'; import { JS_EXTENSIONS_PREFIX, TS_EXTENSIONS_PREFIX, javascriptLanguageRootConfig, - sharedEslintConfig, typescriptLanguageRootConfig, } from './constants.js'; import { unicornConfig } from './rules/base/unicorn.js'; -const { JAVASCRIPT_TEST_FILES, TYPESCRIPT_TEST_FILES } = sharedEslintConfig; - export const eslintBaseConfig = [ ...unicornConfig.overrides, javascriptLanguageRootConfig, typescriptLanguageRootConfig, - { - env: { node: true }, - extends: ['plugin:vitest/recommended'], - files: [...TYPESCRIPT_TEST_FILES, ...JAVASCRIPT_TEST_FILES], - plugins: { - import: eslintPluginImport, - vitest: vitestRecommended, - }, - }, { files: [`vite.*.${TS_EXTENSIONS_PREFIX}`], rules: {