From 2d660f2ce894746d1bfe08b950decc43cba571be Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 22 Apr 2024 17:41:10 -0400 Subject: [PATCH] move to new eslint configuration format --- .eslintrc.json | 39 --------------------------------------- eslint.config.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 39 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 eslint.config.js diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index ccc5da99..00000000 --- a/.eslintrc.json +++ /dev/null @@ -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/" - ] -} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..439ff4c7 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,30 @@ +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/" + ] + + } +];