Skip to content

Latest commit

 

History

History

eslint-config

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

eslint-config NPM version

New High Score shareable config for ESLint

Installation

Install ESLint and @newhighsco/eslint-config:

npm install --save-dev eslint @newhighsco/eslint-config

Prettier

@newhighsco/eslint-config should be used in conjunction with Prettier. See the @newhighsco/prettier-config installation guide for more details.

Usage

New High Score ESLint rules come bundled in @newhighsco/eslint-config. To enable these rules, add an eslintConfig property in your package.json. See the ESLint configuration docs for more details.

"eslintConfig": {
  "extends": ["@newhighsco"]
}

Now you can run ESLint by adding the following scripts to your package.json. See the ESLint CLI docs for more details.

"scripts": {
  "lint:js": "eslint --cache --ignore-path .gitignore .",
  "format:js": "yarn lint:js --fix"
}

Lint it:

yarn lint:js

Format it:

yarn format:js