Skip to content

Commit

Permalink
feat(config): consolidate plugin:vitest/recommended (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
csantiago132 authored Dec 9, 2024
1 parent b9dd962 commit f78fac6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions src/eslint/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const sharedEslintConfig = {
};

export const typescriptLanguageOptions = {
extends: ['plugin:vitest/recommended'],
files: sharedEslintConfig.TYPESCRIPT_FILES,
languageOptions: {
globals: {
Expand Down
14 changes: 0 additions & 14 deletions src/eslint/eslint.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit f78fac6

Please sign in to comment.