Skip to content

Commit

Permalink
chore: add prettier:true to template-oss config
Browse files Browse the repository at this point in the history
Co-authored-by: Julian Møller Ellehauge <git@jumoel.com>
  • Loading branch information
lukekarrys and jumoel committed May 17, 2024
1 parent 60ee94f commit 210247e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ module.exports = {
extends: [
'@npmcli',
...localConfigs,
'prettier',
],
}
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

tap-testdir*/
tap-snapshots/
test/fixtures/**/*.json
workspace/test-workspace/**
/.commitlintrc.js
/.eslintrc.js
/.github/
/.prettierrc.js
/.release-please-manifest.json
/package.json
/release-please-config.json
/tsconfig.json
8 changes: 8 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* This file is automatically added by @npmcli/template-oss. Do not edit. */

const githubConfig = require('@github/prettier-config')

module.exports = {
...githubConfig,
bracketSpacing: true,
}
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
"template-oss-release-manager": "bin/release-manager.js"
},
"scripts": {
"lint": "npm run eslint",
"lintfix": "npm run eslint -- --fix",
"lint": "npm run eslint && npm run prettier -- --check",
"lintfix": "npm run eslint -- --fix && npm run prettier -- --write",
"posttest": "npm run lint",
"snap": "tap",
"test": "tap",
"template-oss-apply": "template-oss-apply --force",
"postlint": "template-oss-check",
"postinstall": "template-oss-apply",
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
"prettier": "prettier \"**/*.{js,cjs,ts,mjs,jsx,tsx,json}\"",
"test-all": "npm run test -ws -iwr --if-present",
"lint-all": "npm run lint -ws -iwr --if-present"
},
Expand Down Expand Up @@ -66,9 +67,12 @@
"lib/"
],
"devDependencies": {
"@github/prettier-config": "0.0.6",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "file:./",
"eslint-config-prettier": "^9.1.0",
"nock": "^13.3.8",
"prettier": "^3.2.5",
"tap": "^16.0.0"
},
"tap": {
Expand All @@ -86,7 +90,8 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"publish": true
"publish": true,
"prettier": true
},
"engines": {
"node": "^18.17.0 || >=20.5.0"
Expand Down

0 comments on commit 210247e

Please sign in to comment.