Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keep-network/eslint-config-keep
ESLint shareable config for Keep, based off the Google JavaScript style guide
https://github.com/keep-network/eslint-config-keep
Last synced: 18 days ago
JSON representation
ESLint shareable config for Keep, based off the Google JavaScript style guide
- Host: GitHub
- URL: https://github.com/keep-network/eslint-config-keep
- Owner: keep-network
- Created: 2019-06-06T11:28:11.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T03:49:52.000Z (almost 3 years ago)
- Last Synced: 2024-04-13T00:15:12.069Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 200 KB
- Stars: 1
- Watchers: 11
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-config-keep
> ESLint [shareable config](http://eslint.org/docs/developer-guide/shareable-configs.html) for Keep, based off the [Google JavaScript style guide (ES2015+ version)](https://google.github.io/styleguide/jsguide.html).
## 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`:
```js
{
"extends": "eslint-config-keep",
"rules": {
// Additional, per-project rules...
},
}
```
3. Add commands for linting to your `package.json`:
```json
{
"scripts": {
"lint:js": "eslint .",
"lint:js:fix": "eslint --fix ."
},
}
```### Adding a pre-commit hook using [pre-commit](https://pre-commit.com)
```yaml
- 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"
```