recommended-module.js 590 B

123456789101112131415161718192021222324252627
  1. "use strict"
  2. const { commonGlobals, commonRules } = require("./_commons")
  3. module.exports = {
  4. globals: {
  5. ...commonGlobals,
  6. __dirname: "off",
  7. __filename: "off",
  8. exports: "off",
  9. module: "off",
  10. require: "off",
  11. },
  12. parserOptions: {
  13. ecmaFeatures: { globalReturn: false },
  14. ecmaVersion: 2019,
  15. sourceType: "module",
  16. },
  17. plugins: ["node"],
  18. rules: {
  19. ...commonRules,
  20. "node/no-unsupported-features/es-syntax": [
  21. "error",
  22. { ignores: ["modules"] },
  23. ],
  24. },
  25. }