@ethang/eslint-config
TypeScript icon, indicating that this package has built-in type declarations

22.13.6 • Public • Published

Relentless. Unapologetic.

View Config

[!CAUTION] Prettier is already included for styling!

Add Even More!

Install

pnpm i -D eslint typescript-eslint @ethang/eslint-config

Requires TypesScript and tsconfig.json at root directory.

Config

In eslint.config.ts

import config from "@ethang/eslint-config/eslint.config.js";
import tseslint from "typescript-eslint";
import astroConfig from "@ethang/eslint-config/config.astro.js"; // OPTIONAL
import reactConfig from "@ethang/eslint-config/config.react.js"; // OPTIONAL

export default tseslint.config(
  {
    ignores: [], // Ignored files apply to all following configs
  },
  ...config,
  ...astroConfig,
  ...reactConfig,
  {
    languageOptions: {
      parserOptions: {
        project: true,
        tsconfigRootDir: import.meta.dirname,
      },
    },
    rules: {
      // Override rules from above configs
    },
  }
);

Scripts

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

Browserslist

This config will also lint for browserslist features. More info.

It's recommended to use browserslist-config-baseline

pnpm i -D browserslist-config-baseline
"browserslist": [
  "extends browserslist-config-baseline",
  "current node"
],

Or a simpler config without an additional dependency.

"browserslist": [
  "defaults and fully supports es6-module",
  "current node"
],

Engines

"engines": {
  "node": ">=22"
},

Readme

Keywords

none

Package Sidebar

Install

npm i @ethang/eslint-config

Weekly Downloads

650

Version

22.13.6

License

ISC

Unpacked Size

134 kB

Total Files

24

Last publish

Collaborators

  • eglove