.eslintrc.legacy.json 3.0 KB

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