diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f5c8dea8..5213cf79f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,11 +16,13 @@ -- Adds a log when you run on GitHub Actions without being a pull_request - [@orta] -- GitHub: Move to 'List pull request files' API with pagination support [@fabianehlert] +## 12.2.0 + +- Adds a log when you run on GitHub Actions without being a pull_request - [@orta] +- GitHub: Move to 'List pull request files' API with pagination support [@fabianehlert] ## 12.1.0 diff --git a/package.json b/package.json index bf79dd091..48ef48638 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "test:fixtures": "node ./scripts/run-fixtures.js", "test:update-fixtures": "yarn test:fixtures --update", "test:watch": "jest --watch", + "type-check": "tsc --noEmit", "lint": "eslint \"source/*.ts\" \"source/**/*.ts\"", "lint:fix": "yarn --silent lint --fix", "prepublishOnly": "yarn build && yarn jest && yarn declarations && yarn build:flow-types && yarn build:pretty-types", diff --git a/source/commands/init/default-dangerfile.ts b/source/commands/init/default-dangerfile.ts index 9ac6dbfa4..0f68d6266 100644 --- a/source/commands/init/default-dangerfile.ts +++ b/source/commands/init/default-dangerfile.ts @@ -34,21 +34,17 @@ export const generateDefaultDangerfile = (state: InitState) => { ${rules.join("\n")} ` - return formatDangerfile(dangerfile, state, dangerfileState) + return formatDangerfile(dangerfile, dangerfileState) } -export const formatDangerfile = ( - dangerfile: string, - initState: InitState, - dangerfileState: ReturnType -) => { +export const formatDangerfile = (dangerfile: string, dangerfileState: ReturnType) => { if (dangerfileState.hasPrettier) { // eslint-disable-next-line @typescript-eslint/no-require-imports const { format } = require("prettier") // Get package settings const localPrettier = fs.existsSync("package.json") && JSON.parse(fs.readFileSync("package.json", "utf8")).prettier // Always include this - const always = { editorconfig: true, parser: "typescript", filepath: process.cwd() + " /" + initState.filename } + const always = { editorconfig: true, parser: "typescript" } const settings = localPrettier ? { ...always, ...localPrettier } : always return format(dangerfile, settings)