Skip to content

arrowsw/prettier-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

@arrowsw/prettier-config

Prettier base configuration by @arrowsw.

Install

Make sure you have Prettier installed:

npm install --save-dev prettier 

Install the package:

npm install --save-dev @arrowsw/prettier-config

Usage

.prettierrc.json (use without modification)

If you just want to use the shared config as-is, create a .prettierrc.json file with this content:

"@arrowsw/prettier-config"

Warning
.prettierrc.json does not support extending or overriding rules because the JSON format lacks support for dynamic imports or merging configurations. You can’t import or modify configs in this format.

.prettierrc.js (recommended for extending)

If you want to add or override specific rules, use a .prettierrc.js file instead. For example:

module.exports = {
    ...require("@arrowsw/prettier-config"),
    printWidth: 100, // override only the rules you want to customize
}

This gives you full flexibility using require() to extend the base config.

What about .prettierrc.ts?

Prettier does not support TypeScript config files like .prettierrc.ts because it lacks a built-in TypeScript parser for configuration files. You must use .js, .cjs, .json, or .yaml files instead.

About

Official - Arrow Software - Prettier Config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published