
How To Publish Your ESLint Rules as NPM Package
27 October, 2022
3
3
0
Contributors
Disclaimer
In this tutorial, I’ll focus on the specific use case for typescript code-based. You don’t have to imitate this tutorial 100%. You can adjust the specific parts based on your needs
Introduction
Preparation
npm init
or yarn init
. You can change eslint-config-test
with your preferred folder name. Remember that eslint-config
prefix must exist so it can be published at the NPM registry as the ESLint Config library.package.json
file like this.Setup The ESLint Rules
eslintrc.js
file, then modify it. Here’s mine, you can use it as a reference.index.js
file.Publish It To NPM Registry
npm publish
or yarn publish
. Then follow the step in the terminal. You can also create an NPM registry account if you don’t have it before.eslintrc
file in your project folder. Here’s mine, you can access it at eslint-config-yehezgun.Closing
•
javascript
web
frontend
npm
application
eslint