New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-more

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-more - npm Package Compare versions

Comparing version

to
0.0.3

2

index.js

@@ -20,3 +20,3 @@

'force-native-methods': 2,
'no-duplicated-chains': 2,
'no-duplicated-chains': [2, {repetitions: 2, chainLength: 3}],
'classbody-starts-with-newline': [2, 'never']

@@ -23,0 +23,0 @@ }

@@ -1,10 +0,10 @@

//No empty string after class definition (before constructor) (with fixer)
//No empty string after class definition (before varructor) (with fixer)
module.exports = function(context) {
const sourceCode = context.getSourceCode();
var sourceCode = context.getSourceCode();
const mode = context.options[0] || 'never';
var mode = context.options[0] || 'never';
function checkForNewLine(node) {
const nextNode = node.body[0];
var nextNode = node.body[0];

@@ -15,7 +15,7 @@ if (nextNode.type !== 'ClassProperty' && nextNode.type !== 'MethodDefinition') {

const nextLineNum = node.loc.start.line + 1;
let bodyStartsWithNewLine = nextNode.loc.start.line > nextLineNum;
var nextLineNum = node.loc.start.line + 1;
var bodyStartsWithNewLine = nextNode.loc.start.line > nextLineNum;
const comments = sourceCode.getComments(nextNode).leading;
var comments = sourceCode.getComments(nextNode).leading;

@@ -22,0 +22,0 @@ if (comments.length && comments[0].loc.start.line === nextLineNum) {

@@ -5,7 +5,7 @@

module.exports = function(context) {
const longChains = [];
let isInsideCallExpression = false;
var longChains = [];
var isInsideCallExpression = false;
// to avoid subexpressions output
let memberExpressionsDepth = 0;
var memberExpressionsDepth = 0;

@@ -55,5 +55,5 @@ function startFunction(node) {

let pathParts = [];
let parent = node;
let depth = 0;
var pathParts = [];
var parent = node;
var depth = 0;

@@ -84,4 +84,4 @@ while (parent) {

const path = pathParts.reverse().join('.');
const chainCount = incrementChainCount(path);
var path = pathParts.reverse().join('.');
var chainCount = incrementChainCount(path);

@@ -91,3 +91,3 @@ if (chainCount >= 2) {

node: node,
message: `Do not duplicate long chains. Assign "${path}" to a variable or destruct it.`
message: 'Do not duplicate long chains. Assign "' + path + '" to a variable or destruct it.'
});

@@ -94,0 +94,0 @@ }

{
"name": "eslint-plugin-more",
"version": "0.0.2",
"version": "0.0.3",
"keywords": ["eslint","eslintplugin"],

@@ -5,0 +5,0 @@ "homepage": "https://github.com/WebbyLab/eslint-plugin-more",