We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5348757 commit fb544d1Copy full SHA for fb544d1
README.md
@@ -41,6 +41,25 @@ const sqlitePlugin = createSqlitePlugin({
41
export default [sqlitePlugin.configs.recommended];
42
```
43
44
+If you require additional setup for the database you can return a
45
+Database instance instead of a URL.
46
+
47
+```js
48
+// eslint.config.js
49
+import { createSqlitePlugin } from "eslint-plugin-sqlite";
50
+import Database from "better-sqlite3";
51
52
+const sqlitePlugin = createSqlitePlugin({
53
+ getDatabase() {
54
+ const db = new Database("my_database.db");
55
+ db.loadExtension("mod_spatialite");
56
+ return db;
57
+ },
58
+});
59
60
+export default [sqlitePlugin.configs.recommended];
61
+```
62
63
## Editor support
64
65
### VSCode
0 commit comments