.eslintrc.json 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {
  2. "extends": [
  3. "airbnb",
  4. "plugin:prettier/recommended"
  5. ],
  6. "root": true,
  7. "env": {
  8. "browser": true,
  9. "es6": true,
  10. "node": true
  11. },
  12. "globals": {
  13. "Drupal": true,
  14. "drupalSettings": true,
  15. "drupalTranslations": true,
  16. "domready": true,
  17. "jQuery": true,
  18. "_": true,
  19. "matchMedia": true,
  20. "Cookies": true,
  21. "Backbone": true,
  22. "Modernizr": true,
  23. "Popper": true,
  24. "Sortable": true,
  25. "CKEDITOR": true
  26. },
  27. "rules": {
  28. "prettier/prettier": "error",
  29. "consistent-return": ["off"],
  30. "no-underscore-dangle": ["off"],
  31. "max-nested-callbacks": ["warn", 3],
  32. "import/no-mutable-exports": ["warn"],
  33. "no-plusplus": ["warn", {
  34. "allowForLoopAfterthoughts": true
  35. }],
  36. "no-param-reassign": ["off"],
  37. "no-prototype-builtins": ["off"],
  38. "valid-jsdoc": ["warn", {
  39. "prefer": {
  40. "returns": "return",
  41. "property": "prop"
  42. },
  43. "requireReturn": false
  44. }],
  45. "no-unused-vars": ["warn"],
  46. "operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }]
  47. }
  48. }