{ "env": { "browser": true, "es2021": true, "node": true }, "globals": { "$": "readonly", "jQuery": "readonly", "html2canvas": "readonly", "ClipboardItem": "readonly", "grecaptcha": "readonly" }, "ignorePatterns": [ "backend/__tests__/**/*", "backend/setup-tests.ts", "backend/jest.config.ts" ], "extends": [ "eslint:recommended", "plugin:json/recommended", "plugin:require-path-exists/recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended" ], "plugins": ["json", "require-path-exists", "@typescript-eslint"], "parserOptions": { "ecmaVersion": 12, "sourceType": "module", "project": ["./frontend/tsconfig.json", "./backend/tsconfig.json"] }, "rules": { "json/*": ["error"], "indent": ["off"], "linebreak-style": ["error", "unix"], "curly": ["error", "multi-line"], "quotes": [ "error", "double", { "allowTemplateLiterals": true, "avoidEscape": true } ], "semi": ["error", "always"], "no-empty": ["error", { "allowEmptyCatch": true }], "no-var": 2, "require-path-exists/notEmpty": 2, "require-path-exists/tooManyArguments": 2, "require-path-exists/exists": [ 2, { "extensions": [ "", ".js", ".ts", ".tsx", ".es.ts", ".tsx", ".json5", ".es", ".es6", ".coffee" ] } ], "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/no-misused-promises": [ "error", { "checksVoidReturn": false } ], "@typescript-eslint/promise-function-async": "warn" // "@typescript-eslint/no-floating-promises": "error" // consider adding these // "@typescript-eslint/strict-boolean-expressions": "warn", }, "overrides": [ { // enable the rule specifically for TypeScript files "files": ["*.ts", "*.tsx"], "rules": { "@typescript-eslint/explicit-function-return-type": ["error"], "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/no-empty-function": "error", "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": [ "error", { "argsIgnorePattern": "^(_|e|event)", "varsIgnorePattern": "^_" } ], "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/no-this-alias": "off" } // "parserOptions": { // "project": "./tsconfig.json" // } } ] }