npm.io
1.1.2 • Published 6 years ago

@forter/lint-staged-config

Licence
Apache-2.0
Version
1.1.2
Deps
1
Size
14 kB
Vulns
0
Weekly
0

Linting lint-staged

Use lint-staged to make sure your code you enter pass linters.

Installing

  • Install @forter/lint-staged-config
    npm add --save-dev @forter/lint-staged-config
  • Then add .lintstagedrc.js like so
module.exports = {
  ...require("@forter/lint-staged-config"),
};

If you've installed @forter/lint-staged-config locally within your project, just set your lint-staged config to:

What you get

This will install @forter/lint-staged-config, a config based on forter will run different checks on different files commit

Usage

If you don't want to use package.json, you can use any of the supported extensions to export a string, e.g. .lintstagedrc.js:

"@forter/lint-staged-config"

An example configuration repository is available here.

Note: This method does not offer a way to extend the configuration to overwrite some properties from the shared configuration. If you need to do that, import the file in a .lintstagedrc.js file and export the modifications, e.g:

module.exports = {
  ...require("@forter/lint-staged-config"),
};