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

eslint-plugin-perfectionist

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-perfectionist - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

20

dist/rules/sort-modules.js
'use strict'
const utils = require('@typescript-eslint/utils')
const isSortable = require('utils/is-sortable')
const commonJsonSchemas = require('../utils/common-json-schemas.js')

@@ -158,10 +159,13 @@ const sortModules_types = require('./sort-modules.types.js')

return {
Program: program =>
analyzeModule({
eslintDisabledLines,
sourceCode,
options,
program,
context,
}),
Program: program => {
if (isSortable.isSortable(program.body)) {
return analyzeModule({
eslintDisabledLines,
sourceCode,
options,
program,
context,
})
}
},
}

@@ -168,0 +172,0 @@ },

2

dist/utils/is-sortable.js
'use strict'
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' })
let isSortable = array => array.length > 1
let isSortable = node => Array.isArray(node) && node.length > 1
exports.isSortable = isSortable
{
"name": "eslint-plugin-perfectionist",
"version": "4.1.0",
"version": "4.1.1",
"description": "ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.",

@@ -5,0 +5,0 @@ "keywords": [

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