import simpleImportSort from "eslint-plugin-simple-import-sort"; 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 compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: js.configs.recommended, allConfig: js.configs.all, }); export default [ { ignores: ["src/app/core/ems"], }, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/strict"), { plugins: { "simple-import-sort": simpleImportSort, "@typescript-eslint": typescriptEslint, }, languageOptions: { globals: { ...globals.browser, }, parser: tsParser, ecmaVersion: "latest", sourceType: "module", }, rules: { indent: ["error", 4], "linebreak-style": ["error", "unix"], quotes: ["error", "single"], semi: ["error", "always"], strict: "error", "array-bracket-newline": "error", yoda: "error", "@typescript-eslint/array-type": [ "error", { default: "generic", }, ], "@typescript-eslint/ban-tslint-comment": "off", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-extraneous-class": "off", "simple-import-sort/imports": "error", "simple-import-sort/exports": "error", "no-mixed-spaces-and-tabs": "off", }, }, ];