Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@twostoryrobot/prettier-config

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twostoryrobot/prettier-config - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

4

package.json
{
"name": "@twostoryrobot/prettier-config",
"version": "4.0.0",
"version": "5.0.0",
"description": "Prettier configuration for Two Story Robot",

@@ -11,3 +11,3 @@ "main": "index.js",

"peerDependencies": {
"prettier": "^2.4.1"
"prettier": "^3.2.5"
},

@@ -14,0 +14,0 @@ "author": "Chad Fawcett <me@chadf.ca>",

[![npm (scoped)](https://img.shields.io/npm/v/@twostoryrobot/prettier-config.svg)](https://www.npmjs.com/package/@twostoryrobot/prettier-config)
# TSR prettier
# 2SR prettier
Get pretty code with prettier the way Two Story Robot likes it.

@@ -20,18 +19,2 @@

Or if you want to override the default at all (Note: please consider making a PR
if you think the override will be useful for other projects).
```js
const prettierConfig = require('@twostoryrobot/prettier-config')
module.exports = Object.assign({}, prettierConfig, { semi: true })
```
Make sure to install the peer dependencies
```bash
npx install-peerdeps --dev @twostoryrobot/prettier-config
```
### Scripts
Now you can add a script to your project's package.json that calls prettier and

@@ -42,18 +25,17 @@ it will reference the config file in the root of your project directory.

"scripts": {
"prettier": "prettier --write '**/*.js'"
"prettier": "prettier --write 'src/**/*.js'",
"prettier-check": "prettier --list-different 'src/**/*.js'"
}
```
### Hooks
## Custom configuration
If you install [husky](https://github.com/typicode/husky) you can invoke
prettier as a hook for various actions (precommit, prepush, etc)
If you want to override the defaults at all, use this method:
```json
"husky": {
"hooks": {
"pre-commit": "prettier --list-different '**/*.js'"
}
}
}
```js
const prettierConfig = require('@twostoryrobot/prettier-config')
module.exports = Object.assign({}, prettierConfig, { semi: true })
```
_Note: please consider making a PR if you think the override will be useful for
other projects._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc