.eslintrc.json 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. "Backbone": true,
  21. "Modernizr": true,
  22. "CKEDITOR": true
  23. },
  24. "rules": {
  25. "prettier/prettier": "error",
  26. "consistent-return": ["off"],
  27. "no-underscore-dangle": ["off"],
  28. "max-nested-callbacks": ["warn", 3],
  29. "import/no-mutable-exports": ["warn"],
  30. "no-plusplus": ["warn", {
  31. "allowForLoopAfterthoughts": true
  32. }],
  33. "no-param-reassign": ["off"],
  34. "no-prototype-builtins": ["off"],
  35. "valid-jsdoc": ["warn", {
  36. "prefer": {
  37. "returns": "return",
  38. "property": "prop"
  39. },
  40. "requireReturn": false
  41. }],
  42. "no-unused-vars": ["warn"],
  43. "operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }]
  44. }
  45. }