mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
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
This commit is contained in:
@@ -2,9 +2,11 @@ import Globals from 'globals';
|
||||
import Html from 'eslint-plugin-html';
|
||||
import Js from '@eslint/js';
|
||||
import Stylistic from '@stylistic/eslint-plugin';
|
||||
import * as RegexpPlugin from 'eslint-plugin-regexp';
|
||||
|
||||
export default [
|
||||
Js.configs.recommended,
|
||||
RegexpPlugin.configs["flat/recommended"],
|
||||
Stylistic.configs["disable-legacy"],
|
||||
{
|
||||
files: [
|
||||
@@ -20,6 +22,7 @@ export default [
|
||||
},
|
||||
plugins: {
|
||||
Html,
|
||||
RegexpPlugin,
|
||||
Stylistic
|
||||
},
|
||||
rules: {
|
||||
|
||||
Reference in New Issue
Block a user