@ableco/coding-standards-javascript v0.1.1
@ableco/coding-standards-javascript
Automated linting for Able using https://github.com/ableco/eslint-config
How does it work?
@ableco/coding-standards-javascript requires you to run npx coding-standards-javascript in your project's root directory to copy ESLint and Prettier configuration files.
It also installs @arkweid/lefthook to copy a lefthook.yml file to run ESLint and Prettier based on @ableco/eslint-config configuration in a pre-commit stage.
In case any of these configuration files already exists, they should be updated manually to reflect the contents of the ones provided by @ableco/coding-standards-javascript (for example, in case a project already has an ESLint configuration file).
Installation
Using yarn:
yarn add @ableco/coding-standards-javascript --dev
Using npm:
npm install @ableco/coding-standards-javascript --save-dev
Usage
Run npx coding-standards-javascript and follow the instructions.
It will try to copy the following files:
.eslintrc.js.prettierrc.json(or.prettierrc.jsor.prettierrc, in that order)lefthook.yml
In case any of these files already exists, it will shows the content of those files in the console's output and let you copy and paste those configurations manually.
For husky users
In case your project already uses husky we recommend you to uninstall it by running:
npm uninstall husky
To remove any git hook previously added by husky.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ableco/coding-standards-javascript.