🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

eslint-plugin-react-hooks-extra

Package Overview
Dependencies
Maintainers
1
Versions
1297
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-hooks-extra - npm Package Compare versions

Comparing version

to
1.47.5-beta.0

28

dist/index.js

@@ -55,3 +55,3 @@ 'use strict';

var name2 = "eslint-plugin-react-hooks-extra";
var version = "1.47.4";
var version = "1.47.5-beta.0";
var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("hooks-extra"));

@@ -585,5 +585,15 @@ function isFromHookCall(context, name3, settings, predicate = eff.constTrue) {

}
if (id != null) {
context.report({
messageId: "noUnnecessaryUsePrefix",
data: {
name: name3
},
loc: getPreferredLoc(context, id)
});
continue;
}
context.report({
messageId: "noUnnecessaryUsePrefix",
node: id ?? node,
node,
data: {

@@ -597,2 +607,16 @@ name: name3

}
function getPreferredLoc(context, id) {
if (AST__namespace.isMultiLine(id)) return id.loc;
if (!context.sourceCode.getText(id).startsWith("use")) return id.loc;
return {
end: {
column: id.loc.start.column + 3,
line: id.loc.start.line
},
start: {
column: id.loc.start.column,
line: id.loc.start.line
}
};
}
var RULE_NAME6 = "prefer-use-state-lazy-initialization";

@@ -599,0 +623,0 @@ var RULE_FEATURES6 = [

14

package.json
{
"name": "eslint-plugin-react-hooks-extra",
"version": "1.47.4",
"version": "1.47.5-beta.0",
"description": "ESLint React's ESLint plugin for React Hooks related rules.",

@@ -53,8 +53,8 @@ "keywords": [

"ts-pattern": "^5.7.0",
"@eslint-react/ast": "1.47.4",
"@eslint-react/core": "1.47.4",
"@eslint-react/eff": "1.47.4",
"@eslint-react/kit": "1.47.4",
"@eslint-react/shared": "1.47.4",
"@eslint-react/var": "1.47.4"
"@eslint-react/ast": "1.47.5-beta.0",
"@eslint-react/core": "1.47.5-beta.0",
"@eslint-react/shared": "1.47.5-beta.0",
"@eslint-react/kit": "1.47.5-beta.0",
"@eslint-react/eff": "1.47.5-beta.0",
"@eslint-react/var": "1.47.5-beta.0"
},

@@ -61,0 +61,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet