Take the lint error out of main (#6)
`npm run lint` fails on main, and has since CI was added, so every pull
request opened against it starts red for a reason that has nothing to do
with the change in it. Two unrelated PRs came back with the same failure,
which is how it was found.
vite.config.ts
1:1 error Do not use a triple slash reference for vitest/config,
use `import` style instead
The reference was doing one job: putting the `test` key in scope for
defineConfig. Importing defineConfig from vitest/config rather than vite
does the same job in the style the rule asks for, and the file already
imported configDefaults from there on the next line.
This commit is contained in:
+4
-3
@@ -1,6 +1,7 @@
|
|||||||
/// <reference types="vitest/config" />
|
// defineConfig comes from vitest/config rather than vite, which is what puts
|
||||||
import { configDefaults } from 'vitest/config'
|
// the `test` key below in scope. It replaces a triple-slash reference that did
|
||||||
import { defineConfig } from 'vite'
|
// the same job and that eslint rejects.
|
||||||
|
import { configDefaults, defineConfig } from 'vitest/config'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
import tailwindcss from '@tailwindcss/vite'
|
import tailwindcss from '@tailwindcss/vite'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|||||||
Reference in New Issue
Block a user