From f78fac679309c46e677c7b590dda4d72e77002f3 Mon Sep 17 00:00:00 2001 From: Carlos Santiago <5726971+csantiago132@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:55:08 -0600 Subject: [PATCH] feat(config): consolidate plugin:vitest/recommended (#84) --- src/eslint/constants.js | 1 + src/eslint/eslint.base.js | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) 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: {