Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haraka/haraka-eslint
eslint rules for Haraka projects
https://github.com/haraka/haraka-eslint
eslint haraka haraka-eslint
Last synced: 8 days ago
JSON representation
eslint rules for Haraka projects
- Host: GitHub
- URL: https://github.com/haraka/haraka-eslint
- Owner: haraka
- License: mit
- Created: 2016-10-07T03:55:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T01:11:55.000Z (7 months ago)
- Last Synced: 2024-11-05T01:51:27.681Z (14 days ago)
- Topics: eslint, haraka, haraka-eslint
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@haraka/eslint-config
- Size: 37.1 KB
- Stars: 2
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# haraka-eslint
[![Build Status][ci-img]][ci-url]
[![Code Climate][clim-img]][clim-url][![NPM][npm-img]][npm-url]
## Install
In your Haraka module:
1. Add to NPM dependencies:
`npm install --save-dev @haraka/eslint-config`
2. Configure eslint:
```sh
cat < .eslintrc.yaml
env:
node: true
es6: true
es2022: true
extends: "@haraka"
EOLINT
```3. Add to the "scripts" section of `package.json`:
```json
"lint": "npx eslint@8 *.js test"
"lint:fix": "npx eslint@8 --fix *.js test"
```4. Within your CI workflow:
`npm run lint`
## Usage
To check your project against lint rules:
`npm run lint`
Step #4 above does this automatically when CI tests are set up.
If you agree with the lint suggestions, you can run `npm run lint:fix` and the changes will be made to your files automatically.
Custom rules can be added to the .eslintrc file.
[ci-img]: https://github.com/haraka/haraka-eslint/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-eslint/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-eslint/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-eslint
[npm-img]: https://nodei.co/npm/@haraka/eslint-config.png
[npm-url]: https://www.npmjs.com/package/@haraka/eslint-config