eslint-plugin-perfectionist
Advanced tools
Comparing version 4.1.0 to 4.1.1
'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 @@ }, |
'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": [ |
274495
7579