|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "parser": "@typescript-eslint/parser", |
| 4 | + "parserOptions": { |
| 5 | + "project": ["./tsconfig.json"] |
| 6 | + }, |
| 7 | + "plugins": ["@typescript-eslint", "sonarjs", "filename-rules"], |
| 8 | + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:sonarjs/recommended"], |
| 9 | + "ignorePatterns": ["**/*.js"], |
| 10 | + "rules": { |
| 11 | + "filename-rules/match": [2, "/^(e2e\\.ts$|.*\/e2e\\.ts$|[a-z0-9]+(?:[-._a-z0-9]+)*\\.ts|\\.[a-z0-9]+)$/"], |
| 12 | + "prefer-arrow-callback": ["warn", { "allowNamedFunctions": true }], |
| 13 | + "func-style": ["warn", "declaration", { "allowArrowFunctions": false }], |
| 14 | + "@typescript-eslint/no-floating-promises": "error", |
| 15 | + "@typescript-eslint/no-non-null-assertion": "error", |
| 16 | + "constructor-super": "error", |
| 17 | + "no-invalid-this": "off", |
| 18 | + "@typescript-eslint/no-invalid-this": ["error"], |
| 19 | + "no-restricted-syntax": ["error", "ForInStatement"], |
| 20 | + "use-isnan": "error", |
| 21 | + "no-unneeded-ternary": "error", |
| 22 | + "no-nested-ternary": "error", |
| 23 | + "@typescript-eslint/no-unused-vars": [ |
| 24 | + "error", |
| 25 | + { |
| 26 | + "args": "after-used", |
| 27 | + "ignoreRestSiblings": true, |
| 28 | + "vars": "all", |
| 29 | + "varsIgnorePattern": "^_", |
| 30 | + "argsIgnorePattern": "^_" |
| 31 | + } |
| 32 | + ], |
| 33 | + "@typescript-eslint/await-thenable": "error", |
| 34 | + "@typescript-eslint/no-misused-new": "error", |
| 35 | + "@typescript-eslint/restrict-plus-operands": "error", |
| 36 | + "sonarjs/no-all-duplicated-branches": "error", |
| 37 | + "sonarjs/no-collection-size-mischeck": "error", |
| 38 | + "sonarjs/no-duplicated-branches": "error", |
| 39 | + "sonarjs/no-element-overwrite": "error", |
| 40 | + "sonarjs/no-identical-conditions": "error", |
| 41 | + "sonarjs/no-identical-expressions": "error", |
| 42 | + "@typescript-eslint/naming-convention": [ |
| 43 | + "error", |
| 44 | + { "selector": "interface", "format": ["StrictPascalCase"], "custom": { "regex": "^I[A-Z]", "match": false } }, |
| 45 | + { "selector": "memberLike", "modifiers": ["private"], "format": ["strictCamelCase"], "leadingUnderscore": "require" }, |
| 46 | + { "selector": "typeLike", "format": ["StrictPascalCase"] }, |
| 47 | + { "selector": "typeParameter", "format": ["StrictPascalCase"], "prefix": ["T"] }, |
| 48 | + { "selector": "variable", "format": ["strictCamelCase", "UPPER_CASE"], "leadingUnderscore": "allow", "trailingUnderscore": "allow" }, |
| 49 | + { "selector": "variable", "format": ["strictCamelCase"], "leadingUnderscore": "allow", "trailingUnderscore": "allow" }, |
| 50 | + { "selector": "variable", "modifiers": ["destructured"], "format": null }, |
| 51 | + { "selector": "variable", "types": ["boolean"], "format": ["StrictPascalCase"], "prefix": ["is", "should", "has", "can", "did", "will", "does"] }, |
| 52 | + { "selector": "variableLike", "format": ["strictCamelCase"] }, |
| 53 | + { "selector": ["function", "variable"], "format": ["strictCamelCase"] } |
| 54 | + ] |
| 55 | + } |
| 56 | +} |
0 commit comments