New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@guidecx/config-prettier

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guidecx/config-prettier - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1-alpha.0

6

index.js
module.exports = {
arrowParens: "avoid",
arrowParens: 'avoid',
bracketSpacing: true,
jsxBracketSameLine: false,
printWidth: 100,
proseWrap: "always",
proseWrap: 'always',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: "all",
trailingComma: 'all',
useTabs: false,
};
{
"name": "@guidecx/config-prettier",
"version": "1.0.0",
"version": "1.0.1-alpha.0",
"description": "Prettier configuration files for use in GCX applications",
"author": "Andrew Garvin <dandrewgarvin@gmail.com>",
"homepage": "https://github.com/guidecx/gcx-config#readme",
"homepage": "https://github.com/guidecx/ether#readme",
"license": "ISC",
"publishConfig": {
"access": "public"
},
"main": "index.js",
"peerDependencies": {
"prettier": "^2.2.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/guidecx/gcx-config.git"
"url": "git+https://github.com/guidecx/ether.git"
},
"bugs": {
"url": "https://github.com/guidecx/gcx-config/issues"
"url": "https://github.com/guidecx/ether/issues"
},
"gitHead": "a00a05d7597b35255b6a91e9f21c09190759c3f3"
}

@@ -7,7 +7,7 @@ # `GCX Prettier Config`

The `index.js` file exports our prettier configuration. In the project you are adding this configuration file to, you can do the following in your `.prettierrc.js` file assuming you have installed the dependency via `npm install --save-dev @gcx/config-prettier`:
The `index.js` file exports our prettier configuration. In the project you are adding this configuration file to, you can do the following in your `.prettierrc.js` file assuming you have installed the dependency via `npm install --save-dev @guidecx/config-prettier`:
```javascript
module.exports = {
...require("@gcx/config-prettier"),
...require("@guidecx/config-prettier"),
// overwritten rules as needed. EG:

@@ -22,2 +22,6 @@ // semi: false

According to the [lint-staged docs](https://www.npmjs.com/package/lint-staged#installation-and-setup), the easiest way to install husky and lint-staged together is by running `npx mrm lint-staged`. You'll need to install prettier via `npm i --save-dev prettier` as well.
You will also need to install `npm-run-all` and `prettier` as peerDependencies; `npm install --save-dev npm-run-all prettier`
Follow the installation instructions provided in the husky documentation, then add the follow lines to the `package.json` file:

@@ -27,6 +31,17 @@

"scripts": {
"format": "prettier 'src/**/*.{ts,tsx,js,jsx,json,graphql}'",
"format:write": "format --list-different --write",
"format:check": "format --check",
"format": "prettier \"{src,pages,components,lib}/**/*.{ts,tsx,js,jsx,graphql}\"",
"format:write": "yarn format -- --list-different --write",
"format:check": "yarn format -- --check",
"validate": "npm-run-all --parallel -c format:check \"lint --quiet\" tsc test"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"{src,pages,components,lib}/**/*.{ts,tsx,js,jsx,graphql}": [
"yarn format:write",
"git add"
]
}

@@ -41,2 +56,18 @@ ```

This library has an example file that you can copy and modify as needed.
This library has an example file that you can copy and modify as needed.
```json
# every project
package.json
node_modules/
build/
public/
dist/
# react applications with apollo
src/apollo/schema.json
src/apollo/graphql.tsx
# express applications
```
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