Skip to content

Commit

Permalink
docs: add code style rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Nov 13, 2024
1 parent c647963 commit e09c563
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,20 @@ Release create-tnf package:
```bash
$ pnpm release:create-tnf
```
## Code Style
We use [Prettier](https://prettier.io/) to format the code, please run `pnpm format` to format the code. And we also have some other rules:
- Do not use specifiers for `fs` and `path` modules.
- Do use `pathe` instead of `path` module.
```ts
// bad
import { writeFile } from 'fs';
import { join } from 'path';
// good
import fs from 'fs';
import path from 'pathe';
```

0 comments on commit e09c563

Please sign in to comment.