kontextR eslint plugins
Created by yours truly ❤️
This repository holds eslint plugins which were created to improve the consistency in
kontextR's source code. In order to use most of them (they will be marked accordingly),
you will need to run them using prettier-eslint
.
The source code is published under the MIT license.
Install the plugin like any other using npm npm install --save-dev @ktxtr/eslint-plugin-{name}
.
You can use it by adding plugins: [ "@ktxtr/{name}" ]
to your .eslintrc
file.
- @ktxtr/eslint-plugin-prettier - auto-fixers and formatters for our prettier2eslint bridge
- Commit all changes, but don't modify package.json version
- Run
npm run publish
and select appropriate version change - Lerna will increment the version, create git tags & push them and finally publish the package on npmjs
Create a new directory inside this repository with the same structure as our template - eslint-plugin-prettier
.
We use lerna for publishing (See lernajs.io) - commit all your changes and mark the initial
package version as 0.0.0
. Once you run npm run publish
lerna will prompt you for a version bump - select either
0.0.1
(unstable packages) or 1.0.0
(stable enough).
In order to create a new rule, create a file named your-rule.js
inside lib/rules
and import & export it within index.js
.
For the structure inside your rule source, you can use the provided no-long-implicit-arrow.js
rule as a template.