1{ 2 "parser": "@typescript-eslint/parser", 3 "parserOptions": { 4 "warnOnUnsupportedTypeScriptVersion": false, 5 "ecmaVersion": 6, 6 "sourceType": "module" 7 }, 8 "env": { 9 "browser": false, 10 "node": true, 11 "es6": true 12 }, 13 "plugins": [ 14 "@typescript-eslint", "jsdoc", "no-null", "import" 15 ], 16 "rules": { 17 "@typescript-eslint/adjacent-overload-signatures": "error", 18 "@typescript-eslint/array-type": "error", 19 20 "brace-style": "off", 21 "@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }], 22 23 "@typescript-eslint/naming-convention": [ 24 "error", 25 { "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } }, 26 { "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false }, "filter": { "regex": "^I(Arguments|TextWriter|O([A-Z][a-z]+[A-Za-z]*)?)$", "match": false } }, 27 { "selector": "variable", "format": ["camelCase", "PascalCase", "UPPER_CASE"], "leadingUnderscore": "allow", "filter": { "regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$", "match": false } }, 28 { "selector": "function", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, 29 { "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$", "match": false } }, 30 { "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, 31 { "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, 32 { "selector": "enumMember", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } }, 33 { "selector": "property", "format": null } 34 ], 35 36 "@typescript-eslint/consistent-type-definitions": ["error", "interface"], 37 38 "no-duplicate-imports": "off", 39 "@typescript-eslint/no-duplicate-imports": "error", 40 41 "@typescript-eslint/no-inferrable-types": "error", 42 "@typescript-eslint/no-misused-new": "error", 43 "@typescript-eslint/no-this-alias": "error", 44 45 "no-unused-expressions": "off", 46 "@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }], 47 48 "@typescript-eslint/prefer-for-of": "error", 49 "@typescript-eslint/prefer-function-type": "error", 50 "@typescript-eslint/prefer-namespace-keyword": "error", 51 52 "quotes": "off", 53 "@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }], 54 55 "semi": "off", 56 "@typescript-eslint/semi": "error", 57 58 "space-before-function-paren": "off", 59 "@typescript-eslint/space-before-function-paren": ["error", { 60 "asyncArrow": "always", 61 "anonymous": "always", 62 "named": "never" 63 }], 64 65 "@typescript-eslint/triple-slash-reference": "error", 66 "@typescript-eslint/type-annotation-spacing": "error", 67 "@typescript-eslint/unified-signatures": "error", 68 69 // scripts/eslint/rules 70 "object-literal-surrounding-space": "error", 71 "no-type-assertion-whitespace": "error", 72 "type-operator-spacing": "error", 73 "only-arrow-functions": ["error", { 74 "allowNamedFunctions": true , 75 "allowDeclarations": true 76 }], 77 "no-double-space": "error", 78 "boolean-trivia": "error", 79 "no-in-operator": "error", 80 "simple-indent": "error", 81 "debug-assert": "error", 82 "no-keywords": "error", 83 "one-namespace-per-file": "error", 84 85 // eslint-plugin-import 86 "import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }], 87 88 // eslint-plugin-no-null 89 "no-null/no-null": "error", 90 91 // eslint-plugin-jsdoc 92 "jsdoc/check-alignment": "error", 93 94 // eslint 95 "constructor-super": "error", 96 "curly": ["error", "multi-line"], 97 "dot-notation": "error", 98 "eqeqeq": "error", 99 "linebreak-style": ["error", "windows"], 100 "new-parens": "error", 101 "no-caller": "error", 102 "no-duplicate-case": "error", 103 "no-empty": "error", 104 "no-eval": "error", 105 "no-extra-bind": "error", 106 "no-fallthrough": "error", 107 "no-new-func": "error", 108 "no-new-wrappers": "error", 109 "no-return-await": "error", 110 "no-restricted-globals": ["error", 111 { "name": "setTimeout" }, 112 { "name": "clearTimeout" }, 113 { "name": "setInterval" }, 114 { "name": "clearInterval" }, 115 { "name": "setImmediate" }, 116 { "name": "clearImmediate" } 117 ], 118 "no-sparse-arrays": "error", 119 "no-template-curly-in-string": "error", 120 "no-throw-literal": "error", 121 "no-trailing-spaces": "error", 122 "no-undef-init": "error", 123 "no-unsafe-finally": "error", 124 "no-unused-labels": "error", 125 "no-var": "error", 126 "object-shorthand": "error", 127 "prefer-const": "error", 128 "prefer-object-spread": "error", 129 "quote-props": ["error", "consistent-as-needed"], 130 "space-in-parens": "error", 131 "unicode-bom": ["error", "never"], 132 "use-isnan": "error" 133 } 134} 135