UNPKG

1.66 kBMarkdownView Raw
1# prettylint
2
3[![npm](https://img.shields.io/npm/v/prettylint.svg)](https://www.npmjs.com/package/prettylint)
4[![build](https://img.shields.io/github/actions/workflow/status/ikatyang/prettylint/test.yml)](https://github.com/ikatyang/prettylint/actions?query=branch%3Amaster)
5
6Run Prettier as a linter
7
8[Changelog](https://github.com/ikatyang/prettylint/blob/master/CHANGELOG.md)
9
10## Sample
11
12```
13$ prettylint "**/*.ts"
14
15 src/diagnose.ts:14:13
16 ⚠ 14:13 Delete · prettier/prettier
17 ⚠ 15:14 Insert · prettier/prettier
18 ⚠ 47:34 Replace "" with '' prettier/prettier
19
20 3 warnings
21```
22
23## Install
24
25```sh
26npm install prettylint
27```
28
29## Usage
30
31```sh
32Usage
33 $ prettylint [options] [file/dir/glob ...]
34
35Options
36 --no-config Do not load config file.
37 --config <path> Specify the config file.
38 --no-editorconfig Do not load .editorconfig
39 --fix Fix linting errors.
40 --format <path> Specify the module to format output.
41 Defaults to "eslint-formatter-pretty".
42 --ignore-path <path> Specify the .ignore file.
43 Defaults to [".gitignore", ".prettierignore"].
44 --silent Do not print message.
45 --with-node-modules Process files inside 'node_modules' directory.
46 -h, --help Show help.
47 -v, --version Show version.
48
49Examples
50 $ prettylint .
51 $ prettylint . --fix
52```
53
54## Development
55
56```sh
57# lint
58pnpm run lint
59
60# build
61pnpm run build
62
63# test
64pnpm run test
65```
66
67## License
68
69MIT © [Ika](https://github.com/ikatyang)