.eslintrc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {
  2. "root": true,
  3. "extends": "@ljharb",
  4. "rules": {
  5. "complexity": 0,
  6. "func-style": [2, "declaration"],
  7. "indent": [2, 4],
  8. "max-lines": 1,
  9. "max-lines-per-function": 1,
  10. "max-params": [2, 4],
  11. "max-statements": 0,
  12. "max-statements-per-line": [2, { "max": 2 }],
  13. "no-magic-numbers": 0,
  14. "no-param-reassign": 1,
  15. "operator-linebreak": [2, "before"],
  16. "strict": 0, // TODO
  17. },
  18. "globals": {
  19. "BigInt": false,
  20. "WeakSet": false,
  21. "WeakMap": false,
  22. },
  23. "overrides": [
  24. {
  25. "files": ["test/**", "test-*", "example/**"],
  26. "rules": {
  27. "array-bracket-newline": 0,
  28. "id-length": 0,
  29. "max-params": 0,
  30. "max-statements": 0,
  31. "max-statements-per-line": 0,
  32. "object-curly-newline": 0,
  33. "sort-keys": 0,
  34. },
  35. },
  36. {
  37. "files": ["example/**"],
  38. "rules": {
  39. "no-console": 0,
  40. },
  41. },
  42. {
  43. "files": ["test/browser/**"],
  44. "env": {
  45. "browser": true,
  46. },
  47. },
  48. {
  49. "files": ["test/bigint*"],
  50. "rules": {
  51. "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }],
  52. },
  53. },
  54. {
  55. "files": "index.js",
  56. "globals": {
  57. "HTMLElement": false,
  58. },
  59. "rules": {
  60. "no-use-before-define": 1,
  61. },
  62. },
  63. ],
  64. }