.eslintrc.json
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
// // "plugin:@angular-eslint/ng-cli-compat",
// "plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"env": {
"browser": true,
"es6": true,
"node": true
},
"plugins": [
// "eslint-plugin-import",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow"
],
"rules": {
// // "plugin:@angular-eslint/recommended",
// "@angular-eslint/component-class-suffix": "error",
// "@angular-eslint/contextual-lifecycle": "error",
// "@angular-eslint/directive-class-suffix": "error",
// "@angular-eslint/no-conflicting-lifecycle": "error",
// "@angular-eslint/no-empty-lifecycle-method": "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-native": "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": "warn",
// "@angular-eslint/use-pipe-transform-interface": "error",
"@angular-eslint/component-max-inline-declarations": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/no-attribute-decorator": "error",
"@angular-eslint/no-forward-ref": "error",
"@angular-eslint/no-lifecycle-call": "error",
"@angular-eslint/no-pipe-impure": "error",
"@angular-eslint/no-queries-metadata-property": "error",
"@angular-eslint/prefer-output-readonly": "error",
"@angular-eslint/use-component-selector": "error",
"@angular-eslint/use-component-view-encapsulation": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"ignoredMethodNames": [],
"overrides": {
"accessors": "explicit",
"constructors": "no-public",
// "methods": "explicit",
"methods": "off",
"properties": "off",
"parameterProperties": "explicit"
}
}
],
// "@typescript-eslint/member-ordering": "error",
"@typescript-eslint/member-ordering": "off",
// "@typescript-eslint/naming-convention": "error",
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "variable",
"format": [
"camelCase"
]
}
],
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
// "@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-var-requires": "error",
"arrow-parens": "error",
"brace-style": [
"warn",
"1tbs",
{
"allowSingleLine": true
}
],
// "complexity": "off",
"complexity": [
"error",
{
"max": 5 // 20
}
],
"jsdoc/newline-after-description": "error",
"max-classes-per-file": [
"error",
1
],
"max-len": [
"error",
140 // 80
],
"max-lines": [
"error",
305
],
"max-lines-per-function": [
"error",
25 // 20
],
"max-statements": [
"error",
20 // 10
],
"no-console": [
"error",
{
"allow": [
"log",
"warn",
"dir",
"timeLog",
"assert",
"clear",
"count",
"countReset",
"group",
"groupEnd",
"table",
"dirxml",
"error",
"groupCollapsed",
"Console",
"profile",
"profileEnd",
"timeStamp",
"context"
]
}
],
// "no-fallthrough": "error",
"no-fallthrough": "warn",
"no-global-assign": "error",
"no-invalid-this": "off",
"no-multiple-empty-lines": "error",
"no-redeclare": "error",
"no-shadow": "off",
// "no-underscore-dangle": "error",
"no-underscore-dangle": "warn",
"no-undef": "error",
"no-undefined": "off",
"padded-blocks": [
"error",
"never"
],
"prefer-arrow/prefer-arrow-functions": "error",
"prefer-const": "error",
"quote-props": [
"error",
"as-needed"
],
"@typescript-eslint/semi": [
"error",
"always"
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"@angular-eslint/template/cyclomatic-complexity": [
"error",
{
"maxComplexity": 12
}
],
"@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-positive-tabindex": "error"
// ,
// "contextual-decorator": "error",
// "no-unused-css": "error",
// "prefer-inline-decorator": "error",
// "template-accessibility-alt-text": "error",
// "template-accessibility-elements-content": "error",
// "template-accessibility-label-for": "error",
// "template-accessibility-table-scope": "error",
// "template-accessibility-valid-aria": "error",
// "template-click-events-have-key-events": "error",
// "template-conditional-complexity": [
// "error",
// 4
// ],
// "template-mouse-events-have-key-events": "error",
// "template-no-distracting-elements": "error",
// "template-use-track-by-function": "error"
}
},
{
"files": [
"*.js"
],
"parserOptions": {
"ecmaVersion": 2022
},
"env": {
"es6": true
}
}
],
"globals": {
"globalThis": "readonly",
"describe": "readonly",
"fdescribe": "readonly",
"xdescribe": "readonly",
"beforeEach": "readonly",
"it": "readonly",
"fit": "readonly",
"xit": "readonly",
"expect": "readonly",
"afterEach": "readonly",
"jasmine": "readonly",
"console": "readonly",
"confirm": "readonly",
"document": "readonly",
"setTimeout": "readonly",
"localStorage": "readonly",
"fetch": "readonly",
"location": "readonly"
}
}