plugin-options.json 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "type": "object",
  4. "properties": {
  5. "async": {
  6. "type": "boolean",
  7. "description": "When true, plugin will not block compilation to finish issues checking"
  8. },
  9. "typescript": {
  10. "$ref": "#/definitions/TypeScriptOptions"
  11. },
  12. "formatter": {
  13. "$ref": "#/definitions/FormatterOptions"
  14. },
  15. "issue": {
  16. "$ref": "#/definitions/IssueOptions"
  17. },
  18. "logger": {
  19. "$ref": "#/definitions/Logger"
  20. },
  21. "devServer": {
  22. "type": "boolean",
  23. "description": "Enable reporting to Webpack Dev Server."
  24. }
  25. },
  26. "additionalProperties": false,
  27. "definitions": {
  28. "Formatter": {
  29. "instanceof": "Function"
  30. },
  31. "ComplexFormatterPreferences": {
  32. "type": "object",
  33. "properties": {
  34. "type": {
  35. "$ref": "#/definitions/FormatterType"
  36. },
  37. "pathType": {
  38. "$ref": "#/definitions/FormatterPathType"
  39. },
  40. "options": {
  41. "type": "object",
  42. "additionalProperties": true
  43. }
  44. },
  45. "required": ["type"]
  46. },
  47. "FormatterType": {
  48. "type": "string",
  49. "enum": ["basic", "codeframe"]
  50. },
  51. "FormatterPathType": {
  52. "type": "string",
  53. "enum": ["relative", "absolute"]
  54. },
  55. "IssueMatch": {
  56. "type": "object",
  57. "properties": {
  58. "severity": {
  59. "type": "string",
  60. "enum": ["error", "warning"]
  61. },
  62. "code": {
  63. "type": "string"
  64. },
  65. "file": {
  66. "type": "string"
  67. }
  68. }
  69. },
  70. "IssuePredicate": {
  71. "instanceof": "Function"
  72. },
  73. "IssuePredicateOption": {
  74. "oneOf": [
  75. {
  76. "$ref": "#/definitions/IssuePredicate"
  77. },
  78. {
  79. "$ref": "#/definitions/IssueMatch"
  80. },
  81. {
  82. "type": "array",
  83. "items": {
  84. "oneOf": [
  85. {
  86. "$ref": "#/definitions/IssuePredicate"
  87. },
  88. {
  89. "$ref": "#/definitions/IssueMatch"
  90. }
  91. ]
  92. }
  93. }
  94. ]
  95. },
  96. "Logger": {
  97. "oneOf": [
  98. {
  99. "type": "object",
  100. "properties": {
  101. "error": {
  102. "instanceof": "Function"
  103. },
  104. "log": {
  105. "instanceof": "Function"
  106. }
  107. }
  108. },
  109. {
  110. "type": "string",
  111. "enum": ["webpack-infrastructure"]
  112. }
  113. ]
  114. },
  115. "TypeScriptOptions": {
  116. "type": "object",
  117. "properties": {
  118. "memoryLimit": {
  119. "type": "number",
  120. "description": "Memory limit for TypeScript reporter process."
  121. },
  122. "configFile": {
  123. "type": "string",
  124. "description": "Path to tsconfig.json. By default plugin uses context or process.cwd() to localize tsconfig.json file."
  125. },
  126. "context": {
  127. "type": "string",
  128. "description": "The base path for finding files specified in the tsconfig.json. Same as context option from the ts-loader."
  129. },
  130. "build": {
  131. "type": "boolean",
  132. "description": "The equivalent of the `--build` flag from the `tsc`."
  133. },
  134. "mode": {
  135. "type": "string",
  136. "enum": ["readonly", "write-tsbuildinfo", "write-dts", "write-references"],
  137. "description": "`readonly` keeps all emitted files in memory, `write-tsbuildinfo` which writes only .tsbuildinfo files, `write-dts` writes .tsbuildinfo and type definition files, and `write-references` which writes both .tsbuildinfo and referenced projects output"
  138. },
  139. "compilerOptions": {
  140. "type": "object",
  141. "description": "Custom compilerOptions to be passed to the TypeScript compiler.",
  142. "additionalProperties": true
  143. },
  144. "diagnosticOptions": {
  145. "type": "object",
  146. "description": "Types of diagnostics to be reported.",
  147. "properties": {
  148. "syntactic": {
  149. "type": "boolean"
  150. },
  151. "semantic": {
  152. "type": "boolean"
  153. },
  154. "declaration": {
  155. "type": "boolean"
  156. },
  157. "global": {
  158. "type": "boolean"
  159. }
  160. }
  161. },
  162. "profile": {
  163. "type": "boolean",
  164. "description": "Measures and prints timings related to the TypeScript performance."
  165. },
  166. "typescriptPath": {
  167. "type": "string",
  168. "description": "If supplied this is a custom path where TypeScript can be found."
  169. }
  170. }
  171. },
  172. "FormatterOptions": {
  173. "oneOf": [
  174. {
  175. "$ref": "#/definitions/FormatterType"
  176. },
  177. {
  178. "$ref": "#/definitions/ComplexFormatterPreferences"
  179. },
  180. {
  181. "$ref": "#/definitions/Formatter"
  182. }
  183. ]
  184. },
  185. "IssueOptions": {
  186. "type": "object",
  187. "properties": {
  188. "include": {
  189. "$ref": "#/definitions/IssuePredicateOption"
  190. },
  191. "exclude": {
  192. "$ref": "#/definitions/IssuePredicateOption"
  193. }
  194. }
  195. }
  196. }
  197. }