You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@webdevstudios/prettier-config-coding-standards

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webdevstudios/prettier-config-coding-standards - npm Package Compare versions

Comparing version

to
1.0.1

33

index.js

@@ -1,15 +0,30 @@

/* eslint-disable */
function tryAndRequire( module ) {
/**
* Try and require module override data.
*
* @author Aubrey Portwood <aubrey@webdevstudios.com>
* @since 1.0.1
* @param {string} module Module.
* @return {Object} Config object.
*/
function loadOverrideFromModule( module ) {
try {
require( module );
return {
...require( module ).overrides[ 0 ],
};
} catch ( error ) {
// Fail gracefully.
return {
...{
files: '',
options: {},
},
};
}
}
module.export = {
...tryAndRequire( '@webdevstudios/prettier-config-js-coding-standards' ),
...tryAndRequire( '@webdevstudios/prettier-config-php-coding-standards' ),
...tryAndRequire( '@webdevstudios/prettier-config-css-coding-standards' ),
module.exports = {
overrides: [
loadOverrideFromModule( '@webdevstudios/prettier-config-js-coding-standards' ),
loadOverrideFromModule( '@webdevstudios/prettier-config-php-coding-standards' ),
loadOverrideFromModule( '@webdevstudios/prettier-config-css-coding-standards' ),
],
};
{
"name": "@webdevstudios/prettier-config-coding-standards",
"version": "1.0.0",
"version": "1.0.1",
"description": "Dynamic Configuration Loader for WebDevStudios JavaScript, PHP, and CSS Coding Standards. ",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,8 +13,16 @@ <a href="https://webdevstudios.com/contact/"><img src="https://webdevstudios.com/wp-content/uploads/2018/04/wds-github-banner.png" alt="WebDevStudios. WordPress for big brands."></a>

Install [`webdevstudios/css-coding-standards`](https://github.com/WebDevStudios/css-coding-standards), [`webdevstudios/js-coding-standards`](https://github.com/WebDevStudios/js-coding-standards), or [`webdevstudios/php-coding-standards`](https://github.com/WebDevStudios/php-coding-standards) and this package will be included automatically.
Install [`@webdevstudios/css-coding-standards`](https://github.com/WebDevStudios/css-coding-standards), [`@webdevstudios/js-coding-standards`](https://github.com/WebDevStudios/js-coding-standards), or [`webdevstudios/php-coding-standards`](https://github.com/WebDevStudios/php-coding-standards) and this package will be included automatically.
## Changelog
### 1.0.1
- Patch to fix issue where the final config for `prettier` set to `@webdevstudios/prettier-config-coding-standards` combines JS, CSS, and PHP properly
In the previous version these were not getting combined properly, instead the last config to load (via `npm`) would take the cake, and be the final config. This worked fine when JS was the only config, but if you installed PHP or CSS configs, they could likely end up being the final config breaking auto-formatting.
This new method takes the `@webdevstudios/prettier-config-(php|js|css)-coding-standards` modules and, depending on if they are installed, takes the `overrides` setting in each and merges them into `modules.exports` for `@webdevstudios/prettier-config-coding-standards`.
### 1.0.0
This version simply loads prettier configurations for [css](https://github.com/WebDevStudios/prettier-config-css-coding-standards), [js](https://github.com/WebDevStudios/prettier-config-js-coding-standards), and/or [php](https://github.com/WebDevStudios/prettier-config-php-coding-standards) if they are installed.
SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.