eslint-config-ts-prefixer
v4.2.0
Published
Ruleset of meaningful Lint rules on runtime with import organization. (eslint-plugin-import-x)
Readme
This setup is:
- 📦 Zero extend for explicit rules.
- 💅 specialized fixable
importrules. - ✅ Meamingful rules code behavior than which syntax sugar is good.
Requirements
- Node.js 20.11.0 or higher
- ESLint v9
- TypeScript v5 and
tsconfig.jsonfile
Installation
If you are using ESLint v8, please follow [email protected] Installation guide.
1. install necessary packages.
- pnpm
pnpm add -D eslint-config-ts-prefixer@latest- npm
npm install --save-dev eslint-config-ts-prefixer@latest- yarn
yarn add -D eslint-config-ts-prefixer2. Add eslint-config-ts-prefixer to eslint.config.js in your project.
import { defineConfig } from 'eslint/config'
import tsPrefixer from 'eslint-config-ts-prefixer'
export default defineConfig([
...tsPrefixer,
{
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname, // get user tsconfig.json dirname
},
},
},
])3. Add lint script to package.json in your project.
{
"scripts": {
"lint": "eslint . --concurrency=auto --max-warnings=0",
"lint:fix": "eslint . --fix --concurrency=auto --max-warnings=0"
}
}That's all, you are ready to use!
just run npm run lint:fix to apply this package's configurations! 🎉
Explore All Lint Rules
config
https://github.com/laststance/eslint-config-ts-prefixer/blob/main/eslint.config.mjs
Docs
https://website-eslint-config-ts-prefixer.vercel.app/
LICENSE
Contributors ✨
Thanks goes to these wonderful people (emoji key):
