@shinlms404/prettier-config
v0.1.6
Published
My Prettier config preset
Downloads
5
Maintainers
Readme
@shinlms404/prettier-config
My Prettier config preset
Tip: For an enhanced development experience, it's recommended to use this Prettier configuration in conjunction with @shinlms404/eslint-config. Check out the eslint-config repository for more details.
Installation
npm install @shinlms404/prettier-config --save-dev
Usage
In your project's prettier.config.js
file:
import prettierConfigs from '@shinlms404/prettier-config'
export default prettierConfigs()
Customs Rules
| Name | Description | Default | | :-------------------------------------------------------------------------------- | :---------------------------------------------------------- | :------ | | sortPackageJson | Sort the keys of a package.json | true | | organizeImports | The import can automatically sort and remove unused imports | true |
Features
- Opinionated Prettier configuration
- Supports TypeScript
- Integrates with eslint for a consistent code style
Configuration
This configuration includes the following plugins:
Scripts
Tip: You need to install
@antfu/ni
andpnpm
first, otherwise some of the scripts may not work!
Install
npm install @antfu/ni -g
npm install pnpm -g
nr build
: Build the project using tsupnr lint
: Run ESLintnr lint:fix
: Run ESLint with the --fix optionnr prepack
: Run nr buildnr release
: Bump the version and publish to npmnr stub
: Build a TypeScript stub using tsupnlx vitest
: Run vitest for testingnr typecheck
: Run TypeScript type checkingnr watch
: Watch for changes using tsup
Contributing
Feel free to open issues and submit pull requests. Contributions are welcome!
License
This project is licensed under the MIT License - see the LICENSE file for details.