Watch
1
0
Fork
You've already forked eslint-config
0
mirror of https://github.com/fledra/eslint-config.git synced 2026-12-04 02:50:30 +03:00
One opinionated config for ESLint.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-01 17:24:18 +03:00
.github/workflows chore: fixed release workflow pnpm setup 2026-08-31 11:51:10 +03:00
.husky chore: initial commit 2025-04-03 03:08:49 +03:00
scripts feat!: drop jsx option from config 2026-09-01 06:54:14 +03:00
src fix: relax eslint-comments/disable-enable-pair to allow whole files 2026-09-01 17:14:42 +03:00
test chore: fixed test files 2026-03-09 00:23:49 +03:00
.gitattributes chore: force eol to be lf 2025-10-06 20:38:24 +03:00
.gitignore chore: ignore built fixture snapshots 2025-04-23 01:08:02 +03:00
.lintstagedrc chore: update deps to latest 2026-08-31 04:37:46 +03:00
eslint.config.ts chore: added the test file & some fixtures 2025-04-04 05:55:17 +03:00
LICENSE chore: initial commit 2025-04-03 03:08:49 +03:00
package.json chore: release v4.0.0 2026-09-01 17:24:18 +03:00
pnpm-lock.yaml feat: integrate eslint-plugin-erasable-syntax-only 2026-08-31 11:42:23 +03:00
pnpm-workspace.yaml chore: updated package manager version 2026-08-31 04:14:00 +03:00
README.md feat: dropped eslint-plugin-import-x for eslint-plugin-import-lite 2025-08-26 17:09:51 +03:00
tsconfig.json fix: fixed build errors 2026-03-09 00:17:25 +03:00
tsdown.config.ts fix: renamed tsdown config to have the proper filename 2026-08-31 13:28:14 +03:00
vitest.config.ts chore: initial commit 2025-04-03 03:08:49 +03:00

@fledra/eslint-config

NPM Version

One opinionated config for ESLint.

This config is a refactored/modified version of Anthony Fu's ESLint config. I will not copy every change from his config but I might occasionally yoink the ones I like.

  • ESLint Flat config format
  • Respects .gitignore by default
  • Code style: Minimal for reading, stable for diff, consistent... enough.

Usage

Install

First install eslint and this config:

pnpm i -D eslint @fledra/eslint-config

And create eslint.config.mjs in your project root:

// eslint.config.mjs
import fledra from '@fledra/eslint-config';

export default fledra();

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint",
    "lint:fix": "eslint --fix"
  }
}

Customization

I followed Anthony's config for the most part so configuration options are pretty much the same. Check out customization section of his config for more info.

Important notes about configuration

  • type key does not exist in the configuration object

Plugins Renaming

I thought I did not want any plugin renaming at first but only kept the original name of @typescript-eslint, which was confusing.

From version 2.0.0 onwards plugin renaming is enabled by default.

New Prefix Original Prefix Source Plugin
import/* import-lite/* eslint-plugin-import-lite
node/* n/* eslint-plugin-n
yaml/* yml/* eslint-plugin-yml
ts/* @typescript-eslint/* @typescript-eslint/eslint-plugin
style/* @stylistic/* @stylistic/eslint-plugin

When you want to override rules, or disable them inline, you need to use the new prefix:

-// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
+// eslint-disable-next-line ts/consistent-type-definitions
type foo = { bar: 2 }

Change back to original prefix

If you really want to use the original prefix, you can revert the plugin renaming by:

import fledra from '@fledra/eslint-config';

export default fledra()
  .renamePlugins({
    ts: '@typescript-eslint',
    yaml: 'yml',
    node: 'n'
    // ...
  });

License

MIT License © 2025-PRESENT Baran D. (Fledra)