move to new eslint configuration format

This commit is contained in:
Daniel Micay 2024-04-22 17:41:10 -04:00
parent da219e0cf3
commit c9eb422545
2 changed files with 32 additions and 39 deletions

View File

@ -1,39 +0,0 @@
{
"env": {
"browser": true,
"es2022": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"no-var": [
"error"
]
},
"globals": {
"channel": "readonly"
},
"ignorePatterns": [
"/app/src/*/assets/viewer",
"build/"
]
}

32
eslint.config.js Normal file
View File

@ -0,0 +1,32 @@
import js from "@eslint/js";
import globals from "globals";
export default [
js.configs.recommended,
{
languageOptions: {
globals: {
channel: "readonly",
...globals.browser
},
ecmaVersion: 2022,
sourceType: "module"
},
rules: {
indent: ["error", 4],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
"no-unused-vars": ["error", {caughtErrors: "none"}],
"no-var": ["error"]
},
},
{
ignores: [
"app/build/",
"app/src/*/assets/viewer",
"releases/"
]
}
];