Detalhes do pacote

@roydukkey/eslint-config

roydukkey42MIT3.0.2

My strict configuration for eslint with TypeScript

eslint, eslintconfig

readme (leia-me)

ESLint Config

Release Version License

Use this if you like, but I'll probably make changes and might not accept any.

Install

Install the packages:

pnpm add --save-dev \
@roydukkey/eslint-config \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint \
eslint-plugin-tsdoc

Vue

Install the optional peer dependency for linting Vue files.

pnpm add --save-dev eslint-plugin-vue

Configuration

Here is an example for configuring ESLint from the package.json.

{
  "script": {
    "lint": "eslint './**/*.@(?(m|c)@(j|t)s|@(j|t)sx|vue)'",
    "lint:fix": "npm run lint -- --fix"
  },
  "eslintConfig": {
    "extends": "@roydukkey/eslint-config"
  }
}

TypeScript

This package will not use the tsconfig.json and instead only searches for tsconfig.eslint.json files. This provides better support for different monorepos. You can read more about this on typescript-eslint.io.

Also, @typescript-eslint/recommended-requiring-type-checking is applied so don't forget to target the proper environments. For example, the following configuration targets Node:

"eslintConfig": {
  "env": {
    "node": true
  }
}

changelog (log de mudanças)

Changelog

3.0.2

  • Update eslint-plugin-vue added several new rules

3.0.1

  • Fix eslint-plugin-tsdoc implementation

3.0.0

  • Refactor to improve rule inheritance and overrides
  • Adds support for optional Vue linting

2.0.4

  • Only apply recommended-requiring-type-checking to *.ts?(x) and *.{m,c}ts
  • Revert sort-imports member syntax sort order to v1 configuration

2.0.3

  • Disable @typescript-eslint/no-unsafe-call for javascript files

2.0.2

  • Add default ignorePatterns to target "dist"

2.0.1

  • Fix incorrect engine requirements

2.0.0

  • Entire restructure and reevaluation of the applied rules and options

1.0.13

  • Update parserOptions to seek sub-extension configs (e.g. tsconfig.eslint.json)

1.0.12

  • Allow empty catch for no-empty

1.0.11

  • Remove extending redundancies

1.0.10

  • Configure Enum member naming convention to pascal case
  • Allow bitwise expressions in Enums

1.0.9

  • Add support for prefer-template
  • Update no-useless-concat from 'warn' to 'error'
  • Simplify override files pattern

1.0.8

  • Add TypeScript support for space-before-function-paren
  • Update to allow aliases in unions and intersections for @typescript-eslint/no-type-alias

1.0.7

  • Fix conditional types configuration for @typescript-eslint/no-type-alias

1.0.6

  • Update @typescript-eslint/no-type-alias to allow conditional types

1.0.5

  • Move @typescript-eslint/explicit-module-boundary-types to TS override

1.0.4

  • Update @typescript-eslint/member-ordering

1.0.3

  • Update @typescript-eslint/no-this-alias to allow destructuring

1.0.2

  • Turn off @typescript-eslint/prefer-function-type

1.0.1

  • Move no-invalid-this and @typescript-eslint/no-invalid-this to TS override

1.0.0

  • Initial release!