@twostoryrobot/prettier
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "@twostoryrobot/prettier", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "prettier configuration for Two Story Robot", | ||
"main": "index.js", | ||
"scripts": { | ||
"postinstall": "ln -fs $(pwd)/prettierrc $(pwd)/../../../.prettierrc" | ||
}, | ||
"main": "prettier.config.js", | ||
"repository": { | ||
@@ -10,0 +7,0 @@ "type": "git", |
@@ -0,17 +1,32 @@ | ||
[![npm (scoped)](https://img.shields.io/npm/v/@twostoryrobot/prettier.svg)](https://www.npmjs.com/package/@twostoryrobot/prettier) | ||
# 2SR prettier | ||
Get pretty code with prettier the way Two Story Robot likes it. | ||
## Usage | ||
Installing the package will make a symlink in the root of your project to the | ||
prettier config in this repo. It is recommended to add `.prettierrc` to your | ||
`.gitignore` so you don't accidentally commit the symlink. | ||
```bash | ||
npm install @twostoryrobot/prettier | ||
npm install --save-dev @twostoryrobot/prettier | ||
``` | ||
Then you can source the config from your own `prettier.config.js`. | ||
```js | ||
module.exports = require('@twostoryrobot/prettier') | ||
``` | ||
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') | ||
module.exports = Object.assign({}, prettierConfig, { semi: true }) | ||
``` | ||
Make sure to install the peer dependencies | ||
```bash | ||
npm install prettier | ||
npm install --save-dev prettier | ||
``` | ||
@@ -36,5 +51,8 @@ | ||
```json | ||
"scripts": { | ||
"precommit": "prettier --write '**/*.js'" | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "prettier --list-different '**/*.js'" | ||
} | ||
} | ||
} | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
1909
5
58
0
2