.eslintrc 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {
  2. "root": true,
  3. "extends": "@ljharb",
  4. "ignorePatterns": [
  5. "*.min.js",
  6. "tests/lib/*",
  7. ],
  8. "rules": {
  9. "array-bracket-newline": 0,
  10. "object-curly-newline": 0,
  11. "camelcase": [0],
  12. "complexity": [0],
  13. "eqeqeq": [2, "allow-null"],
  14. "func-name-matching": 0,
  15. "id-length": [2, { "min": 1, "max": 40 }],
  16. "indent": [2, 4],
  17. "max-lines": 0,
  18. "max-lines-per-function": 0,
  19. "max-nested-callbacks": [2, 5],
  20. "max-params": [2, 7],
  21. "max-statements": [1, 30],
  22. "new-cap": [2, { "capIsNewExceptions": ["ToInteger", "ToObject", "ToPrimitive", "ToUint32"] }],
  23. "no-constant-condition": [1],
  24. "no-extend-native": [2, {"exceptions": ["Date", "Error", "RegExp"]}],
  25. "no-extra-parens": [0],
  26. "no-extra-semi": [1],
  27. "no-func-assign": [1],
  28. "no-implicit-coercion": [2, {
  29. "boolean": false,
  30. "number": false,
  31. "string": true,
  32. "disallowTemplateShorthand": false,
  33. "allow": []
  34. }],
  35. "no-invalid-this": [0],
  36. "no-magic-numbers": [0],
  37. "no-native-reassign": [2, {"exceptions": ["Date", "parseInt"]}],
  38. "no-new-func": [1],
  39. "no-plusplus": [1],
  40. "no-restricted-syntax": [2, "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"],
  41. "no-shadow": [1],
  42. "no-unused-vars": [1, { "vars": "all", "args": "after-used" }],
  43. "operator-linebreak": [2, "before"],
  44. "sort-keys": [0],
  45. "spaced-comment": [0],
  46. "strict": [0],
  47. "multiline-comment-style": 0,
  48. },
  49. "overrides": [
  50. {
  51. "files": "tests/**",
  52. "rules": {
  53. "max-len": 0,
  54. "max-statements-per-line": [2, { "max": 2 }],
  55. },
  56. "env": {
  57. "jasmine": true
  58. },
  59. },
  60. ],
  61. }