eslint-config-whisp

1.0.24 • Public • Published

##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:

  1. Install react-app-rewired, customize-cra.
  2. 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 codebase

  • whisp-stylelint: runs style-lint on entire codebase

  • whisp-prettify: prettifies the entire codebase

  • whisp-eslint-install: installs required dependencies and pre-commit hooks

  • whisp-stylelint-install: add required dependencies and pre-commit hooks for linting css/scss files

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-config-whisp

Weekly Downloads

23

Version

1.0.24

License

MIT

Unpacked Size

7.95 kB

Total Files

13

Last publish

Collaborators

  • orzar