Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Lean CLI combination of both Prettier and Linting (eslint, ...) for auto-correcting files

Notifications You must be signed in to change notification settings

sebastian-software/effective-prettier-legacy

Repository files navigation

Effective Prettier (Effective Project)
Sponsored by Version Downloads Build Status Unix Build Status Windows

Originally started as a very lean alternative to prettier-eslint which focuses on the basics of integrating Prettier and linting infrastructure into one tool. Includes a CLI tool called effective-prettier. Nowadays it supports both eslint and stylelint together with prettier. It executes these tool in memory using their APIs instead of touching files multiple times on the disc.

Problem

For some users linting rules tweak the behavior of prettier results. Combining both tools is typically quite a configuration hassle. The easier way to write a new tool which combines both... or even all three of the most relevant front-end tools into one CLI. Welcome effective-prettier.

Features

You are in one solution to combine linting with prettification:

  • ✅ Prettier
  • ✅ ESLint
  • ✅ Stylelint

With a hell lot of nice gimmicks:

  • In memory transformation + write on change only
  • Respects ignore files
  • File format auto-detection
  • Multi-threading with glob-based file lists

Usage

Files are only written and touched when changes were made to the content.

Ignore files by Prettier and ESLint/Stylelint are used in combination for all files.

Massively faster when using a glob pattern through its threading infrastructure.

JavaScript

effective-prettier util.js

CSS

effective-prettier styles.css

Markdown

effective-prettier text.md

Mixed

effective-prettier "**/*.{js,jsx,ts,tsx,json,md,yaml,yml}"

CLI Options

--verbose, -v       Increase log level
--auto-root, -a     Detecting project root folder automatically
--skip-ignore, -s   Skip checking any ignore files
--enable-typed, -t  Enable ESLint rules which require types (slower)
--concurrency       Setting the number of instances to be executed in parallel

License

Apache License Version 2.0, January 2004

Copyright

Logo of Sebastian Software GmbH, Mainz, Germany

Copyright 2020
Sebastian Software GmbH

About

Lean CLI combination of both Prettier and Linting (eslint, ...) for auto-correcting files

Resources

Stars

Watchers

Forks

Packages

No packages published