Skip to content

Standardized code formatting via Prettier config for NiftyCo projects

License

Notifications You must be signed in to change notification settings

aniftyco/prettier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@aniftyco/prettier

Standardized code formatting via Prettier config for NiftyCo projects.

Install

npm install --save-dev @aniftyco/prettier

Usage

Reference @aniftyco/prettier in your package.json:

{
  "name": "my-nifty-app",
  "version": "1.2.4",
  "prettier": "@aniftyco/prettier"
}

If you don't want to use package.json, you can use any of the supported extensions to export a string:

// `.prettierrc.json`
"@aniftyco/prettier"
// `prettier.config.js` or `.prettierrc.js`
module.exports = '@aniftyco/prettier';

Extending

This configuration is not intended to be changed, but if you have a setup where modification is required, it is possible. Prettier does not offer an "extends" mechanism as you might be familiar from tools such as ESLint.

To extend a configuration you will need to use a prettier.config.js or .prettierrc.js file that exports an object:

module.exports = {
  ...require('@aniftyco/prettier'),
  semi: false,
};

About

Standardized code formatting via Prettier config for NiftyCo projects

Resources

License

Stars

Watchers

Forks