Skip to content

Commit 21c3664

Browse files
committed
Set up auto-formatting
1 parent 6caeb6c commit 21c3664

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎.oxfmtrc.json‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"arrowParens": "always",
3+
"objectWrap": "preserve",
4+
"semi": true,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"printWidth": 80,
8+
"tabWidth": 2,
9+
"useTabs": true,
10+
"sortPackageJson": false,
11+
"ignorePatterns": ["templates/README.md"]
12+
}

‎package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@
3838
"test-update-snapshot": "node --test --experimental-test-snapshots --test-update-snapshots tests/tests.mjs",
3939
"test": "node --test --experimental-test-snapshots tests/tests.mjs",
4040
"t": "node --experimental-test-snapshots tests/quick.mjs",
41-
"cover": "NODE_V8_COVERAGE=coverage node --experimental-test-coverage --experimental-test-snapshots tests/tests.mjs"
41+
"cover": "NODE_V8_COVERAGE=coverage node --experimental-test-coverage --experimental-test-snapshots tests/tests.mjs",
42+
"format": "oxfmt",
43+
"format:check": "oxfmt --check"
4244
},
4345
"devDependencies": {
4446
"jsesc": "^3.1.0",
4547
"lodash.template": "^4.18.1",
48+
"oxfmt": "^0.73.0",
4649
"regenerate": "^1.4.2",
4750
"unicode-loose-match": "^3.0.0",
4851
"unicode-property-aliases": "^3.0.0",

0 commit comments

Comments
 (0)