A shared configuration package for ESLint, Prettier, and TypeScript. This package enforces strict coding standards to ensure uniform code style and prevent subtle bugs.
- Strict ESLint, Prettier, and TypeScript settings.
- Scripts for linting and cleaning the project
To configure the package, use the following package.json
or merge it with your current one:
{
"type": "module",
"scripts": {
"dev": "x ...",
"fix": "shared-config-fix",
"lint": "shared-config-lint",
"setup": "shared-config-setup"
},
"devDependencies": { "@mp281x/shared-config": "latest" },
"pnpm": { "peerDependencyRules": { "allowedVersions": { "eslint": "*" } } }
}
Put these configs in the respective files
{
"extends": ["@mp281x/shared-config/tsconfig"],
"include": ["index.ts", "src/**/*", "*.config.*"],
"exclude": ["**/node_modules", "**/.*/", "**/dist"]
}
export { default } from '@mp281x/shared-config/eslint'
export { default } from '@mp281x/shared-config/prettier'
# svlete/next files
**/build
**/.svelte-kit
**/.next
**/next-env.d.ts
# generated files
**/*.g.ts
**/.eslintcache
**/*.tsbuildinfo
# vite
**/vite.config.js.timestamp-*
**/vite.config.ts.timestamp-*
# other files/folders
**/.env
**/.DS_Store
**/node_modules
**/pnpm-lock.yaml
This package includes a CLI for filtering and highlighting useful information from the logs of other tools.
Prepend your command with x
{
"scripts": "x next dev --turbo"
}
pnpm run x next dev --turbo