.eslintrc.json 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. {
  2. "root": true,
  3. "ignorePatterns": [
  4. "projects/**/*",
  5. "node_modules/"
  6. ],
  7. "overrides": [
  8. {
  9. "files": [
  10. "*.ts"
  11. ],
  12. "parserOptions": {
  13. "project": [
  14. "tsconfig.eslint.json"
  15. ],
  16. "createDefaultProgram": false
  17. },
  18. "extends": [
  19. "../.eslintrc.json",
  20. "plugin:@angular-eslint/ng-cli-compat",
  21. "plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
  22. "plugin:@angular-eslint/template/process-inline-templates"
  23. ],
  24. "rules": {
  25. "jsdoc/newline-after-description": "off",
  26. "jsdoc/check-alignment": "off",
  27. "lines-between-class-members": "off",
  28. "@typescript-eslint/lines-between-class-members": [ "off" ],
  29. "arrow-body-style": "off",
  30. "import/no-webpack-loader-syntax": "off",
  31. "no-underscore-dangle": "off",
  32. "node/no-callback-literal": "off",
  33. "@angular-eslint/component-selector": [
  34. "error",
  35. {
  36. "type": [ "element", "attribute" ],
  37. "prefix": "my",
  38. "style": "kebab-case"
  39. }
  40. ],
  41. "@angular-eslint/directive-selector": [
  42. "error",
  43. {
  44. "type": [ "element", "attribute" ],
  45. "prefix": "my",
  46. "style": "camelCase"
  47. }
  48. ],
  49. "@typescript-eslint/no-this-alias": [
  50. "error",
  51. {
  52. "allowDestructuring": true,
  53. "allowedNames": ["self", "player"]
  54. }
  55. ],
  56. "@typescript-eslint/prefer-readonly": "off",
  57. "@angular-eslint/use-component-view-encapsulation": "error",
  58. "prefer-arrow/prefer-arrow-functions": "off",
  59. "@typescript-eslint/await-thenable": "error",
  60. "@typescript-eslint/consistent-type-definitions": "off",
  61. "@typescript-eslint/dot-notation": "off",
  62. "@typescript-eslint/explicit-member-accessibility": [
  63. "off",
  64. {
  65. "accessibility": "explicit"
  66. }
  67. ],
  68. "@typescript-eslint/member-ordering": [
  69. "off"
  70. ],
  71. "@typescript-eslint/member-delimiter-style": [
  72. "error",
  73. {
  74. "multiline": {
  75. "delimiter": "none",
  76. "requireLast": true
  77. },
  78. "singleline": {
  79. "delimiter": "comma",
  80. "requireLast": false
  81. }
  82. }
  83. ],
  84. "@typescript-eslint/prefer-for-of": "off",
  85. "@typescript-eslint/no-empty-function": "error",
  86. "@typescript-eslint/no-floating-promises": "off",
  87. "@typescript-eslint/no-inferrable-types": "error",
  88. "@typescript-eslint/no-shadow": [
  89. "off",
  90. {
  91. "hoist": "all"
  92. }
  93. ],
  94. "@typescript-eslint/no-unnecessary-qualifier": "error",
  95. "@typescript-eslint/no-unnecessary-type-assertion": "error",
  96. "@typescript-eslint/no-unused-expressions": [
  97. "error",
  98. {
  99. "allowTaggedTemplates": true,
  100. "allowShortCircuit": true
  101. }
  102. ],
  103. "@typescript-eslint/quotes": [
  104. "error",
  105. "single",
  106. {
  107. "avoidEscape": true,
  108. "allowTemplateLiterals": true
  109. }
  110. ],
  111. "@typescript-eslint/semi": [
  112. "error",
  113. "never"
  114. ],
  115. "brace-style": [
  116. "error",
  117. "1tbs"
  118. ],
  119. "comma-dangle": "error",
  120. "curly": [
  121. "error",
  122. "multi-line"
  123. ],
  124. "dot-notation": "off",
  125. "no-useless-return": "off",
  126. "indent": "off",
  127. "no-bitwise": "off",
  128. "no-console": "off",
  129. "no-return-assign": "off",
  130. "no-constant-condition": "error",
  131. "no-control-regex": "error",
  132. "no-duplicate-imports": "error",
  133. "no-empty": "error",
  134. "no-empty-function": [
  135. "error",
  136. { "allow": [ "constructors" ] }
  137. ],
  138. "no-invalid-regexp": "error",
  139. "no-multiple-empty-lines": "error",
  140. "no-redeclare": "error",
  141. "no-regex-spaces": "error",
  142. "no-return-await": "error",
  143. "no-shadow": "off",
  144. "no-unused-expressions": "error",
  145. "semi": "error",
  146. "space-before-function-paren": [
  147. "error",
  148. "always"
  149. ],
  150. "space-in-parens": [
  151. "error",
  152. "never"
  153. ],
  154. "object-shorthand": [
  155. "error",
  156. "properties"
  157. ]
  158. }
  159. },
  160. {
  161. "files": [
  162. "*.html"
  163. ],
  164. "extends": [
  165. "plugin:@angular-eslint/template/recommended"
  166. ],
  167. "rules": {}
  168. }
  169. ]
  170. }