Skip to content

Commit 210247e

Browse files
lukekarrysjumoel
andcommitted
chore: add prettier:true to template-oss config
Co-authored-by: Julian Møller Ellehauge <[email protected]>
1 parent 60ee94f commit 210247e

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ module.exports = {
1717
extends: [
1818
'@npmcli',
1919
...localConfigs,
20+
'prettier',
2021
],
2122
}

.prettierignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This file is automatically added by @npmcli/template-oss. Do not edit.
2+
3+
tap-testdir*/
4+
tap-snapshots/
5+
test/fixtures/**/*.json
6+
workspace/test-workspace/**
7+
/.commitlintrc.js
8+
/.eslintrc.js
9+
/.github/
10+
/.prettierrc.js
11+
/.release-please-manifest.json
12+
/package.json
13+
/release-please-config.json
14+
/tsconfig.json

.prettierrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* This file is automatically added by @npmcli/template-oss. Do not edit. */
2+
3+
const githubConfig = require('@github/prettier-config')
4+
5+
module.exports = {
6+
...githubConfig,
7+
bracketSpacing: true,
8+
}

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
"template-oss-release-manager": "bin/release-manager.js"
1111
},
1212
"scripts": {
13-
"lint": "npm run eslint",
14-
"lintfix": "npm run eslint -- --fix",
13+
"lint": "npm run eslint && npm run prettier -- --check",
14+
"lintfix": "npm run eslint -- --fix && npm run prettier -- --write",
1515
"posttest": "npm run lint",
1616
"snap": "tap",
1717
"test": "tap",
1818
"template-oss-apply": "template-oss-apply --force",
1919
"postlint": "template-oss-check",
2020
"postinstall": "template-oss-apply",
2121
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
22+
"prettier": "prettier \"**/*.{js,cjs,ts,mjs,jsx,tsx,json}\"",
2223
"test-all": "npm run test -ws -iwr --if-present",
2324
"lint-all": "npm run lint -ws -iwr --if-present"
2425
},
@@ -66,9 +67,12 @@
6667
"lib/"
6768
],
6869
"devDependencies": {
70+
"@github/prettier-config": "0.0.6",
6971
"@npmcli/eslint-config": "^4.0.0",
7072
"@npmcli/template-oss": "file:./",
73+
"eslint-config-prettier": "^9.1.0",
7174
"nock": "^13.3.8",
75+
"prettier": "^3.2.5",
7276
"tap": "^16.0.0"
7377
},
7478
"tap": {
@@ -86,7 +90,8 @@
8690
},
8791
"templateOSS": {
8892
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
89-
"publish": true
93+
"publish": true,
94+
"prettier": true
9095
},
9196
"engines": {
9297
"node": "^18.17.0 || >=20.5.0"

0 commit comments

Comments
 (0)