This repo consists of a standard rule configuration that can be extended, as well as custom rules created in-house.
To use the config:
-
Install the repo:
npm install --save-dev eslint-plugin-siren@sirensolutions/eslint-plugin#<tag>
Where
<tag>
is the latest tag available. -
Add the peerDependencies of this plugin to the devDependencies of the project where you are using the plugin.
-
Update your
.eslintrc.yml
(or whatever you've called it) to extend fromplugin:siren/recommended
extends: ['plugin:siren/recommended']
-
Ensure that your NPM script or Gulp task includes your
package.json
file so thesame-core-dependency-version
rule can check it. We recommend the following entry in yourpackage.json
:"lint": "eslint '**/*.{js,ts,jsx,tsx}' package.json",
Check the rules
directory to see documentation about each rule.
- All the new PRs merge into master and should increment the version.
- Once merged, tag the new commit in master and update all Siren repos that use it with the latest tag.
- If changed/added rules cause lint failures, they can be manually disabled with a ticket created on the appropriate team to update their code.