File
Blob: eslint.config.js
| 1 | import js from "@eslint/js"; |
| 2 | import globals from "globals"; |
| 3 | import reactHooks from "eslint-plugin-react-hooks"; |
| 4 | import tseslint from "typescript-eslint"; |
| 5 | |
| 6 | export default tseslint.config( |
| 7 | { ignores: ["dist", ".wrangler"] }, |
| 8 | js.configs.recommended, |
| 9 | ...tseslint.configs.recommended, |
| 10 | { |
| 11 | files: ["**/*.{ts,tsx}"], |
| 12 | languageOptions: { |
| 13 | ecmaVersion: 2023, |
| 14 | sourceType: "module", |
| 15 | globals: { ...globals.browser, ...globals.worker }, |
| 16 | }, |
| 17 | plugins: { "react-hooks": reactHooks }, |
| 18 | rules: { |
| 19 | ...reactHooks.configs.recommended.rules, |
| 20 | }, |
| 21 | }, |
| 22 | { |
| 23 | // wasm-vips and the jSquash codecs ship without types; `any` is the |
| 24 | // unavoidable boundary for these untyped WASM modules. |
| 25 | files: ["src/lib/vips.ts", "src/workers/export.worker.ts"], |
| 26 | rules: { "@typescript-eslint/no-explicit-any": "off" }, |
| 27 | }, |
| 28 | ); |