UNPKG

@tomei/rental

Version:
59 lines (56 loc) 2.13 kB
import eslintPlugin from "@typescript-eslint/eslint-plugin"; import parser from "@typescript-eslint/parser"; import importPlugin from 'eslint-plugin-import' import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); export default [ { languageOptions: { parser: parser, ecmaVersion: "latest", // Allows modern ECMAScript features sourceType: "module", // Allows for the use of imports parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.json' }, }, plugins: { "@typescript-eslint": eslintPlugin, import: importPlugin }, rules: { "no-console": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "import/prefer-default-export": "off", "@typescript-eslint/no-unused-vars": "warn", "no-useless-catch": "off", "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/no-inferrable-types": "off", "@typescript-eslint/no-namespace": "off", "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-unsafe-call": "off", "@typescript-eslint/no-unsafe-member-access": "off", "@typescript-eslint/no-unsafe-return": "off", "@typescript-eslint/restrict-template-expressions": "off", "no-useless-escape": "off", "import/no-relative-parent-imports": "error", // Enforce relative imports only "import/no-absolute-path": "error", // Block absolute imports outside aliases "import/no-unresolved": ["error", { commonjs: true }], }, settings: { "import/resolver": { typescript: { alwaysTryTypes: true, } } }, ignores: ["node_modules", "dist/**/*", "eslint.config.mjs"], }, ];