From dd6854d27f38d2820b0bf25e0e341fa56367d98d Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 2 Dec 2024 19:37:50 +0100 Subject: [PATCH] update to eslint.config --- .eslintrc.json | 31 ------------------------------- eslint.config.mjs | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 31 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 eslint.config.mjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 41f516bb..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,31 +0,0 @@ - -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" - }, - "plugins": [ - "@typescript-eslint" - ], - "rules": { - "@typescript-eslint/naming-convention": [ - "warn", - { - "selector": "typeLike", - "format": [ - "PascalCase" - ] - } - ], - "@typescript-eslint/semi": "warn", - "curly": "warn", - "eqeqeq": "warn", - "no-throw-literal": "warn", - "semi": "off", - "no-unused-expressions": "warn", - "no-duplicate-imports": "warn", - "new-parens": "warn" - } -} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..1c1cb248 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,28 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import tsParser from "@typescript-eslint/parser"; + +export default [{ + files: ["**/*.ts"], + + plugins: { + "@typescript-eslint": typescriptEslint, + }, + + languageOptions: { + parser: tsParser, + ecmaVersion: 6, + sourceType: "module", + }, + + rules: { + "@typescript-eslint/naming-convention": ["warn", { + selector: "typeLike", + format: ["PascalCase"], + }], + + curly: "warn", + eqeqeq: "warn", + "no-throw-literal": "warn", + semi: "off", + }, +}]; \ No newline at end of file