Skip to content

Commit d5b1a77

Browse files
committed
Adding options to no-noninteractive-element-to-interative-role
1 parent dd07a4f commit d5b1a77

File tree

6 files changed

+581
-417
lines changed

6 files changed

+581
-417
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* @flow
3+
*/
4+
5+
type ESLintTestRunnerTestCase = {
6+
code: string,
7+
errors: ?Array<{
8+
message: string,
9+
type: string,
10+
}>,
11+
options: ?Array<mixed>,
12+
parserOptions: ?Array<mixed>,
13+
};
14+
15+
export default function ruleOptionsMapperFactory(
16+
ruleOptions: Array<mixed> = [],
17+
) {
18+
return ({
19+
code,
20+
errors,
21+
options,
22+
parserOptions,
23+
}: ESLintTestRunnerTestCase): ESLintTestRunnerTestCase => ({
24+
code,
25+
errors,
26+
options: (options || []).concat(ruleOptions),
27+
parserOptions,
28+
});
29+
}

0 commit comments

Comments
 (0)