ststefa / prettylint

Run Prettier as a linter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prettylint

npm build coverage

Run Prettier as a linter

Changelog

Sample

$ 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

Install

# using npm
npm install --save-dev prettylint prettier

# using yarn
yarn add --dev prettylint prettier

Usage

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

Development

# lint
yarn run lint

# build
yarn run build

# test
yarn run test

License

MIT © Ika

About

Run Prettier as a linter

License:MIT License


Languages

Language:TypeScript 94.3%Language:JavaScript 5.7%