Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-decorator-position

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-decorator-position - npm Package Compare versions

Comparing version 2.2.27 to 2.2.28

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [2.2.28](https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/compare/v2.2.27...v2.2.28) (2021-06-03)
### Bug Fixes
* **#337:** wrap require prettier in a try-catch so that we don't throw when dep tree has no prettier ([f7594ff](https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/commit/f7594ff04a4da8e5f224162a71b749f738577561)), closes [#337](https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/issues/337)
## [2.2.27](https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/compare/v2.2.26...v2.2.27) (2021-05-27)

@@ -2,0 +9,0 @@

26

lib/rules/decorator-position.js

@@ -312,5 +312,12 @@ 'use strict';

if (!prettier) {
// we acknowledge that this might not exist
// eslint-disable-next-line node/no-unpublished-require
prettier = require('prettier');
try {
// we acknowledge that this might not exist
// eslint-disable-next-line node/no-unpublished-require
prettier = require('prettier');
} catch (error) {
// throw an all errors that aren't "Cannot find module"
if (!error.message.includes('Cannot find module')) {
throw error;
}
}
}

@@ -327,7 +334,8 @@

const usePrettierrc = !eslintPrettierOptions || eslintPrettierOptions.usePrettierrc !== false;
const prettierRcOptions = usePrettierrc
? prettier.resolveConfig.sync(filePath, {
editorconfig: true,
})
: {};
const prettierRcOptions =
prettier && usePrettierrc
? prettier.resolveConfig.sync(filePath, {
editorconfig: true,
})
: {};

@@ -338,3 +346,3 @@ const prettierOptions = Object.assign({}, prettierRcOptions, eslintPrettierOptions, {

if (!('printWidth' in prettierOptions)) {
if (prettier && !('printWidth' in prettierOptions)) {
// available at prettier/src/main/core-options

@@ -341,0 +349,0 @@ // keep an eye on this. There may have been an issue with prettier 2.2.0

{
"name": "eslint-plugin-decorator-position",
"version": "2.2.27",
"version": "2.2.28",
"description": "ESLint plugin for enforcing decorator position",

@@ -65,3 +65,3 @@ "main": "lib/index.js",

"@semantic-release/git": "9.0.0",
"@typescript-eslint/parser": "4.25.0",
"@typescript-eslint/parser": "4.26.0",
"babel-eslint": "10.1.0",

@@ -80,4 +80,3 @@ "common-tags": "1.8.0",

"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-unicorn": "21.0.0",
"jest": "27.0.1",
"jest": "27.0.4",
"lerna-changelog": "1.0.1",

@@ -95,3 +94,3 @@ "markdownlint-cli": "0.27.1",

"peerDependencies": {
"eslint": "^7.0.0"
"eslint": "^7.27.0"
},

@@ -98,0 +97,0 @@ "changelog": {

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