Run Prettier as a linter
$ prettylint "**/*.ts"
src/diagnose.ts:14:13
⚠ 14:13 Delete · prettier/prettier
⚠ 15:14 Insert · prettier/prettier
⚠ 47:34 Replace "" with '' prettier/prettier
3 warnings
# using npm
npm install --save-dev prettylint prettier
# using yarn
yarn add --dev prettylint prettier
Usage
$ prettylint <glob> ...
Options
--no-config Do not load config file.
--config <path> Specify the config file. (require prettier@1.7.1+)
--fix Fix linting errors.
--format <path> Specify the module to format output.
Defaults to "eslint-formatter-pretty".
--ignore-path <path> Specify the .ignore file.
Defaults to ".prettierignore".
--silent Do not print message.
-h, --help Show help.
-v, --version Show version.
Examples
$ prettylint "src/**/*.{js,ts}"
$ prettylint "src/**/*.{js,ts}" --fix
$ prettylint "src/**/*.{js,ts}" --ignore-path .gitignore
# lint
yarn run lint
# build
yarn run build
# test
yarn run test
MIT © Ika