qBittorrent
qBittorrent copied to clipboard
WebUI: migrate to ESLint v9
- 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
- Use case-insensitive flag
@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 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
andallowTemplateLiterals
will betrue
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.