From eceb58af6f91e2c3f92d4655a75a7d8307b9872a Mon Sep 17 00:00:00 2001 From: Verite Mugabo Date: Mon, 8 Apr 2024 13:41:55 -0400 Subject: [PATCH] chore(update-configs): eslint.config.js --- eslint.config.js | 42 +++++++++++++----------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 6bed1ea..de36c78 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,34 +1,18 @@ -// @ts-check - -import eslint from '@eslint/js' -import eslintPlugin from 'eslint-plugin-eslint-plugin' -import nodePlugin from 'eslint-plugin-n' -import stylistic from '@stylistic/eslint-plugin' -import tseslint from 'typescript-eslint' -import babelParser from '@babel/eslint-parser' +import vitest from 'eslint-plugin-vitest' export default [ { - languageOptions: { - parser: babelParser, - parserOptions: { - requireConfigFile: false, - sourceType: 'module', - babelOptions: { - babelrc: false, - configFile: false, - presets: ['@babel/preset-env'], - }, - }, + files: ['tests/**'], // or any other pattern + plugins: { + vitest }, - }, - ...tseslint.config(eslint.configs.recommended, - ...tseslint.configs.recommended), - eslintPlugin.configs['flat/recommended'], - nodePlugin.configs['flat/recommended-script'], - stylistic.configs.customize({ - quotes: 'single', - semi: false, - commaDangle: 'always-multiline', - }), + rules: { + ...vitest.configs.recommended.rules + }, + languageOptions: { + globals: { + ...vitest.environments.env.globals + } + } + } ]