base.js 809 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import js from "@eslint/js"
  2. import eslintConfigPrettier from "eslint-config-prettier"
  3. import turboPlugin from "eslint-plugin-turbo"
  4. import tseslint from "typescript-eslint"
  5. import onlyWarn from "eslint-plugin-only-warn"
  6. /**
  7. * A shared ESLint configuration for the repository.
  8. *
  9. * @type {import("eslint").Linter.Config[]}
  10. * */
  11. export const config = [
  12. js.configs.recommended,
  13. eslintConfigPrettier,
  14. ...tseslint.configs.recommended,
  15. {
  16. plugins: {
  17. turbo: turboPlugin,
  18. },
  19. rules: {
  20. "turbo/no-undeclared-env-vars": "off",
  21. },
  22. },
  23. {
  24. plugins: {
  25. onlyWarn,
  26. },
  27. },
  28. {
  29. ignores: ["dist/**"],
  30. },
  31. {
  32. rules: {
  33. "@typescript-eslint/no-unused-vars": [
  34. "error",
  35. {
  36. argsIgnorePattern: "^_",
  37. varsIgnorePattern: "^_",
  38. caughtErrorsIgnorePattern: "^_",
  39. },
  40. ],
  41. },
  42. },
  43. ]