Skip to content

Commit 6a48348

Browse files
committed
[Deps] remove hasown
1 parent 7b1beac commit 6a48348

18 files changed

+24
-29
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"airbnb",
55
{
66
"targets": {
7-
"node": 4
7+
"node": 18
88
},
99
"transformRuntime": false
1010
}

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"rules": {
1717
"max-len": "off",
18-
"no-template-curly-in-string": "off",
18+
"no-template-curly-in-string": "off"
1919
},
2020
"overrides": [
2121
{

__mocks__/genInteractives.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ export function genElementSymbol(openingElement: Object): string {
162162
}
163163

164164
export function genInteractiveElements(): Array<JSXElementMockType> {
165-
return Object.keys(interactiveElementsMap).map((elementSymbol: string): JSXElementMockType => {
165+
return Object.keys(interactiveElementsMap).map((elementSymbol): JSXElementMockType => {
166166
const bracketIndex = elementSymbol.indexOf('[');
167-
let name = elementSymbol;
167+
let name: string = elementSymbol;
168168
if (bracketIndex > -1) {
169169
name = elementSymbol.slice(0, bracketIndex);
170170
}

flow/eslint.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
export type ESLintReport = {
55
node: any,
66
message: string,
7+
data?: Object
78
};
89

910
export type ESLintSettings = {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"eslint-plugin-flowtype": "^5.8.0 || ^8.0.3",
5858
"eslint-plugin-import": "^2.29.1",
5959
"estraverse": "^5.3.0",
60-
"flow-bin": "^0.147.0",
60+
"flow-bin": "^0.250.0",
6161
"in-publish": "^2.0.1",
6262
"jackspeak": "=2.1.1",
6363
"jscodeshift": "^0.7.1",
@@ -83,7 +83,6 @@
8383
"damerau-levenshtein": "^1.0.8",
8484
"emoji-regex": "^9.2.2",
8585
"es-iterator-helpers": "^1.0.19",
86-
"hasown": "^2.0.2",
8786
"jsx-ast-utils": "^3.3.5",
8887
"language-tags": "^1.0.9",
8988
"minimatch": "^3.1.2",

src/rules/anchor-ambiguous-text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default ({
4444
const ambiguousWords = new Set(words);
4545

4646
return {
47-
JSXOpeningElement: (node) => {
47+
JSXOpeningElement: (node: Object) => {
4848
const nodeType = elementType(node);
4949

5050
// Only check anchor elements and custom types.

src/rules/anchor-is-valid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default ({
6060

6161
// Create active aspect flag object. Failing checks will only report
6262
// if the related flag is set to true.
63-
const activeAspects = {};
63+
const activeAspects: Object = {};
6464
allAspects.forEach((aspect) => {
6565
activeAspects[aspect] = aspects.indexOf(aspect) !== -1;
6666
});

src/rules/label-has-associated-control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const schema = generateObjSchema({
3636
},
3737
});
3838

39-
function validateID(node, context) {
39+
function validateID(node: Object, context: Object) {
4040
const { settings } = context;
4141
const htmlForAttributes = settings['jsx-a11y']?.attributes?.for ?? ['htmlFor'];
4242

src/rules/media-has-caption.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ const schema = generateObjSchema({
2525
track: arraySchema,
2626
});
2727

28-
const isMediaType = (context, type) => {
28+
const isMediaType = (context: Object, type: string) => {
2929
const options = context.options[0] || {};
3030
return MEDIA_TYPES
3131
.concat(MEDIA_TYPES.flatMap((mediaType) => options[mediaType]))
3232
.some((typeToCheck) => typeToCheck === type);
3333
};
3434

35-
const isTrackType = (context, type) => {
35+
const isTrackType = (context: Object, type: string) => {
3636
const options = context.options[0] || {};
3737
return ['track'].concat(options.track || []).some((typeToCheck) => typeToCheck === type);
3838
};

src/rules/mouse-events-have-key-events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default ({
4040
},
4141

4242
create: (context: ESLintContext) => ({
43-
JSXOpeningElement: (node) => {
43+
JSXOpeningElement: (node: Object) => {
4444
const { name } = node.name;
4545

4646
if (!dom.get(name)) {

0 commit comments

Comments
 (0)