@dylannormandin/eslint-config
v0.0.1
Published
Shared ESLint configuration for Bubbly projects
Maintainers
Readme
@dylannormandin/eslint-config
Flat ESLint config for projects with client/server or frontend/backend code, TypeScript, React, Tailwind, and absolute imports.
Install
npm i -D eslint @dylannormandin/eslint-config eslint-plugin-import eslint-import-resolver-typescript eslint-plugin-tailwindcss typescriptUsage (flat config)
Create eslint.config.js at your project root:
import base from '@dylannormandin/eslint-config';
export default base;Run ESLint:
npx eslint . --max-warnings=0
# or
npx eslint . --fixClient/Server layout
If your folders are client/ and server/ (instead of frontend/ and backend/), remap the patterns:
import base from '@dylannormandin/eslint-config';
const remap = (entry) => {
const map = (p) => typeof p === 'string'
? p.replace(/^frontend\//, 'client/').replace(/^backend\//, 'server/')
: p;
return {
...entry,
files: entry.files?.map(map),
ignores: entry.ignores?.map(map),
};
};
export default base.map(remap);TypeScript paths / absolute imports
Ensure your project tsconfig.json has the right resolver settings (example):
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"baseUrl": ".",
"paths": { "@/*": ["client/src/*"] },
"jsx": "react-jsx"
},
"include": ["client/**/*", "server/**/*"]
}Tailwind
The config enables Tailwind rules and expects tailwind.config.js at your project root. If your config file is elsewhere, tell the resolver via an override.
Notes
- This package exports a flat config (eslint.config.js).
.eslintrc.*is legacy and not supported here. - Install the config as a devDependency in each project where you run ESLint, or at monorepo root if you lint from the root.
