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