From 0d48436cfcdab566e7c2c7baa28d87c896662ea7 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 26 Mar 2024 10:16:55 +0100 Subject: [PATCH] fix lint --- packages/vite/src/compat-styles.ts | 16 +++++++--------- tests/scenarios/vite-app-test.ts | 2 +- tests/vite-app/vite.config.mjs | 8 ++++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/vite/src/compat-styles.ts b/packages/vite/src/compat-styles.ts index 7bb682bb6e..bd65945971 100644 --- a/packages/vite/src/compat-styles.ts +++ b/packages/vite/src/compat-styles.ts @@ -3,7 +3,6 @@ import { join } from 'path'; import { existsSync } from 'fs'; export function compatScss() { - const resolverLoader = new ResolverLoader(process.cwd()); const pathsImporter = () => { @@ -29,23 +28,22 @@ export function compatScss() { } if (existsSync(newPath)) { return { - file: newPath + file: newPath, }; } } - return null + return null; } return (url: string, _prev: any, done: any) => { - search(url).then(done).catch(() => done(null)); + search(url) + .then(done) + .catch(() => done(null)); }; }; return { alias: [], importer: [pathsImporter()], - includePaths: [ - process.cwd(), - join(process.cwd(), 'node_modules'), - ], - } + includePaths: [process.cwd(), join(process.cwd(), 'node_modules')], + }; } diff --git a/tests/scenarios/vite-app-test.ts b/tests/scenarios/vite-app-test.ts index 665a874349..f3d2ee8f6c 100644 --- a/tests/scenarios/vite-app-test.ts +++ b/tests/scenarios/vite-app-test.ts @@ -34,7 +34,7 @@ viteAppScenarios .my-style { color: blue } - ` + `, }, }, }); diff --git a/tests/vite-app/vite.config.mjs b/tests/vite-app/vite.config.mjs index 9b56a16454..72ee7bf5a5 100644 --- a/tests/vite-app/vite.config.mjs +++ b/tests/vite-app/vite.config.mjs @@ -6,7 +6,7 @@ import { templateTag, optimizeDeps, compatPrebuild, - compatScss + compatScss, } from "@embroider/vite"; import { resolve } from "path"; import { babel } from "@rollup/plugin-babel"; @@ -36,9 +36,9 @@ export default defineConfig({ }), ], css: { - preprocessorOptions: { - scss: compatScss(), - }, + preprocessorOptions: { + scss: compatScss(), + }, }, optimizeDeps: optimizeDeps(), server: {