options.json 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. "type": "object",
  3. "additionalProperties": true,
  4. "properties": {
  5. "cache": {
  6. "description": "This option will enable caching of the linting results into a file. This is particularly useful in reducing linting time when doing a full build.",
  7. "anyOf": [{ "type": "boolean" }, { "type": "string" }]
  8. },
  9. "eslintPath": {
  10. "description": "Path to `eslint` instance that will be used for linting. If the `eslintPath` is a folder like a official eslint, or specify a `formatter` option. now you dont have to install `eslint` .",
  11. "type": "string"
  12. },
  13. "formatter": {
  14. "description": "Loader accepts a function that will have one argument: an array of eslint messages (object). The function must return the output as a string.",
  15. "anyOf": [{ "type": "string" }, { "instanceof": "Function" }]
  16. },
  17. "fix": {
  18. "description": "This option will enable ESLint autofix feature",
  19. "type": "boolean"
  20. },
  21. "emitError": {
  22. "description": "Loader will always return errors if this option is set to `true`.",
  23. "type": "boolean"
  24. },
  25. "emitWarning": {
  26. "description": "Loader will always return warnings if option is set to `true`. If you're using hot module replacement, you may wish to enable this in development, or else updates will be skipped when there's an eslint error.",
  27. "type": "boolean"
  28. },
  29. "failOnError": {
  30. "description": "Loader will cause the module build to fail if there are any eslint errors.",
  31. "type": "boolean"
  32. },
  33. "failOnWarning": {
  34. "description": "Loader will cause the module build to fail if there are any eslint warnings.",
  35. "type": "boolean"
  36. },
  37. "quiet": {
  38. "description": "Loader will process and report errors only and ignore warnings if this option is set to true",
  39. "type": "boolean"
  40. },
  41. "outputReport": {
  42. "description": "Write the output of the errors to a file, for example a checkstyle xml file for use for reporting on Jenkins CI",
  43. "anyOf": [
  44. {
  45. "type": "boolean"
  46. },
  47. {
  48. "type": "object",
  49. "additionalProperties": false,
  50. "properties": {
  51. "filePath": {
  52. "description": "The `filePath` is relative to the webpack config: output.path",
  53. "anyOf": [{ "type": "string" }]
  54. },
  55. "formatter": {
  56. "description": "You can pass in a different formatter for the output file, if none is passed in the default/configured formatter will be used",
  57. "anyOf": [{ "type": "string" }, { "instanceof": "Function" }]
  58. }
  59. }
  60. }
  61. ]
  62. }
  63. }
  64. }