@guidecx/config-prettier
Advanced tools
Comparing version 1.0.0 to 1.0.1-alpha.0
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 | ||
``` |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
3806
69
1
2
1