{ "root": true, "ignorePatterns": [ "projects/**/*", "**/node_modules/**", "index.html", "**/*.js", "**/bin/**", "**/.storybook/**" ], "overrides": [ { "files": ["*.ts"], "parserOptions": { "project": ["./tsconfig.eslint.json"] }, "plugins": ["eslint-plugin-prefer-arrow"], "extends": [ "plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates", "plugin:prettier/recommended" ], "rules": { "prefer-arrow/prefer-arrow-functions": [ "error", { "disallowPrototype": true, "singleReturnOnly": true, "classPropertiesAllowed": false } ], "@angular-eslint/no-empty-lifecycle-method": "off", "@angular-eslint/template/eqeqeq": "off", "@angular-eslint/contextual-lifecycle": "off", "no-console": [ "error", { "allow": [ "error", "warn" ] } ], "@angular-eslint/component-selector": [ "error", { "prefix": "app", "style": "kebab-case", "type": "element" } ], "@angular-eslint/directive-selector": [ "error", { "prefix": "app", "style": "camelCase", "type": "attribute" } ], "@typescript-eslint/array-type": [ "error", { "default": "array" } ], "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/dot-notation": "off", "@typescript-eslint/explicit-member-accessibility": [ "off", { "accessibility": "explicit" } ], "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", "@typescript-eslint/no-var-requires": "error", "@typescript-eslint/prefer-for-of": "off", "@typescript-eslint/restrict-plus-operands": "error", "arrow-parens": [ "off", "always" ], "brace-style": [ "error", "1tbs" ], "complexity": [ "error", { "max": 25 } ], "jsdoc/check-alignment": "off", "jsdoc/newline-after-description": "off", "linebreak-style": "off", "max-classes-per-file": [ "error", 1 ], "max-len": [ "error", { "ignorePattern": "^import", "ignoreTemplateLiterals": true, "code": 140 } ], "camelcase": "off", "new-parens": "off", "newline-per-chained-call": "off", "no-extra-semi": "off", "no-irregular-whitespace": "off", "no-template-curly-in-string": "error", "quote-props": "off", "react/jsx-curly-spacing": "off", "react/jsx-equals-spacing": "off", "react/jsx-tag-spacing": [ "off", { "afterOpening": "allow", "closingSlash": "allow" } ], "react/jsx-wrap-multilines": "off", "space-before-function-paren": "off", "space-in-parens": [ "off", "never" ], "@angular-eslint/component-class-suffix": "error", "@angular-eslint/directive-class-suffix": "error", "@angular-eslint/no-host-metadata-property": "error", "@angular-eslint/no-input-rename": "error", "@angular-eslint/no-inputs-metadata-property": "error", "@angular-eslint/no-output-on-prefix": "error", "@angular-eslint/no-output-rename": "error", "@angular-eslint/no-outputs-metadata-property": "error", "@angular-eslint/use-lifecycle-interface": "error", "@angular-eslint/use-pipe-transform-interface": "error", "@typescript-eslint/adjacent-overload-signatures": "error", "@typescript-eslint/ban-types": [ "warn", { "types": { "{}": { "message": "Avoid using the `{}` type. Use the correct type." }, "Object": { "message": "Avoid using the `Object` type. Did you mean `object`?" }, "Function": { "message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." }, "Boolean": { "message": "Avoid using the `Boolean` type. Did you mean `boolean`?" }, "Number": { "message": "Avoid using the `Number` type. Did you mean `number`?" }, "String": { "message": "Avoid using the `String` type. Did you mean `string`?" }, "Symbol": { "message": "Avoid using the `Symbol` type. Did you mean `symbol`?" } } } ], "@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/indent": "off", "@typescript-eslint/member-delimiter-style": [ "error", { "multiline": { "delimiter": "semi", "requireLast": true }, "singleline": { "delimiter": "semi", "requireLast": false } } ], "@typescript-eslint/member-ordering": "off", "@typescript-eslint/naming-convention": [ // see here for more info https://github.com/typescript-eslint/typescript-eslint/blob/v4.28.2/packages/eslint-plugin/docs/rules/naming-convention.md "error", { "selector": "default", "format": [ "camelCase" ], "leadingUnderscore": "allow", "trailingUnderscore": "allow" }, { "selector": "variableLike", "format": [ "camelCase", "UPPER_CASE", "PascalCase" ], "leadingUnderscore": "allow", "trailingUnderscore": "allow" }, { "selector": "typeLike", "format": [ "PascalCase", "camelCase" ] }, { "selector": "memberLike", "format": [ "PascalCase", "camelCase", "UPPER_CASE" ], "leadingUnderscore": "allow" } ], "@typescript-eslint/no-empty-function": "off", // need this off for empty ngOnInit() "@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-explicit-any": "warn", //would like to change this back to error "@typescript-eslint/no-inferrable-types": [ "error", { "ignoreParameters": true } ], "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-namespace": "error", "@typescript-eslint/no-non-null-assertion": "error", "@typescript-eslint/no-parameter-properties": "off", "@typescript-eslint/no-shadow": [ "error", { "hoist": "all" } ], "no-unused-expressions": "error", "@typescript-eslint/no-unused-expressions": "off", // dup of no-unused-expressions "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/prefer-function-type": "error", "@typescript-eslint/prefer-namespace-keyword": "error", "quotes": "off", "@typescript-eslint/quotes": [ "error", "single", { "allowTemplateLiterals": true } ], "@typescript-eslint/semi": [ "error", "always" ], "@typescript-eslint/triple-slash-reference": [ "error", { "path": "always", "types": "prefer-import", "lib": "always" } ], "@typescript-eslint/type-annotation-spacing": "error", "@typescript-eslint/unified-signatures": "error", "arrow-body-style": "off", "comma-dangle": "off", "constructor-super": "error", "curly": "error", "dot-notation": "off", "eol-last": "error", "eqeqeq": [ "error", "smart" ], "guard-for-in": "error", "id-denylist": [ "error", "any", "Number", "number", "String", "string", "Boolean", "boolean", "Undefined", "undefined" ], "id-match": "error", // "import/no-deprecated": "warn", //jsdoc // "import/order": "error", //jsdoc "indent": [ "off", 2 ], "jsdoc/check-indentation": "off", // "jsdoc/no-types": "error" // jsdoc "no-bitwise": "error", "no-caller": "error", "no-cond-assign": "error", "no-debugger": "error", "no-empty": "off", "no-empty-function": "off", "no-eval": "error", "no-fallthrough": "error", "no-invalid-this": "off", "no-multiple-empty-lines": "off", "no-new-wrappers": "error", "no-restricted-imports": [ "error", "rxjs/Rx" ], "no-shadow": "off", "no-throw-literal": "error", "no-trailing-spaces": "error", "no-undef-init": "error", "no-underscore-dangle": "off", "no-unsafe-finally": "error", "no-unused-labels": "error", "no-use-before-define": "warn", "no-var": "error", "object-shorthand": "error", "one-var": [ "error", "never" ], "padded-blocks": [ "off", { "blocks": "never" }, { "allowSingleLineBlocks": true } ], "prefer-const": "error", "radix": "error", "semi": "error", "spaced-comment": [ "error", "always", { "markers": [ "/", "//" ], "exceptions": [ "*", "**", "#" ] } ], "use-isnan": "error", "valid-typeof": "off" } }, { "files": ["*.html"], "extends": ["plugin:@angular-eslint/template/recommended"], "rules": { "@angular-eslint/template/eqeqeq": "error", "@angular-eslint/template/no-negated-async": "warn" } } ] }