-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[2024Q4] Decision Making Tool #1714
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Kristina <[email protected]>
|
||
### Code Quality (80 points) | ||
|
||
> The use of innerHTML is prohibited. Use of DOM search methods is prohibited. ([there are good reasons for not using them](https://gist.github.com/TELEUZI/410d19772481d98b06e0b41ebf89fff1#naive-implementation-).) |
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.
In the penalties section these methods are mentioned like this:
(querySelector*, getElement*, etc.)
If you don't mind, help me to correct that part here in the requirements and penalties
4. (+8) ESLint configuration file must include all of the following rules included: | ||
|
||
```json | ||
{ | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/explicit-function-return-type": "error", | ||
"@typescript-eslint/consistent-type-assertions": [ | ||
"error", | ||
{ "assertionStyle": "never" } | ||
], | ||
"@typescript-eslint/explicit-member-accessibility": [ | ||
"error", | ||
{ "accessibility": "explicit", "overrides": { "constructors": "off" } } | ||
], | ||
"@typescript-eslint/member-ordering": "error" | ||
} | ||
``` | ||
|
||
5. (+16) ESLint configuration file must be configured with [`typescript-eslint`](https://typescript-eslint.io/) (with enabled [type checking rules](https://typescript-eslint.io/getting-started/typed-linting/)), [`eslint-config-airbnb-typescript`](https://www.npmjs.com/package/eslint-config-airbnb-typescript), [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) (do not confuse it with `eslint-plugin-prettier`. it is [not recommended](https://prettier.io/docs/en/integrating-with-linters.html#:~:text=generally%20not%20recommended) by the prettier documentation.) and the necessary dependencies for them to work. | ||
- _With the mentor's permission, it is acceptable to disable or tweak some rules (e.g. `import/prefer-default-export`, `no-underscore-dangle`, etc.) as long as it does not conflict with penalties._ | ||
- _It is allowed to tweak the config to be stricter to make your code even cleaner (according to your or your mentor's preference)._ |
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.
Here's the thing:
eslint-config-airbnb-base
and eslint-config-airbnb-typescript
look outdated at the moment (have not been updated to ESLint v9).
A possible solution is to remove airbnb from the requirements and add a list of important good eslint rules, but I need help with a list of such rules.
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 could suggest https://www.npmjs.com/package/eslint-plugin-unicorn instead.
Typescript-eslint itself uses it for their code https://github.com/typescript-eslint/typescript-eslint/blob/main/eslint.config.mjs
[2024Q4] Decision Making Tool
🤔 This is a ...
Description
Additional Information
Checklist