Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Use Rome for linting and formatting #10

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@

npx lint-staged
npm run test
tsc --noEmit
18 changes: 7 additions & 11 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
const npxPrettierWrite = "npx prettier --write";
const HIDDEN_JS_FILES = ".*.js";
/**
* This file is used for pre-commit formatting.
* Building and testing is performed by the hooks found in .husky/pre-commit
*/

module.exports = {
"*.{js,ts}": (files) => [
`xo --fix ${files.join(" ")}`,
"npx tsc --noEmit",
// Do not add a test step here; they are run by husky
],
"*.{md,json}": npxPrettierWrite,
[HIDDEN_JS_FILES]:
// XO refuses to lint hidden files, so we run prettier on them instead
npxPrettierWrite,
"*.{js,ts,json}": ["rome format --write", "rome check --apply"],
"*.md": "npx prettier --write",
};
54 changes: 0 additions & 54 deletions .xo-config.cjs

This file was deleted.

Loading