From 685940428cb732c25ae74b6f97b31891970b4e7d Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Tue, 29 Jul 2025 03:53:52 +0300 Subject: [PATCH] Update eslint.config.mjs --- eslint.config.mjs | 86 +++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index f22174332c..590daf3a16 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,46 +1,50 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import globals from "globals"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; +import typescriptEslint from '@typescript-eslint/eslint-plugin' +import globals from 'globals' +import tsParser from '@typescript-eslint/parser' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import js from '@eslint/js' +import { FlatCompat } from '@eslint/eslintrc' -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}) export default [ - ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), - { - plugins: { - "@typescript-eslint": typescriptEslint, - }, - - languageOptions: { - globals: { - ...globals.browser, - }, - - parser: tsParser, - ecmaVersion: "latest", - sourceType: "module", - }, - - rules: { - "no-case-declarations": "off", - - indent: ["error", 2, { - SwitchCase: 1, - }], - - "linebreak-style": ["error", "unix"], - quotes: ["error", "single"], - semi: ["error", "never"], - }, + ...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'), + { + plugins: { + '@typescript-eslint': typescriptEslint }, -]; \ No newline at end of file + + languageOptions: { + globals: { + ...globals.browser + }, + + parser: tsParser, + ecmaVersion: 'latest', + sourceType: 'module' + }, + + rules: { + 'no-case-declarations': 'off', + + indent: [ + 'error', + 2, + { + SwitchCase: 1 + } + ], + + 'linebreak-style': ['error', 'windows'], + quotes: ['error', 'single'], + semi: ['error', 'never'] + } + } +]