Skip to content

laststance/eslint-config-ts-prefixer

Repository files navigation

eslint-config-ts-prefixer 🌈

npm Lint

Ruleset of meaningful Lint rules on runtime and beautiful formatters. (prettier & eslint-plugin-import)


This setup is:

  • 📦 Zero extend for explicit rules.
  • 💅 Prettier integration, specialized fixable import rules.
  • 🏠 Use user's existing .prettierrc directly.
  • ✅ Meamingful rules code behavior than which syntax sugar is good.

cover_image


Requirements

  • Node.js 20.11.0 or higher
  • ESLint v9
  • TypeScript v5 and tsconfig.json file
  • Prettier v3 and .prettierrc file

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-prefixer

2. Add eslint-config-ts-prefixer to eslint.config.mjs in your project.

// eslint.config.mjs or eslint.config.js
import { defineConfig } from 'eslint/config'
import tsPrefixer from 'eslint-config-ts-prefixer'

export default defineConfig([...tsPrefixer])

3. Add lint script to package.json in your project.

{
  "scripts": {
    "lint": "eslint . -c eslint.config.mjs",
    "lint:fix": "eslint . -c eslint.config.mjs --fix"
  }
}

That's all, you are ready to use!

just run npm run lint:fix to apply this package's configurations! 🎉

If you use VSCode,Cursor and ESLint Extension,
you can get great developer experience with the shortcut.
And Webstorm native support ESLint.

config


Perform on Webstorm(as same as VSCode, Cursor)

autofix

Explore All Lint Rules

TBD

LICENSE

MIT

Contributors ✨

Thanks goes to these wonderful people (emoji key):


ryota-murakami

💻 📖 ⚠️

About

Ruleset of meaningful Lint rules on runtime and beautiful formatters.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Contributors 6