.eslintrc.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. module.exports = {
  2. "env": {
  3. "browser": true,
  4. "es2021": true,
  5. },
  6. "extends": [
  7. "airbnb-base",
  8. ],
  9. "parserOptions": {
  10. "ecmaVersion": 12,
  11. },
  12. "ignorePatterns": "*.externs.js",
  13. "rules": {
  14. "func-names": "off",
  15. // Use tabs for consistency with the C++ codebase.
  16. "indent": ["error", "tab"],
  17. "max-len": "off",
  18. "no-else-return": ["error", {allowElseIf: true}],
  19. "curly": ["error", "all"],
  20. "brace-style": ["error", "1tbs", { "allowSingleLine": false }],
  21. "no-bitwise": "off",
  22. "no-continue": "off",
  23. "no-self-assign": "off",
  24. "no-tabs": "off",
  25. "no-param-reassign": ["error", { "props": false }],
  26. "no-plusplus": "off",
  27. "no-unused-vars": ["error", { "args": "none" }],
  28. "prefer-destructuring": "off",
  29. "prefer-rest-params": "off",
  30. "prefer-spread": "off",
  31. "camelcase": "off",
  32. "no-underscore-dangle": "off",
  33. "max-classes-per-file": "off",
  34. "prefer-arrow-callback": "off",
  35. // Messes up with copyright headers in source files.
  36. "spaced-comment": "off",
  37. // Completely breaks emscripten libraries.
  38. "object-shorthand": "off",
  39. // Closure compiler (exported properties)
  40. "quote-props": ["error", "consistent"],
  41. "dot-notation": "off",
  42. // No comma dangle for functions (it's madness, and ES2017)
  43. "comma-dangle": ["error", {
  44. "arrays": "always-multiline",
  45. "objects": "always-multiline",
  46. "imports": "always-multiline",
  47. "exports": "always-multiline",
  48. "functions": "never"
  49. }],
  50. }
  51. };