nikku / eslint-plugin-license-header

Rules to validate the presence of license headers in source files.
MIT License
27 stars 9 forks source link

Type layout #6

Closed hsellou closed 2 years ago

hsellou commented 3 years ago

Hello guyz,

I want to use this plugin to fix automatically headers during the git pre-commit phase with husky and lint-staged. My config looks like this:

"lint-staged": {
    "**/*": "prettier --write --ignore-unknown",
    "*.js": "eslint --fix --fix-type layout"
  }

But it doesn't trigger your rule because it doesn't have the type layout in the meta section here:

https://github.com/nikku/eslint-plugin-license-header/blob/b77dbe74d3ff1f45e29119168d6015f88a5c16c5/lib/rules/header.js#L13-L25

eslint doc here: https://eslint.org/docs/developer-guide/working-with-rules