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.

97 lines
2.7KB

  1. {
  2. "extends": "eslint:recommended",
  3. "root": true,
  4. "env": {
  5. "browser": true
  6. },
  7. "globals": {
  8. "Drupal": true,
  9. "drupalSettings": true,
  10. "drupalTranslations": true,
  11. "domready": true,
  12. "jQuery": true,
  13. "_": true,
  14. "matchMedia": true,
  15. "Backbone": true,
  16. "Modernizr": true,
  17. "CKEDITOR": true
  18. },
  19. "rules": {
  20. // Errors.
  21. "array-bracket-spacing": [2, "never"],
  22. "block-scoped-var": 2,
  23. "brace-style": [2, "stroustrup", {"allowSingleLine": true}],
  24. "comma-dangle": [2, "never"],
  25. "comma-spacing": 2,
  26. "comma-style": [2, "last"],
  27. "computed-property-spacing": [2, "never"],
  28. "curly": [2, "all"],
  29. "eol-last": 2,
  30. "eqeqeq": [2, "smart"],
  31. "guard-for-in": 2,
  32. "indent": [2, 2, {"SwitchCase": 1}],
  33. "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
  34. "keyword-spacing": [2, {"before": true, "after": true}],
  35. "linebreak-style": [2, "unix"],
  36. "lines-around-comment": [2, {"beforeBlockComment": true, "afterBlockComment": false}],
  37. "new-parens": 2,
  38. "no-array-constructor": 2,
  39. "no-caller": 2,
  40. "no-catch-shadow": 2,
  41. "no-eval": 2,
  42. "no-extend-native": 2,
  43. "no-extra-bind": 2,
  44. "no-extra-parens": [2, "functions"],
  45. "no-implied-eval": 2,
  46. "no-iterator": 2,
  47. "no-label-var": 2,
  48. "no-labels": 2,
  49. "no-lone-blocks": 2,
  50. "no-loop-func": 2,
  51. "no-multi-spaces": 2,
  52. "no-multi-str": 2,
  53. "no-native-reassign": 2,
  54. "no-nested-ternary": 2,
  55. "no-new-func": 2,
  56. "no-new-object": 2,
  57. "no-new-wrappers": 2,
  58. "no-octal-escape": 2,
  59. "no-process-exit": 2,
  60. "no-proto": 2,
  61. "no-return-assign": 2,
  62. "no-script-url": 2,
  63. "no-sequences": 2,
  64. "no-shadow-restricted-names": 2,
  65. "no-spaced-func": 2,
  66. "no-trailing-spaces": 2,
  67. "no-undef-init": 2,
  68. "no-undefined": 2,
  69. "no-unused-expressions": 2,
  70. "no-unused-vars": [2, {"vars": "all", "args": "none"}],
  71. "no-with": 2,
  72. "object-curly-spacing": [2, "never"],
  73. "one-var": [2, "never"],
  74. "quote-props": [2, "consistent-as-needed"],
  75. "quotes": [2, "single", "avoid-escape"],
  76. "semi": [2, "always"],
  77. "semi-spacing": [2, {"before": false, "after": true}],
  78. "space-before-blocks": [2, "always"],
  79. "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
  80. "space-in-parens": [2, "never"],
  81. "space-infix-ops": 2,
  82. "space-unary-ops": [2, { "words": true, "nonwords": false }],
  83. "spaced-comment": [2, "always"],
  84. "strict": [2, "function"],
  85. "yoda": [2, "never"],
  86. // Warnings.
  87. "max-nested-callbacks": [1, 3],
  88. "valid-jsdoc": [1, {
  89. "prefer": {
  90. "returns": "return",
  91. "property": "prop"
  92. },
  93. "requireReturn": false
  94. }]
  95. }
  96. }