Skip to content

Commit 7ef1b6e

Browse files
committed
Prettier fixes, and release notes
1 parent f054550 commit 7ef1b6e

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616

1717
<!-- Your comment below this -->
1818

19-
- Adds a log when you run on GitHub Actions without being a pull_request - [@orta]
20-
- GitHub: Move to 'List pull request files' API with pagination support [@fabianehlert]
2119

2220
<!-- Your comment above this -->
2321

22+
## 12.2.0
23+
24+
- Adds a log when you run on GitHub Actions without being a pull_request - [@orta]
25+
- GitHub: Move to 'List pull request files' API with pagination support [@fabianehlert]
2426

2527
## 12.1.0
2628

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"test:fixtures": "node ./scripts/run-fixtures.js",
5555
"test:update-fixtures": "yarn test:fixtures --update",
5656
"test:watch": "jest --watch",
57+
"type-check": "tsc --noEmit",
5758
"lint": "eslint \"source/*.ts\" \"source/**/*.ts\"",
5859
"lint:fix": "yarn --silent lint --fix",
5960
"prepublishOnly": "yarn build && yarn jest && yarn declarations && yarn build:flow-types && yarn build:pretty-types",

source/commands/init/default-dangerfile.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,17 @@ export const generateDefaultDangerfile = (state: InitState) => {
3434
3535
${rules.join("\n")}
3636
`
37-
return formatDangerfile(dangerfile, state, dangerfileState)
37+
return formatDangerfile(dangerfile, dangerfileState)
3838
}
3939

40-
export const formatDangerfile = (
41-
dangerfile: string,
42-
initState: InitState,
43-
dangerfileState: ReturnType<typeof generateDangerfileState>
44-
) => {
40+
export const formatDangerfile = (dangerfile: string, dangerfileState: ReturnType<typeof generateDangerfileState>) => {
4541
if (dangerfileState.hasPrettier) {
4642
// eslint-disable-next-line @typescript-eslint/no-require-imports
4743
const { format } = require("prettier")
4844
// Get package settings
4945
const localPrettier = fs.existsSync("package.json") && JSON.parse(fs.readFileSync("package.json", "utf8")).prettier
5046
// Always include this
51-
const always = { editorconfig: true, parser: "typescript", filepath: process.cwd() + " /" + initState.filename }
47+
const always = { editorconfig: true, parser: "typescript" }
5248
const settings = localPrettier ? { ...always, ...localPrettier } : always
5349

5450
return format(dangerfile, settings)

0 commit comments

Comments
 (0)