Skip to content

Commit

Permalink
[Dev Deps] upgrade eslint-plugin-eslint-plugin to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish authored and ljharb committed Oct 16, 2021
1 parent c70163d commit d06f27b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .eslintrc
Expand Up @@ -43,6 +43,10 @@
"requireParamDescription": false,
"requireReturnDescription": false,
}],

"eslint-plugin/consistent-output": 0,
"eslint-plugin/require-meta-schema": 0,
"eslint-plugin/require-meta-type": 0
},
"overrides": [
{
Expand Down
5 changes: 4 additions & 1 deletion lib/rules/forbid-prop-types.js
Expand Up @@ -142,7 +142,10 @@ module.exports = {
}
case 'CallExpression': {
const innerNode = node.arguments && node.arguments[0];
if (propWrapperUtil.isPropWrapperFunction(context, context.getSource(node.callee)) && innerNode) {
if (
propWrapperUtil.isPropWrapperFunction(context, context.getSourceCode().getText(node.callee))
&& innerNode
) {
checkNode(innerNode);
}
break;
Expand Down
1 change: 0 additions & 1 deletion lib/rules/jsx-closing-tag-location.js
Expand Up @@ -27,7 +27,6 @@ module.exports = {
url: docsUrl('jsx-closing-tag-location'),
},
fixable: 'whitespace',

messages,
},

Expand Down
6 changes: 3 additions & 3 deletions lib/rules/jsx-curly-spacing.js
Expand Up @@ -371,13 +371,13 @@ module.exports = {
}

const sourceCode = context.getSourceCode();
const first = context.getFirstToken(node);
const first = sourceCode.getFirstToken(node);
const last = sourceCode.getLastToken(node);
let second = context.getTokenAfter(first, { includeComments: true });
let second = sourceCode.getTokenAfter(first, { includeComments: true });
let penultimate = sourceCode.getTokenBefore(last, { includeComments: true });

if (!second) {
second = context.getTokenAfter(first);
second = sourceCode.getTokenAfter(first);
const leadingComments = sourceCode.getNodeByRangeIndex(second.range[0]).leadingComments;
second = leadingComments ? leadingComments[0] : second;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-sort-default-props.js
Expand Up @@ -61,7 +61,7 @@ module.exports = {
// (babel-eslint@5 does not expose property name so we have to rely on tokens)
}
if (node.type === 'ClassProperty') {
const tokens = context.getFirstTokens(node, 2);
const tokens = context.getSourceCode().getFirstTokens(node, 2);
return tokens[1] && tokens[1].type === 'Identifier' ? tokens[1].value : tokens[0].value;
}
return '';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -52,7 +52,7 @@
"babel-eslint": "^8 || ^9 || ^10.1.0",
"eslint": "^3 || ^4 || ^5 || ^6 || ^7",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-eslint-plugin": "^2.3.0 || ^3.5.3",
"eslint-plugin-eslint-plugin": "^2.3.0 || ^3.5.3 || ^4.0.1",
"eslint-plugin-import": "^2.25.2",
"eslint-remote-tester": "^1.3.1",
"eslint-remote-tester-repositories": "^0.0.3",
Expand Down

0 comments on commit d06f27b

Please sign in to comment.