eslint: use stylistic to replace deprecated features

This commit is contained in:
Daniel Micay
2024-11-28 19:06:31 -05:00
parent cc13d967cc
commit 665f82200f
4 changed files with 215 additions and 10 deletions

View File

@@ -1472,10 +1472,14 @@ rm android-cts-media-1.5.zip</pre>
<pre>import js from "@eslint/js";
import globals from "globals";
import stylistic from "@stylistic/eslint-plugin";
export default [
js.configs.recommended,
{
plugins: {
"@stylistic": stylistic
},
languageOptions: {
globals: {
...globals.browser
@@ -1484,11 +1488,11 @@ export default [
sourceType: "module"
},
rules: {
indent: ["error", 4],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"no-var": ["error"]
"no-var": ["error"],
"@stylistic/indent": ["error", 4],
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/quotes": ["error", "double"],
"@stylistic/semi": ["error", "always"],
}
}
];</pre>