Skip to content

laststance/eslint-config-ts-prefixer

Repository files navigation

eslint-config-ts-prefixer 🌈

npm downloads Lint

Ruleset of meaningful Lint rules on runtime and import formatters. eslint-plugin-import-x


This setup is:

Oxlint package

This repository also publishes oxlint-config-ts-prefixer, a native-first Oxlint package with optional type-aware rules and Oxfmt import sorting.

The package is currently available from npm under the beta dist-tag:

pnpm add -D oxlint-config-ts-prefixer@beta oxlint

Requirements

  • Node.js 20.11.0 or higher
  • ESLint v9
  • TypeScript v5 or v6.0 and a tsconfig.json file

Installation

If you are using ESLint v8, please follow eslint-config-ts-prefixer@1.14.2 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.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

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

Code of conduct

Stars

Watchers

Forks

Releases

Sponsor this project

Used by

Contributors

Languages