4.2.4 • Published 3 months ago

@espimarisa/eslint-config v4.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@espimarisa/eslint-config

My opinionated TypeScript ESLint config to perform strict type-checking and to enforce best practices.

This is a very strict config that I primarily use for my own projects. If you are not advanced with TypeScript especially, you will likely want to configure a lot of your own rules or look elsewhere. YMMV!

Highlights

  • Opinionated default import order
  • Native prettier support configurable by your .prettierrc
  • Native TypeScript support with the strictest type-checking rules enabled

Installation

pnpm add -D eslint prettier eslint-config-prettier eslint-plugin-prettier eslint-plugin-import eslint-plugin-unicorn eslint-plugin-n eslint-plugin-promise eslint-plugin-security @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-import-resolver-typescript

# Install the main config last
pnpm add -D @espimarisa/eslint-config

Setup

// .eslintrc.cjs
module.exports = {
  extends: "@espimarisa/eslint-config",
  // Custom rules
  rules: {},
};

TypeScript Monorepos

If you are using a monorepo or your tsconfig is not at root/tsconfig.json, you will need to override parserOptions.project for TypeScript functionality to work properly.

module.exports = {
  extends: "@espimarisa/eslint-config",
  overrides: [
    {
      parserOptions: {
        parser: "@typescript-eslint/parser",
      },
    },
  ],
};

Ignoring

As ESLint doesn't use items in ignoredPatterns for sharable configs, you'll have to set this up yourself, and per-package if you're working with a monorepo.

.eslintignore

# https://eslint.org/docs/user-guide/configuring/ignoring-code
node_modules # This should always be ignored by default
dist # TypeScript default output directory
# anything else you want to ignore

License

MIT

4.2.4

3 months ago

4.2.3

4 months ago

4.2.2

4 months ago

4.2.1

4 months ago

4.2.0

8 months ago

4.1.6

8 months ago

4.1.5

9 months ago

4.1.4

9 months ago

4.1.3

9 months ago

4.1.2

9 months ago

4.1.1

9 months ago

4.1.0

9 months ago

4.0.0

9 months ago