public-gateway-cacher/.eslintrc.json

135 lines
4.9 KiB
JSON
Raw Normal View History

2022-03-10 21:57:15 +00:00
{
"root": true,
"env": {
"browser": true
},
2022-03-11 07:06:35 +00:00
"ignorePatterns": ["projects/**/*"],
2022-03-10 21:57:15 +00:00
"overrides": [
{
2022-03-11 07:06:35 +00:00
"files": ["*.ts"],
2022-03-10 21:57:15 +00:00
"parserOptions": {
2022-03-11 07:06:35 +00:00
"project": ["tsconfig.json", "e2e/tsconfig.json"],
2022-03-10 21:57:15 +00:00
"createDefaultProgram": true
},
2022-03-11 07:06:35 +00:00
"plugins": ["rxjs-angular"],
2022-03-10 21:57:15 +00:00
"extends": [
2022-03-11 07:06:35 +00:00
"eslint:recommended",
2022-03-11 05:55:23 +00:00
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2022-03-11 07:06:35 +00:00
"prettier",
"plugin:rxjs/recommended",
2022-03-11 02:44:37 +00:00
"plugin:@angular-eslint/all",
"plugin:@angular-eslint/recommended--extra",
2022-03-10 21:57:15 +00:00
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
2022-03-11 02:44:37 +00:00
// Custom rules
// @typescript-eslint
"@typescript-eslint/array-type": "error",
"@typescript-eslint/class-literal-property-style": "error",
"@typescript-eslint/consistent-indexed-object-style": "error",
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "as",
"objectLiteralTypeAssertions": "never"
}
],
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "none",
"requireLast": true
}
}
],
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-confusing-void-expression": [
"error",
{
"ignoreArrowShorthand": true,
"ignoreVoidOperator": true
}
],
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-function": [
"error",
{
2022-03-11 07:06:35 +00:00
"allow": ["private-constructors", "protected-constructors"]
}
],
2022-03-11 07:06:35 +00:00
"@typescript-eslint/no-extra-parens": ["error", "functions"],
"@typescript-eslint/no-implicit-any-catch": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/non-nullable-type-assertion-style": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
2022-03-11 07:06:35 +00:00
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/sort-type-union-intersection-members": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/type-annotation-spacing": "error",
2022-03-11 07:06:35 +00:00
"@typescript-eslint/unified-signatures": "error",
// eslint-plugin-rxjs-angular
//"rxjs-angular/prefer-async-pipe": "error",
"rxjs-angular/prefer-takeuntil": "error"
2022-03-10 21:57:15 +00:00
}
},
{
2022-03-11 07:06:35 +00:00
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/all"],
2022-03-11 02:44:37 +00:00
"rules": {
// Custom rules
"@angular-eslint/template/i18n": "off"
}
2022-03-10 21:57:15 +00:00
}
]
}