eslint.config.js 745 B

1234567891011121314151617181920212223242526
  1. import js from "@eslint/js";
  2. import globals from "globals";
  3. import tseslint from "typescript-eslint";
  4. import { defineConfig } from "eslint/config";
  5. export default defineConfig([
  6. { files: ["src/**/*.{ts,mts,cts}"], plugins: { js }, extends: ["js/recommended"], languageOptions: { globals: globals.browser } },
  7. tseslint.configs.recommended,
  8. {
  9. rules: {
  10. "keyword-spacing": ["error", {
  11. "before": true,
  12. "after": true,
  13. "overrides": {
  14. "for": { "after": false },
  15. "while": { "after": false },
  16. "if": { "after": false }
  17. }
  18. }],
  19. "@typescript-eslint/explicit-function-return-type": "error",
  20. "indent": ["error", "tab"],
  21. "no-mixed-spaces-and-tabs": ["error", "smart-tabs"]
  22. },
  23. ignores: ["dist/**/*"]
  24. },
  25. ]);