options.json 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {
  2. "type": "object",
  3. "additionalProperties": true,
  4. "properties": {
  5. "context": {
  6. "description": "A string indicating the root of your files.",
  7. "type": "string"
  8. },
  9. "emitError": {
  10. "description": "The errors found will always be emitted, to disable set to `false`.",
  11. "type": "boolean"
  12. },
  13. "emitWarning": {
  14. "description": "The warnings found will always be emitted, to disable set to `false`.",
  15. "type": "boolean"
  16. },
  17. "eslintPath": {
  18. "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`.",
  19. "type": "string"
  20. },
  21. "exclude": {
  22. "description": "Specify the files and/or directories to exclude. Must be relative to `options.context`.",
  23. "anyOf": [{ "type": "string" }, { "type": "array" }]
  24. },
  25. "failOnError": {
  26. "description": "Will cause the module build to fail if there are any errors, to disable set to `false`.",
  27. "type": "boolean"
  28. },
  29. "failOnWarning": {
  30. "description": "Will cause the module build to fail if there are any warnings, if set to `true`.",
  31. "type": "boolean"
  32. },
  33. "files": {
  34. "description": "Specify the files and/or directories to traverse. Must be relative to `options.context`.",
  35. "anyOf": [{ "type": "string" }, { "type": "array" }]
  36. },
  37. "extensions": {
  38. "description": "Specify extensions that should be checked.",
  39. "anyOf": [{ "type": "string" }, { "type": "array" }]
  40. },
  41. "fix": {
  42. "description": "Will enable ESLint autofix feature",
  43. "type": "boolean"
  44. },
  45. "formatter": {
  46. "description": "Accepts a function that will have one argument: an array of eslint messages (object). The function must return the output as a string.",
  47. "anyOf": [{ "type": "string" }, { "instanceof": "Function" }]
  48. },
  49. "lintDirtyModulesOnly": {
  50. "description": "Lint only changed files, skip lint on start.",
  51. "type": "boolean"
  52. },
  53. "quiet": {
  54. "description": "Will process and report errors only and ignore warnings, if set to `true`.",
  55. "type": "boolean"
  56. },
  57. "outputReport": {
  58. "description": "Write the output of the errors to a file, for example a checkstyle xml file for use for reporting on Jenkins CI",
  59. "anyOf": [
  60. {
  61. "type": "boolean"
  62. },
  63. {
  64. "type": "object",
  65. "additionalProperties": false,
  66. "properties": {
  67. "filePath": {
  68. "description": "The `filePath` is relative to the webpack config: output.path",
  69. "anyOf": [{ "type": "string" }]
  70. },
  71. "formatter": {
  72. "description": "You can pass in a different formatter for the output file, if none is passed in the default/configured formatter will be used",
  73. "anyOf": [{ "type": "string" }, { "instanceof": "Function" }]
  74. }
  75. }
  76. }
  77. ]
  78. },
  79. "threads": {
  80. "description": "Default is false. Set to true for an auto-selected pool size based on number of cpus. Set to a number greater than 1 to set an explicit pool size. Set to false, 1, or less to disable and only run in main process.",
  81. "anyOf": [{ "type": "number" }, { "type": "boolean" }]
  82. }
  83. }
  84. }