@common-web/lint-staged

Common Lint staged config

Usage no npm install needed!

<script type="module">
  import commonWebLintStaged from 'https://cdn.skypack.dev/@common-web/lint-staged';
</script>

README

@common-web/lint-staged

Automatically run linter commands prior to code passes git commit command

Getting started

yarn:

yarn add prettier @common-web/lint-staged -D

npm:

npm install prettier @common-web/lint-staged --save-dev

in your repo create lint-staged.config.js then added the following:

const BaseLintStagedConfig = require('@common-web/lint-staged');

module.exports = BaseLintStagedConfig;

Running Prettier

Add the following to your "scripts" in your package.json


{
    ...,

    "husky": {
        "hooks": {
            "pre-commit": "lint-staged"
        }
    }
}

Examples