Skip to content

Commit dcca0e3

Browse files
committed
Bump to v1.0.0
1 parent 37bfbba commit dcca0e3

File tree

7 files changed

+874
-975
lines changed

7 files changed

+874
-975
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.eslintcache
22
.gitignore
33
.husky
4+
.npmignore
45
.prettierignore
56
LICENSE
67
yarn.lock

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [1.0.0] - 2021-10-14
10+
11+
### Changed
12+
13+
- Major bump because of the `aria-query` dependency major bump.
14+
915
## [0.7.1] - 2021-07-15
1016

1117
### Changed
@@ -110,7 +116,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
110116

111117
- Initial release 🎉.
112118

113-
[unreleased]: https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/compare/v0.7.1...HEAD
119+
[unreleased]: https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/compare/v1.0.0...HEAD
120+
[1.0.0]: https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/compare/v0.7.1...v1.0.0
114121
[0.7.1]: https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/compare/v0.7.0...v0.7.1
115122
[0.7.0]: https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/compare/v0.6.2...v0.7.0
116123
[0.6.2]: https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/compare/v0.6.1...v0.6.2

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-vuejs-accessibility",
3-
"version": "0.7.1",
3+
"version": "1.0.0",
44
"description": "An eslint plugin for checking Vue.js files for accessibility",
55
"main": "dist/index.js",
66
"scripts": {
@@ -36,18 +36,18 @@
3636
"@types/eslint-scope": "^3.7.0",
3737
"@types/eslint-visitor-keys": "^1.0.0",
3838
"@types/jest": "^27.0.0",
39-
"@types/node": "^16.0.0",
40-
"@typescript-eslint/eslint-plugin": "^4.26.0",
41-
"@typescript-eslint/parser": "^4.26.0",
42-
"eslint": "^7.3.1",
39+
"@types/node": "^16.10.9",
40+
"@typescript-eslint/eslint-plugin": "^5.0.0",
41+
"@typescript-eslint/parser": "^5.0.0",
42+
"eslint": "^8.0.0",
4343
"eslint-plugin-eslint-plugin": "^3.0.0",
4444
"husky": "^7.0.0",
45-
"jest": "^27.0.1",
45+
"jest": "^27.2.5",
4646
"prettier": "^2.1.1",
4747
"pretty-quick": "^3.0.0",
4848
"ts-jest": "^27.0.1",
49-
"ts-node": "^10.0.0",
50-
"typescript": "^4.2.4"
49+
"ts-node": "^10.3.0",
50+
"typescript": "^4.4.4"
5151
},
5252
"eslintConfig": {
5353
"env": {
@@ -79,6 +79,9 @@
7979
}
8080
},
8181
"jest": {
82+
"moduleNameMapper": {
83+
"@eslint/eslintrc/universal": "@eslint/eslintrc/dist/eslintrc-universal.cjs"
84+
},
8285
"preset": "ts-jest",
8386
"setupFilesAfterEnv": [
8487
"./jest.setup.ts"

src/rules/interactive-supports-focus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717

1818
const interactiveRoles: ARIARoleDefintionKey[] = [];
1919

20-
for (const [role, definition] of roles) {
20+
for (const [role, definition] of roles.entries()) {
2121
if (
2222
!definition.abstract &&
2323
definition.superClass.some((classes) => classes.includes("widget"))

src/rules/no-redundant-roles.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ import {
1212

1313
const exceptions: { [type: string]: string[] } = { nav: ["navigation"] };
1414

15-
function getImplicitRoleSet(node: AST.VElement) {
16-
for (const [elementRole, roleSet] of elementRoles) {
15+
function getImplicitRoleSet(node: AST.VElement): any[] | null {
16+
for (const [elementRole, roleSet] of elementRoles.entries()) {
1717
if (matchesElementRole(node, elementRole)) {
18-
return roleSet;
18+
// The types for this are wrong, it's actually a string[]
19+
return roleSet as unknown as any[];
1920
}
2021
}
2122

@@ -64,7 +65,7 @@ const rule: Rule.RuleModule = {
6465
return;
6566
}
6667

67-
if (implicitRoleSet.has(explicitRole as any)) {
68+
if (implicitRoleSet.includes(explicitRole)) {
6869
context.report({
6970
node: node as any,
7071
messageId: "default",

src/utils/isInteractiveElement.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import matchesElementRole from "./matchesElementRole";
88
// aria-activedescendant, thus in practice we treat it as a widget.
99
const interactiveRoles = new Set(["toolbar"]);
1010

11-
for (const [name, definition] of roles) {
11+
for (const [name, definition] of roles.entries()) {
1212
if (
1313
!definition.abstract &&
1414
definition.superClass.some((classes) => classes.includes("widget"))
@@ -21,7 +21,7 @@ for (const [name, definition] of roles) {
2121
// don't have an explicit role.
2222
const interactiveElements = [{ name: "input" }];
2323

24-
for (const [element, names] of elementRoles) {
24+
for (const [element, names] of elementRoles.entries()) {
2525
if ([...names].some((name) => interactiveRoles.has(name))) {
2626
interactiveElements.push(element);
2727
}

0 commit comments

Comments
 (0)