eslint.config.js 658 B

12345678910111213141516171819202122232425262728293031323334
  1. import globals from "globals";
  2. import pluginJs from "@eslint/js";
  3. /** @type {import('eslint').Linter.Config[]} */
  4. export default [
  5. pluginJs.configs.recommended,
  6. // global "ignores"
  7. // https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
  8. {
  9. ignores: ["node_modules/", "dist/"]
  10. },
  11. {
  12. files: [
  13. "**/*.js",
  14. ],
  15. linterOptions: {
  16. reportUnusedDisableDirectives: "error",
  17. // noInlineConfig: true
  18. },
  19. languageOptions: {
  20. sourceType: "module",
  21. globals: {
  22. ...globals.browser,
  23. }
  24. },
  25. rules: {
  26. indent: ["error", 2],
  27. },
  28. },
  29. ];