ESLint and styleguides #499
Paul7Peterson
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Hey @Paul7Peterson, thanks for raising this topic. I'm a big fan of a consistent coding style/syntax across the entire project. What I'd like to know first is how the rules you propose differ from the Nx defaults. We can probably find those defaults by digging a bit, but AFAIK at least a few rules are already in place, including What I'm unsure about is whether existing rules are set up with a I'd like to see/look into:
Your thoughts to the above? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
I open this discussion so we can have a debate about a thing that I start to find necessary in the project, especially considering that is open to everyone to contribute: the ESLint config.
Here are some of the basic ones that I will propose based on what I've been seeing in the project:
{ // ... "overrides": [ { "rules": { "no-unused-vars": ["error", { "vars": "all", "varsIgnorePattern": "^_" }], "semi": ["error", "always"], "quotes": ["error", "single"], "no-multi-spaces": ["error", { "ignoreEOLComments": false }], "comma-dangle": ["error", "always"], "no-delete-var": "error", "no-var": "error" } }, ] }The reasons for these rules I propose:
letandconstare way more predictable and embrace good practices. I would even set the use ofconstas compulsory when there's no resignation of the variable.Feel free to propose yours with the right arguments. 😉
Beta Was this translation helpful? Give feedback.
All reactions