You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
4.4 KiB

  1. {
  2. "root": true,
  3. "ignorePatterns": [
  4. "src/test.ts",
  5. "**/*.spec.ts",
  6. "projects/**/*"
  7. ],
  8. "overrides": [
  9. {
  10. "files": [
  11. "*.ts"
  12. ],
  13. "parserOptions": {
  14. "project": [
  15. "tsconfig.json"
  16. ],
  17. "createDefaultProgram": true
  18. },
  19. "extends": [
  20. "plugin:@angular-eslint/recommended",
  21. "plugin:@angular-eslint/template/process-inline-templates"
  22. ],
  23. "rules": {
  24. "spaced-comment": [
  25. "error",
  26. "always",
  27. {
  28. "line": {
  29. "markers": [
  30. "/"
  31. ],
  32. "exceptions": [
  33. "-",
  34. "+"
  35. ]
  36. },
  37. "block": {
  38. "markers": [
  39. "!"
  40. ],
  41. "exceptions": [
  42. "*"
  43. ],
  44. "balanced": true
  45. }
  46. }
  47. ],
  48. "curly": [
  49. "error",
  50. "all"
  51. ],
  52. "eol-last": "error",
  53. "guard-for-in": "error",
  54. "indent": [
  55. "error",
  56. 2,
  57. {
  58. "SwitchCase": 1
  59. }
  60. ],
  61. "no-labels": "error",
  62. "max-len": [
  63. "error",
  64. 140,
  65. 4
  66. ],
  67. "no-caller": "error",
  68. "no-bitwise": "error",
  69. "no-console": "off",
  70. "no-restricted-syntax": [
  71. "error",
  72. {
  73. "selector": "CallExpression[callee.object.name=\"console\"][callee.property.name!=/^(log|warn|error|info|trace)$/]",
  74. "message": "Unexpected property on console object was called"
  75. }
  76. ],
  77. "no-new-wrappers": "error",
  78. "no-debugger": "error",
  79. "no-empty": "off",
  80. "no-eval": "error",
  81. "no-shadow": [
  82. "error",
  83. {
  84. "hoist": "functions"
  85. }
  86. ],
  87. "no-throw-literal": "error",
  88. "no-fallthrough": "error",
  89. "no-trailing-spaces": "error",
  90. "no-unused-expressions": [
  91. "error",
  92. {
  93. "allowTernary": true
  94. }
  95. ],
  96. "no-var": "error",
  97. "prefer-const": [
  98. "error",
  99. {
  100. "destructuring": "any",
  101. "ignoreReadBeforeAssign": false
  102. }
  103. ],
  104. "quotes": [
  105. "error",
  106. "single",
  107. {
  108. "allowTemplateLiterals": true,
  109. "avoidEscape": true
  110. }
  111. ],
  112. "radix": "error",
  113. "semi": [
  114. "error",
  115. "always"
  116. ],
  117. "eqeqeq": [
  118. "error",
  119. "allow-null"
  120. ],
  121. "camelcase": "off",
  122. "@angular-eslint/directive-selector": [
  123. "error",
  124. {
  125. "type": "attribute",
  126. "prefix": [
  127. "app",
  128. "cust"
  129. ],
  130. "style": "camelCase"
  131. }
  132. ],
  133. "@angular-eslint/component-selector": [
  134. "error",
  135. {
  136. "type": "element",
  137. "prefix": [
  138. "app",
  139. "cust"
  140. ],
  141. "style": "kebab-case"
  142. }
  143. ],
  144. "@angular-eslint/no-inputs-metadata-property": "error",
  145. "@angular-eslint/no-outputs-metadata-property": "error",
  146. "@angular-eslint/no-host-metadata-property": "error",
  147. "@angular-eslint/no-input-rename": "error",
  148. "@angular-eslint/no-output-rename": "error",
  149. "@angular-eslint/use-lifecycle-interface": "error",
  150. "@angular-eslint/use-pipe-transform-interface": "error",
  151. "@angular-eslint/component-class-suffix": "error",
  152. "@angular-eslint/directive-class-suffix": "error",
  153. "@angular-eslint/use-component-view-encapsulation": "off",
  154. "@angular-eslint/no-attribute-decorator": "error",
  155. "@angular-eslint/no-output-native": "error",
  156. "@angular-eslint/no-output-on-prefix": "error",
  157. "@angular-eslint/no-forward-ref": "off",
  158. "@angular-eslint/no-unused-css": "off",
  159. "@angular-eslint/contextual-lifecycle": "error",
  160. "@angular-eslint/no-pipe-impure": "error",
  161. "@angular-eslint/no-empty-lifecycle-method": [
  162. "off"
  163. ],
  164. "@angular-eslint/no-conflicting-lifecycle": "off"
  165. }
  166. },
  167. {
  168. "files": [
  169. "*.html"
  170. ],
  171. "extends": [
  172. "plugin:@angular-eslint/template/recommended"
  173. ],
  174. "rules": {}
  175. }
  176. ]
  177. }