0.0.2 • Published 5 years ago

eslint-config-ruairi v0.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

@mcklabs/eslint-config-mcklabs-ts

A shared eslint configuration for mcklabs TypeScript based projects.

Usage

Install this and its required plugins as development dependencies. We will also install our shared prettier configuration.

npm i -D @mcklabs/eslint-config-mcklabs-ts eslint-plugin-prettier @typescript-eslint/eslint-plugin @mcklabs/prettier-config

It is also important to have prettier, typescript and eslint installed. If you don't have them already run:

npm i -D prettier typescript eslint

To apply the shanred setting you need to have an eslint configuration file that extends from @mcklabs/eslint-config-mcklabs-ts

Here is an example.

A file at the root of your project called: .eslintrc

With this content:

{
  "extends": "@mcklabs/eslint-config-mcklabs-ts"
}

Next you need to add a lint task to your package.json. Here is an example:

"scripts": {
    "lint": "tsc --noEmit && eslint \"src/**/*.{js,ts}\" --quiet --fix",
    ... other scripts
}