.eslintrc.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. module.exports = {
  2. env: {
  3. node: true,
  4. es6: true,
  5. mocha: true,
  6. },
  7. globals: {
  8. Atomics: "readonly",
  9. SharedArrayBuffer: "readonly",
  10. },
  11. extends: [
  12. "esnext",
  13. "esnext/style-guide",
  14. "plugin:prettier/recommended"
  15. ],
  16. "rules": {
  17. "import/no-commonjs": "off", // remove after converting to TS.
  18. // Disabling Rules because of monorepo environment:
  19. // https://github.com/benmosher/eslint-plugin-import/issues/1174
  20. "import/no-extraneous-dependencies": "off",
  21. "import/no-nodejs-modules": "off", // nodejs project
  22. "no-console": "off" // we use console in the project
  23. },
  24. "overrides": [
  25. {
  26. "files": [
  27. "**/test/ranges.js",
  28. "**/test/lru.js",
  29. "**/test/fs/walk.js",
  30. "**/test/storage.js",
  31. "**/test/identities.js",
  32. "**/test/balances.js",
  33. "**/test/assets.js",
  34. ],
  35. "rules": {
  36. // Disabling Rules because of used chai lib:
  37. // https://stackoverflow.com/questions/45079454/no-unused-expressions-in-mocha-chai-unit-test-using-standardjs
  38. "no-unused-expressions": "off",
  39. }
  40. }
  41. ]
  42. };