mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
* [AAE-10474] Add husky pre-commit script to run lint-staged * [AAE-10474] Enable lint rules for console log * [AAE-10474] Run affected:lint command on pre-commit, remoive old scripts that use tslint * [AAE-10474] Remove console.log * [AAE-10474] Disable no-console lint rule for 'testing' and 'cli' projects
174 lines
4.6 KiB
JSON
174 lines
4.6 KiB
JSON
{
|
|
"root": true,
|
|
"ignorePatterns": [
|
|
"projects/**/*",
|
|
"**/node_modules/**/*",
|
|
"lib/cli/node_modules/**/*",
|
|
"**/node_modules",
|
|
"**/docker",
|
|
"**/assets",
|
|
"**/scripts",
|
|
"**/docs"
|
|
],
|
|
"overrides": [
|
|
{
|
|
"files": [
|
|
"*.ts"
|
|
],
|
|
"parserOptions": {
|
|
"project": [
|
|
"tsconfig.json",
|
|
"e2e/tsconfig.e2e.json"
|
|
],
|
|
"createDefaultProgram": true
|
|
},
|
|
"extends": [
|
|
"plugin:@angular-eslint/ng-cli-compat",
|
|
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
|
|
"plugin:@angular-eslint/template/process-inline-templates"
|
|
],
|
|
"plugins": [
|
|
"eslint-plugin-unicorn",
|
|
"eslint-plugin-rxjs",
|
|
"ban",
|
|
"license-header"
|
|
],
|
|
"rules": {
|
|
"ban/ban": [
|
|
"error",
|
|
{ "name": "eval", "message": "Calls to eval is not allowed." },
|
|
{ "name": "fdescribe", "message": "Calls to fdescribe is not allowed" },
|
|
{ "name": "fit", "message": "Calls to fit is not allowed" },
|
|
{ "name": "xit", "message": "Calls to xit is not allowed" },
|
|
{ "name": "xdescribe", "message": "Calls to xdescribe is not allowed" },
|
|
{ "name": ["test", "only"], "message": "Calls to test.only is not allowed" },
|
|
{ "name": ["describe", "only"], "message": "Calls to describe.only is not allowed" }
|
|
],
|
|
"@angular-eslint/component-selector": [
|
|
"error",
|
|
{
|
|
"type": "element",
|
|
"prefix": [
|
|
"adf",
|
|
"app"
|
|
],
|
|
"style": "kebab-case"
|
|
}
|
|
],
|
|
"@angular-eslint/directive-selector": [
|
|
"error",
|
|
{
|
|
"type": [
|
|
"element",
|
|
"attribute"
|
|
],
|
|
"prefix": [
|
|
"adf",
|
|
"app"
|
|
],
|
|
"style": "kebab-case"
|
|
}
|
|
],
|
|
"@angular-eslint/no-host-metadata-property": "off",
|
|
"@angular-eslint/no-input-prefix": "error",
|
|
"@typescript-eslint/consistent-type-definitions": "error",
|
|
"@typescript-eslint/dot-notation": "off",
|
|
"@typescript-eslint/explicit-member-accessibility": [
|
|
"off",
|
|
{
|
|
"accessibility": "explicit"
|
|
}
|
|
],
|
|
"@typescript-eslint/no-inferrable-types": "off",
|
|
"@typescript-eslint/no-require-imports": "off",
|
|
"@typescript-eslint/no-var-requires": "error",
|
|
"@typescript-eslint/naming-convention": [
|
|
"error",
|
|
{
|
|
"selector": [
|
|
"classProperty",
|
|
"objectLiteralProperty",
|
|
"typeProperty",
|
|
"classMethod",
|
|
"objectLiteralMethod",
|
|
"typeMethod",
|
|
"accessor",
|
|
"enumMember"
|
|
],
|
|
"format": null,
|
|
"modifiers": ["requiresQuotes"]
|
|
}
|
|
],
|
|
"@typescript-eslint/member-ordering": "off",
|
|
"prefer-arrow/prefer-arrow-functions": "off",
|
|
|
|
"brace-style": [
|
|
"error",
|
|
"1tbs"
|
|
],
|
|
"comma-dangle": "error",
|
|
"default-case": "error",
|
|
"import/order": "off",
|
|
"max-len": [
|
|
"error",
|
|
{
|
|
"code": 240
|
|
}
|
|
],
|
|
"no-bitwise": "off",
|
|
"no-console": [
|
|
"error",
|
|
{
|
|
"allow": [
|
|
"warn",
|
|
"dir",
|
|
"timeLog",
|
|
"assert",
|
|
"clear",
|
|
"count",
|
|
"countReset",
|
|
"group",
|
|
"groupEnd",
|
|
"table",
|
|
"dirxml",
|
|
"error",
|
|
"groupCollapsed",
|
|
"Console",
|
|
"profile",
|
|
"profileEnd",
|
|
"timeStamp",
|
|
"context"
|
|
]
|
|
}
|
|
],
|
|
"no-duplicate-imports": "error",
|
|
"no-multiple-empty-lines": "error",
|
|
"no-redeclare": "error",
|
|
"no-return-await": "error",
|
|
"rxjs/no-create": "error",
|
|
"rxjs/no-subject-unsubscribe": "error",
|
|
"rxjs/no-subject-value": "error",
|
|
"rxjs/no-unsafe-takeuntil": "error",
|
|
"unicorn/filename-case": "error",
|
|
"@typescript-eslint/no-unused-expressions": [
|
|
"error",
|
|
{
|
|
"allowShortCircuit": true,
|
|
"allowTernary": true
|
|
}
|
|
],
|
|
"license-header/header": ["error", "./license-community.txt"]
|
|
}
|
|
},
|
|
{
|
|
"files": [
|
|
"*.html"
|
|
],
|
|
"extends": [
|
|
"plugin:@angular-eslint/template/recommended"
|
|
],
|
|
"rules": {}
|
|
}
|
|
]
|
|
}
|