Skip to content

CodingSans/eslint-config-codingsans

Repository files navigation

npm version MIT license

eslint-config-codingsans

Sharable eslint config created and used by CodingSans

ESLINT Version

This config created for eslint 8

Installation

yarn add -D eslint prettier @codingsans/eslint-config

or

npm install --save-dev eslint prettier @codingsans/eslint-config

Usage

Add .eslintrc.json:

{
  "extends": ["@codingsans/eslint-config/ts-recommended"]
}

Run:

eslint . --ext .ts

Included Configurations

  • @codingsans/eslint-config/ts-recommended: Recommended base configuration for typescript projects
  • @codingsans/eslint-config/next-recommended: Recommended configuration for NextJS apps
  • @codingsans/eslint-config/angular-recommended: Recommended configuration for Angular 12+ apps

VSCode settings

Add the dbaeumer.vscode-eslint extension to the vscode, and thats all.

You could add this to your settings, to have auto-format, and auto import organize.

{
  "[typescript]": {
    "editor.defaultFormatter": "dbaeumer.vscode-eslint"
  },
  "eslint.enable": true,
  "editor.codeActionsOnSave": [
    "source.organizeImports",
    "source.fixAll"
  ],
}