.eslintrc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "root": true,
  3. "extends": "@ljharb",
  4. "rules": {
  5. "complexity": [2, 12],
  6. "func-name-matching": 0,
  7. "id-length": 0,
  8. "max-nested-callbacks": [2, 3],
  9. "max-params": [2, 4],
  10. "max-statements-per-line": [2, { "max": 2 }],
  11. "max-statements": [2, 24],
  12. "new-cap": [2, {
  13. "capIsNewExceptions": [
  14. "AdvanceStringIndex",
  15. "Call",
  16. "Construct",
  17. "CreateIterResultObject",
  18. "CreateRegExpStringIterator",
  19. "Get",
  20. "GetIntrinsic",
  21. "GetMethod",
  22. "Invoke",
  23. "IsRegExp",
  24. "MatchAllIterator",
  25. "OrdinaryObjectCreate",
  26. "RegExpExec",
  27. "RequireObjectCoercible",
  28. "Set",
  29. "SpeciesConstructor",
  30. "ToBoolean",
  31. "ToLength",
  32. "ToString",
  33. "Type",
  34. ],
  35. }],
  36. "no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
  37. "operator-linebreak": [2, "before"],
  38. },
  39. "overrides": [
  40. {
  41. "files": "test/**",
  42. "rules": {
  43. "max-lines-per-function": 0,
  44. "max-nested-callbacks": 0,
  45. "prefer-regex-literals": 0,
  46. },
  47. },
  48. ],
  49. }