Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

validators.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. "use strict";
  2. // These validator functions answer the question “Is the config valid?” – return
  3. // `false` if the options DO conflict with Prettier, and `true` if they don’t.
  4. module.exports = {
  5. "curly"({ options }) {
  6. if (options.length === 0) {
  7. return true;
  8. }
  9. const firstOption = options[0];
  10. return firstOption !== "multi-line" && firstOption !== "multi-or-nest";
  11. },
  12. "lines-around-comment"({ options }) {
  13. if (options.length === 0) {
  14. return false;
  15. }
  16. const firstOption = options[0];
  17. return Boolean(
  18. firstOption &&
  19. firstOption.allowBlockStart &&
  20. firstOption.allowBlockEnd &&
  21. firstOption.allowObjectStart &&
  22. firstOption.allowObjectEnd &&
  23. firstOption.allowArrayStart &&
  24. firstOption.allowArrayEnd
  25. );
  26. },
  27. "no-confusing-arrow"({ options }) {
  28. if (options.length === 0) {
  29. return false;
  30. }
  31. const firstOption = options[0];
  32. return firstOption ? firstOption.allowParens === false : false;
  33. },
  34. "no-tabs"({ options }) {
  35. if (options.length === 0) {
  36. return false;
  37. }
  38. const firstOption = options[0];
  39. return Boolean(firstOption && firstOption.allowIndentationTabs);
  40. },
  41. "vue/html-self-closing"({ options }) {
  42. if (options.length === 0) {
  43. return false;
  44. }
  45. const firstOption = options[0];
  46. return Boolean(
  47. firstOption && firstOption.html && firstOption.html.void === "any"
  48. // Enable when Prettier supports SVG: https://github.com/prettier/prettier/issues/5322
  49. // && firstOption.svg === "any"
  50. );
  51. },
  52. };