mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA-4695] Fix saving screenshots for E2Es, add nx eslint plugin (#3148)
* [ACA-4695] Fix saving screenshots for E2Es, add nx eslint plugin * [ACA-4695] Improve eslint rules
This commit is contained in:
197
.eslintrc.json
197
.eslintrc.json
@@ -3,6 +3,7 @@
|
||||
"ignorePatterns": [
|
||||
"projects/**/*"
|
||||
],
|
||||
"plugins": ["@nrwl/nx"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
@@ -12,8 +13,8 @@
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:@angular-eslint/ng-cli-compat",
|
||||
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
|
||||
"plugin:@nrwl/nx/typescript",
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
"plugin:@cspell/recommended"
|
||||
],
|
||||
@@ -23,7 +24,12 @@
|
||||
"prettier",
|
||||
"ban",
|
||||
"@cspell",
|
||||
"license-header"
|
||||
"license-header",
|
||||
"eslint-plugin-import",
|
||||
"@angular-eslint/eslint-plugin",
|
||||
"eslint-plugin-unicorn",
|
||||
"eslint-plugin-rxjs",
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"ban/ban": [
|
||||
@@ -67,14 +73,6 @@
|
||||
"prettier/prettier": "error",
|
||||
"no-shadow": "off",
|
||||
"@typescript-eslint/no-shadow": "error",
|
||||
"prefer-arrow/prefer-arrow-functions": [
|
||||
"warn",
|
||||
{
|
||||
"disallowPrototype": true,
|
||||
"singleReturnOnly": true,
|
||||
"classPropertiesAllowed": false
|
||||
}
|
||||
],
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
@@ -95,10 +93,33 @@
|
||||
"style": "camelCase"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/component-class-suffix": "error",
|
||||
"@angular-eslint/directive-class-suffix": "error",
|
||||
"@angular-eslint/no-conflicting-lifecycle": "error",
|
||||
"@typescript-eslint/no-floating-promises": "off",
|
||||
"@angular-eslint/no-input-rename": "error",
|
||||
"@angular-eslint/no-output-native": "error",
|
||||
"@angular-eslint/no-output-on-prefix": "error",
|
||||
"@angular-eslint/no-output-rename": "error",
|
||||
"@angular-eslint/no-host-metadata-property": "off",
|
||||
"@angular-eslint/no-outputs-metadata-property": "error",
|
||||
"@angular-eslint/use-lifecycle-interface": "error",
|
||||
"@angular-eslint/use-pipe-transform-interface": "error",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/prefer-function-type": "error",
|
||||
"@typescript-eslint/triple-slash-reference": "error",
|
||||
"@typescript-eslint/unified-signatures": "error",
|
||||
"@typescript-eslint/no-unused-vars": "warn",
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
"@typescript-eslint/member-ordering": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-unused-expressions": "error",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/ban-types": "error",
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"off",
|
||||
{
|
||||
@@ -118,10 +139,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/semi": [
|
||||
"off",
|
||||
null
|
||||
],
|
||||
"@typescript-eslint/semi": ["error", "always"],
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
{
|
||||
@@ -131,32 +149,153 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/type-annotation-spacing": "off",
|
||||
"@typescript-eslint/no-inferrable-types": [
|
||||
"error",
|
||||
{
|
||||
"ignoreParameters": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"single",
|
||||
{
|
||||
"avoidEscape": true,
|
||||
"allowTemplateLiterals": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"arrow-parents": [
|
||||
"off",
|
||||
"always"
|
||||
],
|
||||
"brace-style": [
|
||||
"off",
|
||||
"off"
|
||||
"error",
|
||||
"1tbs",
|
||||
{
|
||||
"allowSingleLine": true
|
||||
}
|
||||
],
|
||||
"eol-last": "off",
|
||||
"constructor-super": "error",
|
||||
"curly": "error",
|
||||
"dot-notation": "off",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": ["error", "smart"],
|
||||
"guard-for-in": "error",
|
||||
"id-blacklist": "off",
|
||||
"id-match": "off",
|
||||
"id-denylist": "off",
|
||||
"import/no-deprecated": "error",
|
||||
"linebreak-style": "off",
|
||||
"max-len": "off",
|
||||
"new-parens": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"import/order": "off",
|
||||
"max-len": [
|
||||
"error",
|
||||
{
|
||||
"code": 180
|
||||
}
|
||||
],
|
||||
"no-duplicate-imports": "error",
|
||||
"no-extra-semi": "off",
|
||||
"no-irregular-whitespace": "off",
|
||||
"no-empty": "off",
|
||||
"no-empty-function": "off",
|
||||
"no-irregular-whitespace": "error",
|
||||
"no-return-await": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-useless-escape": "off",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-async-promise-executor": "warn",
|
||||
"no-unsafe-optional-chaining": "warn",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-global-assign": "error",
|
||||
"no-cond-assign": "error",
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": [
|
||||
"warn",
|
||||
"dir",
|
||||
"timeLog",
|
||||
"assert",
|
||||
"clear",
|
||||
"count",
|
||||
"countReset",
|
||||
"group",
|
||||
"groupEnd",
|
||||
"table",
|
||||
"dirxml",
|
||||
"error",
|
||||
"groupCollapsed",
|
||||
"Console",
|
||||
"profile",
|
||||
"profileEnd",
|
||||
"timeStamp",
|
||||
"context"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-case-declarations": "error",
|
||||
"no-debugger": "error",
|
||||
"no-constant-condition": "error",
|
||||
"no-eval": "error",
|
||||
"no-regex-spaces": "error",
|
||||
"no-extra-boolean-cast": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-multiple-empty-lines": "error",
|
||||
"no-new-wrappers": "error",
|
||||
"no-restricted-imports": ["error", "rxjs/Rx"],
|
||||
"no-self-assign": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-unused-labels": "error",
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"quote-props": "off",
|
||||
"quotes": "off",
|
||||
"radix": "error",
|
||||
"rxjs/no-create": "error",
|
||||
"rxjs/no-subject-unsubscribe": "error",
|
||||
"rxjs/no-subject-value": "error",
|
||||
"rxjs/no-unsafe-takeuntil": "error",
|
||||
"rxjs/ban-operators": "error",
|
||||
"rxjs/no-ignored-subscribe": "error",
|
||||
"rxjs/no-unsafe-catch": [
|
||||
"error",
|
||||
{
|
||||
"observable": "action(s|\\$)?"
|
||||
}
|
||||
],
|
||||
"rxjs/no-unsafe-switchmap": [
|
||||
"error",
|
||||
{
|
||||
"disallow": [
|
||||
"add",
|
||||
"create",
|
||||
"delete",
|
||||
"post",
|
||||
"put",
|
||||
"remove",
|
||||
"set",
|
||||
"update"
|
||||
],
|
||||
"observable": "action(s|\\$)?"
|
||||
}
|
||||
],
|
||||
"semi": "error",
|
||||
"use-isnan": "error",
|
||||
|
||||
"spaced-comment": [
|
||||
"error",
|
||||
"always",
|
||||
{
|
||||
"markers": ["/"],
|
||||
"exceptions": ["!", "*"]
|
||||
}
|
||||
],
|
||||
"space-before-function-paren": "off",
|
||||
"space-in-parens": [
|
||||
"off",
|
||||
@@ -165,13 +304,16 @@
|
||||
"unicorn/filename-case": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.js"],
|
||||
"extends": ["plugin:@nrwl/nx/javascript"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"*.html"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@angular-eslint/template/recommended"
|
||||
],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||
"rules": {
|
||||
"@angular-eslint/template/no-autofocus": "error",
|
||||
"@angular-eslint/template/no-negated-async": "off",
|
||||
@@ -186,6 +328,13 @@
|
||||
"@angular-eslint/template/accessibility-label-has-associated-control": "error",
|
||||
"@angular-eslint/template/eqeqeq": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.spec.ts", "*.test.ts"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-floating-promises": "off",
|
||||
"max-lines": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user