@jahia/eslint-config v2.1.2
Provide Jahia ESLint shareable config to lint your JS projects.
Install
Add this package to the devDependencies of the project you intend to add ESLint to.
This can be accomplished using yarn with the following command:
yarn add -D @jahia/eslint-configor using npm with the following one:
npm i -D @jahia/eslint-config
Configure
Create a file named .eslintrc.json as a sibling of your package.json, with the following content:
```json
{
"extends": "@jahia"
}
```Update the scripts in your package.json to something like:
```json
{
"build": "yarn lint && yarn webpack",
"lint": "eslint --ext js,jsx .",
"lint:fix": "eslint --ext js,jsx --fix ."
}
```Additionally you may want to add a file .eslintignore as a sibling of your package.json, with the following content:
```
node
node_modules
target
build
```Also depending on your need your can override some rules in the .eslintrc.json file by redefining them.
Many IDE support eslint configuration, do not forget to activate the option
Usage
If you added the scripts in your package.json, you can do:
yarn lintor with npm:
npm run lintAuthor
š¤ Jahia
- Website: https://www.jahia.com
- Twitter: @Jahia
- Github: @Jahia
š¤ Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.
Show your support
Give a āļø if this project helped you!
š License
Copyright Ā© 2019 Jahia. This project is JAHIA'S DUAL LICENSING licensed.
This README was generated with ā¤ļø by readme-md-generator