This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@gcoguiec/eslint-config-typescript

1.0.8 • Public • Published

@gcoguiec/eslint-config-typescript


ESLint Logo

A rather strict ESLint TypeScript configuration.

Version CI Status


  • Single quotes, semicolons.
  • Based on the reasonable eslint-config-base configuration.
  • Strict by default (and therefore opinionated) rules.

Table of Contents

Getting Started

Install

pnpm add -D eslint eslint-plugin-import eslint-plugin-promise @typescript-eslint/eslint-plugin @typescript-eslint/parser @gcoguiec/eslint-config-typescript

Register the configuration with eslint

Edit your .eslintrc configuration file (you may have to create the file at your project root if it's missing) with the following :

{
  "extends": "@gcoguiec/eslint-config-typescript"
}

(Optional) Configure your tsconfig.json file

For stricter compilation checks, you can set the following rules in your tsc configuration file:

{
  "compilerOptions": {
    "strict": true,
    "strictNullChecks": true,
    "allowUnusedLabels": false,
    "allowUnreachableCode": false,
    "exactOptionalPropertyTypes": true,
    "noUncheckedIndexedAccess": true,
    "noUnusedParameters": true,
    "noUnusedLocals": true,
    "noImplicitReturns": true,
    "noImplicitOverride": true,
    "noFallthroughCasesInSwitch": true,
    "forceConsistentCasingInFileNames": true,
    "importsNotUsedAsValues": "error"
  }
}

(Optional) Add the scripts to your package.json file

{
  "scripts": {
    "lint": "eslint . --ignore-path .gitignore",
    "lint:fix": "pnpm lint --fix"
  }
}

Note: you can replace pnpm with your favorite package manager instead.

(Optional) Add the tasks to your justfile

lint *args:
  pnpm eslint . --ignore-path .gitignore {{args}}

lint-fix:
  @just lint --fix

See Also

Other ESLint configurations you may want to look at:

License

This package is licensed under BSD 2-Clause.

Readme

Keywords

Package Sidebar

Install

npm i @gcoguiec/eslint-config-typescript

Weekly Downloads

0

Version

1.0.8

License

BSD-2-Clause

Unpacked Size

10.5 kB

Total Files

5

Last publish

Collaborators

  • gcoguiec