diff --git a/README.md b/README.md index a11bd1a599..9a76fe824a 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ For a good example package, see [base64-js](https://github.com/DefinitelyTyped/D #### Common mistakes * First, follow advice from the [handbook](http://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html). -* Formatting: Use 4 spaces. Prettier is set up on this repo, so you can run `npm run prettier -- --write path/to/package`. [When using assertions](https://github.com/SamVerschueren/tsd#assertions), add `// prettier-ignore` exclusion to mark line(s) of code as excluded from formatting: +* Formatting: Use 4 spaces. Prettier is set up on this repo, so you can run `npm run prettier -- --write path/to/package/**/*.ts`. [When using assertions](https://github.com/SamVerschueren/tsd#assertions), add `// prettier-ignore` exclusion to mark line(s) of code as excluded from formatting: ```tsx // prettier-ignore const incompleteThemeColorModes: Theme = { colors: { modes: { papaya: { // $ExpectError diff --git a/package.json b/package.json index 408f02b2ad..092e7fab93 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "not-needed": "node scripts/not-needed.js", "update-codeowners": "node scripts/update-codeowners.js", "test": "node node_modules/types-publisher/bin/tester/test.js --run-from-definitely-typed", - "lint": "dtslint types" + "lint": "dtslint types", + "prettier": "prettier" }, "devDependencies": { "dtslint": "latest",