mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 08:48:07 -06:00
WebUI: prefer Number static properties over global ones
`Number` purpose is modularization of globals in ECMAScript 2015. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt#number.parseint_vs._parseint
This commit is contained in:
@@ -3,8 +3,9 @@ import Html from "eslint-plugin-html";
|
||||
import Js from "@eslint/js";
|
||||
import PluginQbtWebUI from "eslint-plugin-qbt-webui";
|
||||
import PreferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
|
||||
import Stylistic from "@stylistic/eslint-plugin";
|
||||
import * as RegexpPlugin from "eslint-plugin-regexp";
|
||||
import Stylistic from "@stylistic/eslint-plugin";
|
||||
import Unicorn from "eslint-plugin-unicorn";
|
||||
|
||||
export default [
|
||||
Js.configs.recommended,
|
||||
@@ -27,7 +28,8 @@ export default [
|
||||
PluginQbtWebUI,
|
||||
PreferArrowFunctions,
|
||||
RegexpPlugin,
|
||||
Stylistic
|
||||
Stylistic,
|
||||
Unicorn
|
||||
},
|
||||
rules: {
|
||||
"curly": ["error", "multi-or-nest", "consistent"],
|
||||
@@ -65,7 +67,8 @@ export default [
|
||||
],
|
||||
"Stylistic/quote-props": ["error", "consistent-as-needed"],
|
||||
"Stylistic/semi": "error",
|
||||
"Stylistic/spaced-comment": ["error", "always", { exceptions: ["*"] }]
|
||||
"Stylistic/spaced-comment": ["error", "always", { exceptions: ["*"] }],
|
||||
"Unicorn/prefer-number-properties": "error"
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user