{ "plugins": ["unicorn", "react", "typescript", "import"], "jsPlugins": [ "eslint-plugin-unused-imports", { "name": "import-es", "specifier": "eslint-plugin-import" } ], "env": { "builtin": true, "es2020": true }, "settings": { "import/resolver": { "typescript": true, "node": false }, "import/parsers": { "@typescript-eslint/parser": [".ts"] } }, "ignorePatterns": [ "**/build/**", "**/dist/**", "**/coverage/**", "**/reports/**", "**/node_modules/**", "**/build/reports/**", "**/**/report.js", "**/*.generated.*", "**/temp/**", "**/.genx/**", ".eslintrc.js" ], "rules": { "no-unused-vars": "off", "no-irregular-whitespace": "error", "guard-for-in": ["error"], "no-caller": "error", "no-extend-native": "error", "no-extra-bind": "error", "no-multi-str": "error", "no-new-wrappers": "error", "no-throw-literal": ["error"], "no-with": "error", "prefer-promise-reject-errors": ["error"], "no-array-constructor": "error", "constructor-super": "error", "no-this-before-super": "error", "no-var": "error", "prefer-const": ["error", { "destructuring": "all" }], "prefer-rest-params": "error", "prefer-spread": "error", "require-yield": ["error"], "no-async-promise-executor": ["error"], "no-await-in-loop": ["error"], "complexity": ["error", { "max": 45 }], "max-depth": ["error", { "max": 4 }], "no-promise-executor-return": ["error"], "no-sparse-arrays": ["error"], "no-unsafe-optional-chaining": ["error"], "no-lone-blocks": ["error"], "no-unmodified-loop-condition": ["error"], "no-useless-call": ["error"], "no-shadow": "off", "no-shadow-restricted-names": ["error"], "no-plusplus": ["error"], "no-unused-expressions": "off", "new-cap": "off", "no-use-before-define": "off", "require-await": "off", "import/namespace": "off", "unused-imports/no-unused-imports": ["warn"], "import/no-absolute-path": ["error"], "import/no-mutable-exports": ["error"], "import-es/first": "off", "import-es/newline-after-import": "error", "import-es/no-duplicates": "warn", "import-es/no-self-import": "error", "import-es/no-useless-path-segments": "warn", "import-es/no-extraneous-dependencies": "error", "import-es/order": [ "warn", { "groups": ["builtin", "external", "internal", "parent", "sibling", "index"], "alphabetize": { "order": "asc", "caseInsensitive": true } } ], "no-magic-numbers": [ "error", { "detectObjects": false, "ignoreDefaultValues": true, "ignoreArrayIndexes": true, "ignoreEnums": true, "ignoreNumericLiteralTypes": true, "ignoreReadonlyClassProperties": true, "ignore": [-1, 0, 2, 1, 100, 9000] } ], "react/rules-of-hooks": "error", "react/exhaustive-deps": "error" }, "overrides": [ { "files": [ "packages/foundation/foundation-testing/src/playwright-bdd/**/*.ts", "packages/foundation/foundation-testing/src/playwright/test.ts" ], "rules": { "react/rules-of-hooks": "off", "react/exhaustive-deps": "off" } }, { "files": [ "*.styles.ts", "*.test.ts", "*.e2e.ts", "**/test/**/*.ts", "**/test/**/*.js", "webpack.config.js", "**/dispatch-renderer.ts" ], "rules": { "no-magic-numbers": "off", "react/rules-of-hooks": "off" } } ] }