Skip to content

Commit f40a3c2

Browse files
committed
fmt + remove casting as any
1 parent 84870ec commit f40a3c2

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

__mocks__/genInteractives.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export function genInteractiveElements(): Array<JSXElementMockType> {
170170
if (bracketIndex > -1) {
171171
name = elementSymbol.slice(0, bracketIndex);
172172
}
173-
const attributes = interactiveElementsMap[elementSymbol as any].map(({ prop, value }) => JSXAttributeMock(prop, value));
173+
const attributes = interactiveElementsMap[elementSymbol].map(({ prop, value }) => JSXAttributeMock(prop, value));
174174
return JSXElementMock(name, attributes);
175175
});
176176
}

__tests__/__util__/ruleOptionsMapperFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function ruleOptionsMapperFactory(ruleOptions: Array<mixed> = [])
2323
code,
2424
errors,
2525
// Flatten the array of objects in an array of one object.
26-
options: [fromEntries((options || []).concat(ruleOptions).flatMap((item) => entries(item as any)))],
26+
options: [fromEntries((options || []).concat(ruleOptions).flatMap((item) => entries(item)))],
2727
parserOptions,
2828
settings,
2929
};

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?: any
78
};
89

910
export type ESLintSettings = {

src/rules/anchor-ambiguous-text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default ({
6363
data: {
6464
wordsList: words.join('", "'),
6565
},
66-
} as any);
66+
});
6767
},
6868
};
6969
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
ESLintConfig,
1717
ESLintContext,
1818
ESLintVisitorSelectorConfig,
19-
} from "../../flow/eslint";
19+
} from '../../flow/eslint';
2020
import getElementType from '../util/getElementType';
2121
import isDOMElement from '../util/isDOMElement';
2222
import isHiddenFromScreenReader from '../util/isHiddenFromScreenReader';

src/util/isNonInteractiveElement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const nonInteractiveElementRoleSchemas = elementRoleEntries.flatMap(([elementSch
6262

6363
const nonInteractiveAXObjects = new Set(AXObjects.keys().filter((name) => ['window', 'structure'].includes(AXObjects.get(name).type)));
6464

65-
const nonInteractiveElementAXObjectSchemas = elementAXObjects.flatMap(([elementSchema, AXObjectsArr]) => (AXObjectsArr.every((role): boolean => nonInteractiveAXObjects.has(role)) ? [elementSchema] : []));
65+
const nonInteractiveElementAXObjectSchemas = [...elementAXObjects].flatMap(([elementSchema, AXObjectsArr]) => (AXObjectsArr.every((role): boolean => nonInteractiveAXObjects.has(role)) ? [elementSchema] : []));
6666

6767
function checkIsNonInteractiveElement(tagName: string, attributes: Object): boolean {
6868
function elementSchemaMatcher(elementSchema: Object) {

0 commit comments

Comments
 (0)