-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs section on local development #16854
Comments
Have you seen this page? |
I have but this is not what I was after. What I was looking for was information on the best technique to develop custom rules or an entire plugin without having to go through the whole npm publishing process. To give you an example, one of the bits I was missing was that you can "fake" an npm package locally, by placing I hope this will kick me off with a way to write some project-specific rules that I need. After deprecation or Hopefully, this clarifies and gives you a better idea of my experience. |
We are looking at adding documentation that guides people who want to write their first rule. It will probably take some time before we get around to it, but it is on our list to tackle in the future. cc @bpmutter |
That's great to hear! I'll be happy to take a look at the PR when it lands in. :) |
I'd be happy to test drive the new docs and get familiar with developing custom rules myself. :) |
Seems related to #16940 |
here's the draft of the tutorial if you'd like to take a look! #17024 |
fwiw i also find ChatGPT to be quite talented at ESLint-related stuff. for example, if you ask ChatGPT something like "how to make an eslint custom rule that " it can give you a very strong starting point. I suspect this works so well b/c ESLint has been around for a while and there is a lot of content on the web published about it for GPT to borrow from. |
I'm following along the tutorial and is so easy to go through it. Here are a few things I noticed:
|
Fixed by #17024. https://eslint.org/docs/latest/extend/custom-rule-tutorial How to use custom rules without publishing to npm: https://eslint.org/docs/latest/extend/custom-rule-tutorial#step-8-use-the-plugin-locally |
Awesome. Looks great! |
ESLint version
8.32.0
What problem do you want to solve?
As a developer who has to deal with eslint challenges sporadically, I find it difficult to gather definite instructions about the local development. When trying to write some project-specific rules or predefined configurations, I need to browse through a lot of web sources to find the recommended ways of writing custom eslint bits locally. What is especially difficult is figuring out how to link Javascript files with your custom rules, whether this is possible at all, and whether you need to create an npm package locally, or maybe there is a syntax for eslintrc.json that allows to refer to local file at any directory, etc.
What do you think is the correct solution?
I think the eslint website deserves a separate section about local development which would lay out all the technical possibilities for developing own plugins and configurations, providing file structure and syntax recipes. It would save a lot of time from those who sporadically need to customize their project's eslint environment
Participation
Additional comments
I cannot declare to submit a pull request for this change, due to insufficient knowledge, but I will be more than happy to be involved in reviewing the new content.
The text was updated successfully, but these errors were encountered: