Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var allRules = {
function configureAsError(rules) {
var result = {};
for (var key in rules) {
if (!rules.hasOwnProperty(key)) {
if (!Object.hasOwn(rules, key)) {
continue;
}
result["react-perf/" + key] = 2;
Expand Down
433 changes: 189 additions & 244 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
},
"license": "MIT",
"devDependencies": {
"eslint": "^9.12.0",
"@eslint/js": "^10.0.1",
"eslint": "^10.0.0",
"globals": "^17.3.0",
"istanbul": "^0.4.5",
"mocha": "^10.2.0"
},
"peerDependencies": {
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0"
"eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0"
},
"engines": {
"node": ">=6.9.1"
Expand Down
1 change: 0 additions & 1 deletion tests/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-env mocha */
"use strict";

var plugin = require("..");
Expand Down
3 changes: 0 additions & 3 deletions tests/lib/rules/jsx-no-jsx-as-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var invalidJSXElements = [
{
line,
column,
type: "JSXElement"
}
]
};
Expand All @@ -25,7 +24,6 @@ var invalidJSXFragments = [
{
line,
column,
type: "JSXFragment",
},
],
};
Expand All @@ -36,6 +34,5 @@ module.exports = testRule(
"jsx-no-jsx-as-prop",
"JSX attribute values should not contain other JSX",
"<SubItem />",
"JSXElement",
[].concat(invalidJSXElements, invalidJSXFragments)
);
4 changes: 0 additions & 4 deletions tests/lib/rules/jsx-no-new-array-as-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var invalidArrayExpressions = [
{
line,
column,
type: "ArrayExpression"
}
]
};
Expand All @@ -26,7 +25,6 @@ var invalidNewExpressions = [
{
line,
column,
type: "NewExpression"
}
]
};
Expand All @@ -41,7 +39,6 @@ var invalidCallExpressions = [
{
line,
column,
type: "CallExpression"
}
]
};
Expand All @@ -52,7 +49,6 @@ module.exports = testRule(
"jsx-no-new-array-as-prop",
"JSX attribute values should not contain Arrays created in the same scope",
"[]",
"ArrayExpression",
[].concat(
invalidArrayExpressions,
invalidNewExpressions,
Expand Down
5 changes: 0 additions & 5 deletions tests/lib/rules/jsx-no-new-function-as-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var invalidFunctionExpressions = [
{
line,
column,
type: "FunctionExpression",
},
],
};
Expand All @@ -25,7 +24,6 @@ var invalidArrowFunctionExpressions = [
{
line,
column,
type: "ArrowFunctionExpression",
},
],
};
Expand All @@ -40,7 +38,6 @@ var invalidNewExpressions = [
{
line,
column,
type: "NewExpression",
},
],
};
Expand All @@ -59,7 +56,6 @@ var invalidCallExpressions = [
{
line,
column,
type: "CallExpression",
},
],
};
Expand All @@ -72,7 +68,6 @@ module.exports = testRule(
"jsx-no-new-function-as-prop",
"JSX attribute values should not contain functions created in the same scope",
"function(){}",
"FunctionExpression",
[].concat(
invalidFunctionExpressions,
invalidArrowFunctionExpressions,
Expand Down
4 changes: 0 additions & 4 deletions tests/lib/rules/jsx-no-new-object-as-prop.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var invalidObjectExpressions = [
{
line,
column,
type: "ObjectExpression"
}
]
};
Expand All @@ -26,7 +25,6 @@ var invalidNewExpressions = [
{
line,
column,
type: "NewExpression"
}
]
};
Expand All @@ -41,7 +39,6 @@ var invalidCallExpressions = [
{
line,
column,
type: "CallExpression"
}
]
};
Expand All @@ -52,7 +49,6 @@ module.exports = testRule(
"jsx-no-new-object-as-prop",
"JSX attribute values should not contain objects created in the same scope",
"{}",
"ObjectExpression",
[].concat(
invalidObjectExpressions,
invalidNewExpressions,
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ function testRule(
ruleName,
errorMessage,
ruleCode,
ruleType,
invalid,
valid
) {
Expand Down Expand Up @@ -74,7 +73,6 @@ function testRule(
{
line,
column,
type: ruleType,
},
],
};
Expand Down