mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add prettier npm script and update command in docs (#42365)
This commit is contained in:
parent
f61a18d7a1
commit
865ae1f9a8
@ -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
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user