The README documents ESLint entry points that don't exist in package.json, so every ESLint example in it fails except the Node/backend one.
What's wrong
package.json exports exactly one ESLint path:
"./eslint": "./eslint/config.mjs"
The README's "What's included" table advertises three:
| Documented path |
Reality |
./eslint/base |
not exported |
./eslint/svelte |
not exported |
./eslint/nextjs |
not exported |
Verified against an actual install (bun add -d github:DavidTeju/dev-config):
OK @davidteju/dev-config/eslint
FAILS @davidteju/dev-config/eslint/base -> ERR_MODULE_NOT_FOUND
FAILS @davidteju/dev-config/eslint/svelte -> ERR_MODULE_NOT_FOUND
FAILS @davidteju/dev-config/eslint/nextjs -> ERR_MODULE_NOT_FOUND
Every other documented subpath resolves fine — prettier/*, vitest/*, lint-staged/*, knip/base all import cleanly. The problem is limited to the ESLint entries.
The named exports are wrong too
It isn't only the paths. eslint/config.mjs has a single export:
export async function createConfig(options = {}) { ... }
So these README snippets can't work even with the path corrected, because the named exports don't exist:
// "SvelteKit" section — svelteConfig is not exported
import { svelteConfig } from '@davidteju/dev-config/eslint/svelte';
// "Next.js" section — none of these are exported
import {
strictRules,
testFileOverrides,
vitestTestOverrides,
scriptFileOverrides,
} from '@davidteju/dev-config/eslint/nextjs';
The real API is createConfig({ framework: 'svelte' | 'nextjs', typeChecked, svelteConfig }), which composes those pieces internally and returns the full config array.
Why it matters
The "Node / backend services" section is the only ESLint example that works today, and it happens to be correct:
import { createConfig } from '@davidteju/dev-config/eslint';
export default await createConfig({ typeChecked: true });
Anyone following the Svelte or Next.js sections — the two frameworks this package explicitly supports — hits ERR_MODULE_NOT_FOUND immediately.
It reads like the package was refactored to a single createConfig factory and the README wasn't updated with it.
Fix
Either update the README to document the createConfig API for all three cases, or add the subpath exports and matching named exports back to package.json so the docs become true. The README change is the smaller one.
While in there: knip/base, knip/svelte, knip/nextjs are exported but missing from the "What's included" table.
Found via
Setting up ESLint on a Vite + React + Bun project. Worth noting separately: createConfig only branches on svelte and nextjs, so a plain React project gets no react plugin — react-hooks/rules-of-hooks and react-hooks/exhaustive-deps are both absent. Filing that as its own issue if wanted.
The README documents ESLint entry points that don't exist in
package.json, so every ESLint example in it fails except the Node/backend one.What's wrong
package.jsonexports exactly one ESLint path:The README's "What's included" table advertises three:
./eslint/base./eslint/svelte./eslint/nextjsVerified against an actual install (
bun add -d github:DavidTeju/dev-config):Every other documented subpath resolves fine —
prettier/*,vitest/*,lint-staged/*,knip/baseall import cleanly. The problem is limited to the ESLint entries.The named exports are wrong too
It isn't only the paths.
eslint/config.mjshas a single export:So these README snippets can't work even with the path corrected, because the named exports don't exist:
The real API is
createConfig({ framework: 'svelte' | 'nextjs', typeChecked, svelteConfig }), which composes those pieces internally and returns the full config array.Why it matters
The "Node / backend services" section is the only ESLint example that works today, and it happens to be correct:
Anyone following the Svelte or Next.js sections — the two frameworks this package explicitly supports — hits
ERR_MODULE_NOT_FOUNDimmediately.It reads like the package was refactored to a single
createConfigfactory and the README wasn't updated with it.Fix
Either update the README to document the
createConfigAPI for all three cases, or add the subpath exports and matching named exports back topackage.jsonso the docs become true. The README change is the smaller one.While in there:
knip/base,knip/svelte,knip/nextjsare exported but missing from the "What's included" table.Found via
Setting up ESLint on a Vite + React + Bun project. Worth noting separately:
createConfigonly branches onsvelteandnextjs, so a plain React project gets no react plugin —react-hooks/rules-of-hooksandreact-hooks/exhaustive-depsare both absent. Filing that as its own issue if wanted.