diff --git a/.rstack/hooks/pre-commit b/.rstack/hooks/pre-commit new file mode 100644 index 0000000..8890b96 --- /dev/null +++ b/.rstack/hooks/pre-commit @@ -0,0 +1 @@ +rs staged diff --git a/package.json b/package.json index 98979ac..d0f2e61 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "dev": "rs lib -w", "format": "rs fmt", "lint": "rs lint", + "prepare": "rs setup", "test": "rs test" }, "devDependencies": { diff --git a/playground/rstack.config.ts b/playground/rstack.config.ts index 5b77eee..77da6f2 100644 --- a/playground/rstack.config.ts +++ b/playground/rstack.config.ts @@ -1,3 +1,4 @@ +// Configuration guide: https://rstack.rs/config import { define } from 'rstack'; define.app(async () => { diff --git a/rstack.config.ts b/rstack.config.ts index eb465ca..8b7a552 100644 --- a/rstack.config.ts +++ b/rstack.config.ts @@ -1,13 +1,19 @@ +// Configuration guide: https://rstack.rs/config import { define } from 'rstack'; +define.lib({ + dts: true, + syntax: 'es2023', +}); + define.fmt({ singleQuote: true, sortPackageJson: true, }); -define.lib({ - dts: true, - syntax: 'es2023', +define.staged({ + '*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint', 'rs fmt'], + '*.{json,md,mdx,css,scss,less,html,yml,yaml}': 'rs fmt', }); define.lint(({ globals, js, ts }) => [