Skip to content

A fast, helpful, and open-source document parser

add eslint config

Logan Markewichbd704734c153
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..2017178
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,34 @@
+import eslint from "@eslint/js";
+import tseslint from "typescript-eslint";
+import eslintConfigPrettier from "eslint-config-prettier";
+
+export default tseslint.config(
+ eslint.configs.recommended,
+ ...tseslint.configs.recommended,
+ eslintConfigPrettier,
+ {
+ languageOptions: {
+ parserOptions: {
+ projectService: true,
+ tsconfigRootDir: import.meta.dirname,
+ },
+ },
+ },
+ {
+ ignores: ["dist/**", "node_modules/**", "src/vendor/**", "examples/**"],
+ },
+ {
+ rules: {
+ // Allow unused vars that start with underscore
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ {
+ argsIgnorePattern: "^_",
+ varsIgnorePattern: "^_",
+ },
+ ],
+ // Allow explicit any in some cases (can be tightened later)
+ "@typescript-eslint/no-explicit-any": "warn",
+ },
+ }
+);