-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Chore/upgrade eslint #7853
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
base: dev-2.0
Are you sure you want to change the base?
Chore/upgrade eslint #7853
Conversation
add @stylistic/eslint-plugin
We have a situation ...
... and I have a few questions:
Next steps: Additionaly I have to wrap my head around Cheers! |
The existing rules should be all good and intended. The one thing to possibly consider is to switch from errors to warnings for the style related rules, eg. indentation and semi-colon, that does not change behavior of the code (ie. arrow function will still error since it change behavior of function more significantly). If there are some suggestion on rules changes or addition, do feel free to make them here and we can review.
If needed, the additional plugins can be added to enable relevant linting of existing rules. I would like to limit the scope of linting to JS files only though so not really considering additional plugin to lint other file types.
I assume this is about why Typr.js is inlined in this repo? The reason is that the original Typr.js repo does not export the code as an NPM package so as a stop gap we inline the library files directly. It is not meant to be edited by p5.js contributors so this file can be ignored by ESLint.
It should be fine, unless in the 2.0 codebase it looks like we are using newer syntax then we can bump the version number up to 2024.
Yes should be fine. |
I was wondering which would be the preferred way to integrate the linting rules? As already mentioned I could create a commit for each rule
Sorry if this sounded kind of impolite. I just wanted to know if this could be a task for the future? My aforementioned general intention is to help improve performance and reduce bundle size. See #7761
I've been looking into
The plugins could be used to lint js code snippets in .md and .html files. Should I implement this feature? |
Instead of individual PR for each rule, which I feel is a bit excessive, we can do this PR as you mentioned with the general setup then open another unified PR (or start with an issue for discussion) for discussing the rules in details. That way we avoid spilling too much bike shedding conversation around and just have one place dedicated for it. What do you think?
No worries, it is just worth to be a bit clearer on the question so I don't have to assume. For things like Typr.js, it might be worth discussing this with @dhowe who worked on the new implementation of the typography section replacing opentype.js with Typr.js as well. There are some existing discussion issues around too so might want to have a look at what's already looked at in those first.
Yes that is meant to lint the examples so that they also follow the lint rules we have. If the eslint-plugin-jsdoc can lint example code, that would really help us not having the custom solution we have that is probably more brittle, so yes do look into it.
That could be helpful 🤔 I think maybe let's have the md plugin, I don't think we have much complex html with contents in the repo. |
sounds good to me |
Changes:
8.54.0
to9.27
@sytlistic/eslint-plugin
to replace deprecated eslint rules.gitignore