Skip to content

Latest commit

 

History

History

README.md

eslint-config-airlight-base

ESLint configure for base focused on code quality, security and performance on top of eslint-config-airbnb-typescript/base.

Now compatible with oxlint and biome configuration

Installation

npm install eslint-config-airlight-base --save-dev
# or
yarn add eslint-config-airlight-base -D

Peer dependencies

Dependencies

Dependencies reason

  • eslint-config-airbnb-typescript - Main config
  • @typescript-eslint/eslint-plugin - Config for TypeScript codebase
  • eslint-config-prettier - Prettier config
  • eslint-plugin-import - ESLint plugin with rules that help validate proper imports
  • eslint-plugin-no-secrets - secrets/credentials finder/matched plug-in for ESLint

Usage

Legacy config

// .eslintrc
{
  "extends": "airlight-base/legacy"
}

Flat config

// eslint.config.js
import airlightBase from 'eslint-config-airlight-base';

export default [
  ...airlightBase
  // your rules
];

oxlint

If you are using eslint + oxlint combo, see here and follow guide

// .oxlintrc.json
{
  "extends": ["./node_modules/eslint-config-airlight-base/oxlintrc.json"],
  "rules": {
    "@typescript-eslint/no-var-requires": "off",
    "complexity": ["error", { "max": 7 }],
    "max-lines-per-function": [
      "error",
      { "max": 48, "skipBlankLines": true, "skipComments": true, "IIFEs": true }
    ]
  },
  "ignorePatterns": [".history", ".release-me", "scripts"]
}
oxlint

biome

If you are using eslint + biome combo, see here and follow guide

// biome.json
{
  "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
  "extends": ["eslint-config-airlight-base/biome.json"]
}
biome check . --write

Rules

We customized following rules.

Change these flat config or legacy config by your needs

License

MIT