eslint-config-whisp
v1.0.24
Published
In order to start auto linting and formatting, run the command `whisp-eslint-install` (located in /node_modules/.bin/).
Downloads
7
Readme
##Usage:
In order to start auto linting and formatting, run the command whisp-eslint-install
(located in /node_modules/.bin/).
Create React app support
If using Create react app, and you want to integrate our linting rules to the dev-server:
- Install
react-app-rewired
,customize-cra
. - Add the following to your
config-overrides.js
file:
const { override } = require('customize-cra');
const { addEslintBaseConfig, addEslintOverrides } = require('eslint-config-whisp/override');
// To enable the rules
module.exports = override(addEslintBaseConfig('whisp'));
// To also apply local overrides
module.exports = override(addEslintBaseConfig('whisp'), addEslintOverrides({'no-console': 'warn'}));
Stylelint support
If you require style-lint, which is always unless it's a react-native project, run the following command:
whisp-stylelint-install
.
Make sure to run it only after setting up regular linting first!
##Available commands:
Run one of the following in your terminal. yarn should link the executables to <YOUR_PROJECT>/node_modules/.bin/
whisp-lint
: runs eslint on entire codebasewhisp-stylelint
: runs style-lint on entire codebasewhisp-prettify
: prettifies the entire codebasewhisp-eslint-install
: installs required dependencies and pre-commit hookswhisp-stylelint-install
: add required dependencies and pre-commit hooks for linting css/scss files