0.3.0 • Published 3 months ago

config-prettier v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Badges

MIT License Visits Badge Created Badge Updated Badge

Config-Prettier

Config-Prettier is a JavaScript package that provides a set of best practice configurations for Prettier, a code formatter that helps you maintain consistent code style in your projects. This package aims to simplify the setup process for Prettier by providing a predefined configuration and a set of recommended plugins.

Features

  • Consistent and opinionated code formatting rules.
  • Preconfigured to work with popular plugins.
  • Easy installation and integration into your projects.

Installation

  npm install --save-dev config-prettier

Usage/Examples

Once Config-Prettier is installed, you can add it to your project's package.json file to set up Prettier scripts. Here's an example of how to add the scripts to your package.json:

"scripts": {
    // ...
  "lint:check": "prettier --check \"**/*.{js,ts,tsx,md,mdx,json}\"",
  "lint:fix": "prettier --write \"**/*.{js,ts,tsx,md,mdx,json}\""
}, 
"prettier": "config-prettier",
// ...

The lint:check script will check your code for Prettier formatting violations, and the lint:fix script will automatically fix them.

.prettierrc.cjs

module.exports = {
  ...require('config-prettier'),
  // Override rules if needed, check https://prettier.io/docs
};

This configuration file extends the rules defined in Config-Prettier and allows you to override them if necessary.

Plugins

Config-Prettier depends on several Prettier plugins to enhance its functionality. You do not need to install these plugins separately; they are included with Config-Prettier by default.:

With Config-Prettier and its bundled plugins in place, your project's code formatting will adhere to best practices and remain consistent throughout development. Happy coding!

Authors

0.3.0

3 months ago

0.2.0

7 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago