@lehoczky/eslint-config-vitest
v1.0.4
Published
[![npm version](https://badge.fury.io/js/@lehoczky%2Feslint-config-vitest.svg)](https://badge.fury.io/js/@lehoczky%2Feslint-config-vitest)
Downloads
349
Readme
Eslint Config Vitest
ESLint configuration for project using vitest. Compared to other configs in this repository, this one cannot be used on its own, it needs another config as a base, like @lehoczky/eslint-config-base
or @lehoczky/eslint-config-typescript
.
💿 Installation
pnpm add -D vitest @lehoczky/eslint-config-vitest
💻 Usage
eslint.config.mjs
:
import { configLehoczkyJavascript } from "@lehoczky/eslint-config-base"
import { configLehoczkyVitest } from "@lehoczky/eslint-config-vitest"
/** @type {import("eslint").Linter.Config[]} */
export default [...configLehoczkyJavascript(), ...configLehoczkyVitest()]
Specify test files
This config tries to find test files on its own, but you can specify a glob manually as well:
import { configLehoczkyVitest } from "@lehoczky/eslint-config-vitest"
import { configLehoczkyVue } from "@lehoczky/eslint-config-vue"
/** @type {import("eslint").Linter.Config[]} */
export default [
...configLehoczkyJavascript(),
...configLehoczkyVitest({
files: ["test/**/*.ts"],
}),
]