Skip to content

keep-network/eslint-config-keep

Repository files navigation

eslint-config-keep

ESLint shareable config for Keep, based off the Google JavaScript style guide (ES2015+ version).

Installation

npm i https://github.com/keep-network/eslint-config-keep.git

Usage

Setting up a project

  1. Install the linter and config - npm i -D eslint https://github.com/keep-network/eslint-config-keep.git
  2. Create your .eslintrc:
{
 "extends": "eslint-config-keep",
 "rules": {
   // Additional, per-project rules...
 },
}
  1. Add commands for linting to your package.json:
{
 "scripts": {
   "lint:js": "eslint .",
   "lint:js:fix": "eslint --fix ."
 },
}

Adding a pre-commit hook using pre-commit

 - repo: local
   hooks:
    - id: lint-js
      name: 'lint js'
      entry: /usr/bin/env bash -c "npm run js:lint"
      files: '\.js$'
      language: script
      description: "Checks JS code according to the package's linter configuration"

About

ESLint shareable config for Keep, based off the Google JavaScript style guide

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •