no-empty-ssr-noexternal
Disallow empty ssr.noExternal arrays in committed Vite config.
Rule catalog ID: R061
Targeted pattern scopeโ
vite.config.*ssr.noExternal
What this rule reportsโ
This rule reports explicit ssr.noExternal: [] assignments in supported config files.
Why this rule existsโ
An empty ssr.noExternal list is effectively a no-op and often indicates unfinished tuning.
Removing no-op config improves signal and keeps intent clear.
โ Incorrectโ
import { defineConfig } from "vite";
export default defineConfig({
ssr: {
noExternal: [],
},
});
โ Correctโ
import { defineConfig } from "vite";
export default defineConfig({
ssr: {
noExternal: ["some-dep"],
},
});
Behavior and migration notesโ
- this rule checks static array literals only
- remove
ssr.noExternalentirely when unused
ESLint flat config exampleโ
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.configs];
When not to use itโ
Disable this rule only if your team intentionally keeps explicit empty placeholders in SSR config.