@bedandbreakfast/eslint-config
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

eslint-config

The ESLint configuration for Bedandbreakfast.eu.

Usage

  1. Setup your project to use @bedandbreakfast/prettier-config by following this README.

  2. Make sure @bedandbreakfast/eslint-config is available in your project.

  3. Add an .eslintrc.js file at the root of your project that extends this config:

    module.exports = {
      extends: '@bedandbreakfast/eslint-config'
    };
  4. Install the required dependencies into your project using:

    (
      export PKG=@bedandbreakfast/eslint-config;
      npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev
    )

    This copies the peerDependencies of this project as devDependencies into yours.

    On Windows this should work using Git for Windows.

  5. To run ESLint as a pre-commit hook and automatically fix issues add husky and lint-staged using:

    npm install husky lint-staged --save-dev

    Then copy the following to your package.json:

     "husky": {
       "hooks": {
         "pre-commit": "lint-staged"
       }
     },
     "lint-staged": {
       "*.{js,jsx,ts,tsx}": [
         "eslint --fix",
         "git add"
       ]
     }

    That's it, happy coding!

Readme

Keywords

none

Package Sidebar

Install

npm i @bedandbreakfast/eslint-config

Weekly Downloads

0

Version

1.0.14

License

ISC

Unpacked Size

327 kB

Total Files

16

Last publish

Collaborators

  • bedandbreakfast