.eslintrc.json 4.9 KB

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