.eslintrc 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. {
  2. "root": true,
  3. "extends": "@ljharb",
  4. "env": {
  5. "es6": true,
  6. },
  7. "rules": {
  8. "array-bracket-newline": 0,
  9. "complexity": 0,
  10. "eqeqeq": [2, "allow-null"],
  11. "func-name-matching": 0,
  12. "id-length": [2, { "min": 1, "max": 40 }],
  13. "max-params": [2, 5],
  14. "max-lines-per-function": 1,
  15. "max-statements": 1,
  16. "max-statements-per-line": [2, { "max": 2 }],
  17. "multiline-comment-style": 0,
  18. "no-magic-numbers": 0,
  19. "new-cap": 0,
  20. "no-extra-parens": 1,
  21. "sort-keys": 0,
  22. },
  23. "overrides": [
  24. {
  25. "files": "GetIntrinsic.js",
  26. "rules": {
  27. "max-statements": 0,
  28. }
  29. },
  30. {
  31. "files": "operations/*",
  32. "rules": {
  33. "max-lines": 0,
  34. },
  35. },
  36. {
  37. "files": [
  38. "operations/deltas.js",
  39. "operations/getOps.js",
  40. "operations/spackle.js",
  41. "operations/years.js",
  42. ],
  43. "extends": "@ljharb/eslint-config/node/latest",
  44. "rules": {
  45. "complexity": 0,
  46. "func-style": 0,
  47. "max-lines-per-function": 0,
  48. "max-nested-callbacks": 0,
  49. "max-statements": 0,
  50. "no-magic-numbers": 0,
  51. "no-throw-literal": 0,
  52. },
  53. },
  54. {
  55. "files": "test/**",
  56. "extends": "@ljharb/eslint-config/tests",
  57. "rules": {
  58. "max-len": 0,
  59. "max-lines-per-function": 0,
  60. "no-implicit-coercion": 0,
  61. "no-invalid-this": 1,
  62. "prefer-promise-reject-errors": 0,
  63. },
  64. },
  65. {
  66. "files": [
  67. "*/Num*ToRawBytes.js",
  68. "*/RawBytesToNum*.js",
  69. "helpers/bytesAs*.js",
  70. "helpers/valueToFloat*.js",
  71. ],
  72. "rules": {
  73. "max-lines-per-function": "off",
  74. "max-statements": "off",
  75. "no-redeclare": "warn",
  76. "operator-linebreak": [2, "before", {
  77. "overrides": {
  78. "=": "none"
  79. }
  80. }],
  81. },
  82. },
  83. ],
  84. }