-
Notifications
You must be signed in to change notification settings - Fork 88
fixing source filename to follow kebab-case convention and other eslint issues #1423 #1424
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
fixing source filename to follow kebab-case convention and other eslint issues #1423 #1424
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could add eslint rules to do the same instead of creating our own check.
rules: {
"@eslint-react/naming-convention/filename": [
"warn",
{ rule: "kebab-case" }
],
},
definitely better to use eslint to enforce it. I noticed that we are still using tslint. For that tool there is a native rule: In the future, we should migrate from My proposal workplan to fix #1423
|
12219a7
to
f5d1e66
Compare
5b5ff9a
to
828e9b7
Compare
The main difference is the introduction of eslint.config.mjs instead of eslintrc.json.
|
Great! Thank you for the hard work. This was very well needed. I have just a question, why use react naming convention when is already provided by |
Many eslint warnings exist but are not shown in the overview. If we agree to merge this PR we should open an issue to keep track of the warnings so that we can work on them.. |
d15814e
to
ea5d64d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes and I am fine with them
the react-naming-convention plug-in was suggested to us by @danielpeintner. I have been scrutinizing https://typescript-eslint.io/rules/ and cannot find an equivalent for filename enforcement. |
What's wrong with this? https://typescript-eslint.io/rules/naming-convention/ |
You may have noticed the build is failing on a flaky tests. Therefore I have activated the "@typescript-eslint/no-floating-promises": "warn", as rules. This rule allow me to easily find the issue. (we have 100 places where un-awaited promised functions call are missing catches, I only fixed in binding-opcua ) for the time being. |
The rule naming-convention is about naming things inside the code ( like variables, classes, members). We are looking at naming source filename. |
Ah right! Then I am more confident to add a vendor-neutral ESLint plugin like this: https://github.com/DukeLuo/eslint-plugin-check-file, if for @danielpeintner is ok. |
Good point, let's activate the "no-console-rule": "error" too ... |
4cff1d8
to
d02f68d
Compare
I now switched to eslint-plugin-check-file in ad4244c and also added folder names are in kebab-case too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is good in general. I noted some things I don't understand..
ad4244c
to
2c07bbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go ahead, as this PR is getting too big. However, I have a question: What is the newly introduced licence.template.txt?
Finally, I would turn off the no-console rule for the examples globally instead of manually adding it to each file (To be addressed possibly in the future).
@relu91 , check the comment from @danielpeintner above. He noticed that the file was missing, this file will help autofix the missing copyright notice. |
I agree and we got 3 approvals also 👍 |
No description provided.