Skip to content
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

WebUI: migrate to ESLint v9 #20800

Merged
merged 2 commits into from May 11, 2024
Merged

WebUI: migrate to ESLint v9 #20800

merged 2 commits into from May 11, 2024

Conversation

Chocobo1
Copy link
Member

@Chocobo1 Chocobo1 commented May 4, 2024

  • WebUI: migrate to ESLint v9
  • WebUI: add linting for regular expressions
    And applies to following suggestions:
    • Use case-insensitive flag i
    • Use \w for matching characters
    • Sort the regex flags

@Chocobo1 Chocobo1 added the WebUI WebUI-related issues/changes label May 4, 2024
@Chocobo1 Chocobo1 added this to the 5.0 milestone May 4, 2024
@Chocobo1 Chocobo1 requested a review from a team May 4, 2024 05:39
@Chocobo1 Chocobo1 changed the title GHA CI: migrate to ESLint v9 WebUI: migrate to ESLint v9 May 4, 2024
And applies to following suggestions:
* Use case-insensitive flag `i`
* Use `\w` for matching characters
* Sort the regex flags
@Chocobo1
Copy link
Member Author

Chocobo1 commented May 4, 2024

@Piccirello
I plan to enforce single quotes in webUI in a follow up PR, I mean migrate from double quotes as much as possible. This is to unify the coding style. I don't have strong opinion and a quick web search shows that web devs mostly prefer single quotes. Any comment?

https://eslint.org/docs/latest/rules/quotes
The avoidEscape and allowTemplateLiterals will be true of course.

@Piccirello
Copy link
Member

@Piccirello I plan to enforce single quotes in webUI in a follow up PR, I mean migrate from double quotes as much as possible. This is to unify the coding style. I don't have strong opinion and a quick web search shows that web devs mostly prefer single quotes. Any comment?

https://eslint.org/docs/latest/rules/quotes The avoidEscape and allowTemplateLiterals will be true of course.

I'm personally more familiar with using double quotes in a JS codebase. Either should be fine though if it's enforced via eslint.

@Chocobo1 Chocobo1 merged commit a19ef58 into qbittorrent:master May 11, 2024
10 of 14 checks passed
@Chocobo1 Chocobo1 deleted the eslint_v9 branch May 11, 2024 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants