@arthurfiorette/prettier-config
Advanced tools
Comparing version 1.0.4 to 1.0.5
11
index.js
@@ -47,10 +47,15 @@ /** | ||
module.exports = defaultConfig; | ||
/** | ||
* Returns the prettier config with the given overridden options. | ||
* | ||
* @param {Partial<PrettierOptions>} override | ||
* @returns {PrettierOptions} | ||
* | ||
* @see {defaultConfig} | ||
*/ | ||
module.exports.config = (override = {}) => { | ||
module.exports = function (override = {}) { | ||
return { ...defaultConfig, ...override }; | ||
}; | ||
module.exports.defaultConfig = defaultConfig; | ||
{ | ||
"name": "@arthurfiorette/prettier-config", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "My personal prettier config", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/ArthurFiorette/prettier.git" | ||
"url": "git+https://github.com/ArthurFiorette/prettier-config.git" | ||
}, | ||
@@ -14,5 +14,5 @@ "author": "Hazork", | ||
"bugs": { | ||
"url": "https://github.com/ArthurFiorette/prettier/issues" | ||
"url": "https://github.com/ArthurFiorette/prettier-config/issues" | ||
}, | ||
"homepage": "https://github.com/ArthurFiorette/prettier#readme", | ||
"homepage": "https://github.com/ArthurFiorette/prettier-config#readme", | ||
"scripts": { | ||
@@ -19,0 +19,0 @@ "auto-version": "npm-auto-version" |
@@ -15,19 +15,9 @@ ## @arthurfiorette/prettier-config | ||
You can use this prettier config with a `.prettierrc.js` file. | ||
You can just copy what is below in a `.prettierrc.js` file: | ||
```js | ||
// .prettierrc.js | ||
// https://github.com/ArthurFiorette/prettier-config | ||
module.exports = require('@arthurfiorette/prettier-config'); | ||
``` | ||
Or overriding some configs | ||
```js | ||
// .prettierrc.js | ||
const { config } = require('@arthurfiorette/prettier-config'); | ||
module.exports = config({ | ||
printWidth: 80 | ||
module.exports = require('@arthurfiorette/prettier-config')({ | ||
// Any options here will override @arthurfiorette/prettier-config defaults | ||
}); | ||
@@ -34,0 +24,0 @@ ``` |
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
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
3875
56
28