Skip to content

Commit 1b29f50

Browse files
Arcanemagusbeefancohen
authored andcommitted
Add URL to rule documentation to the metadata
ESLint v4.15.0 added an official location for rules to store a URL to their documentation in the rule metadata in eslint/eslint#9788. This adds the URL to all the existing rules so anything consuming them can know where their documentation is without having to resort to external packages to guess.
1 parent b19f4df commit 1b29f50

33 files changed

+99
-33
lines changed

src/rules/accessible-emoji.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const schema = generateObjSchema();
1818

1919
module.exports = {
2020
meta: {
21-
docs: {},
21+
docs: {
22+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/accessible-emoji.md',
23+
},
2224
schema: [schema],
2325
},
2426

src/rules/alt-text.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ const ruleByElement = {
152152

153153
module.exports = {
154154
meta: {
155-
docs: {},
155+
docs: {
156+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/alt-text.md',
157+
},
156158
schema: [schema],
157159
},
158160

src/rules/anchor-has-content.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ const schema = generateObjSchema({ components: arraySchema });
1919

2020
module.exports = {
2121
meta: {
22-
docs: {},
22+
docs: {
23+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/anchor-has-content.md',
24+
},
2325
schema: [schema],
2426
},
2527

src/rules/anchor-is-valid.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ const schema = generateObjSchema({
3333

3434
module.exports = {
3535
meta: {
36-
docs: {},
36+
docs: {
37+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/anchor-is-valid.md',
38+
},
3739
schema: [schema],
3840
},
3941

src/rules/aria-activedescendant-has-tabindex.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ const domElements = [...dom.keys()];
2222

2323
module.exports = {
2424
meta: {
25-
docs: {},
25+
docs: {
26+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/aria-activedescendant-has-tabindex.md',
27+
},
2628
schema: [schema],
2729
},
2830

src/rules/aria-props.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ const schema = generateObjSchema();
2929

3030
module.exports = {
3131
meta: {
32-
docs: {},
32+
docs: {
33+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/aria-props.md',
34+
},
3335
schema: [schema],
3436
},
3537

src/rules/aria-proptypes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ const schema = generateObjSchema();
5757
module.exports = {
5858
validityCheck,
5959
meta: {
60-
docs: {},
60+
docs: {
61+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/aria-proptypes.md',
62+
},
6163
schema: [schema],
6264
},
6365

src/rules/aria-role.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ const schema = generateObjSchema({
2222

2323
module.exports = {
2424
meta: {
25-
docs: {},
25+
docs: {
26+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/aria-role.md',
27+
},
2628
schema: [schema],
2729
},
2830

src/rules/aria-unsupported-elements.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ const schema = generateObjSchema();
2323

2424
module.exports = {
2525
meta: {
26-
docs: {},
26+
docs: {
27+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/aria-unsupported-elements.md',
28+
},
2729
schema: [schema],
2830
},
2931

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const domElements = [...dom.keys()];
2525

2626
module.exports = {
2727
meta: {
28-
docs: {},
28+
docs: {
29+
url: 'https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules/click-events-have-key-events.md',
30+
},
2931
schema: [schema],
3032
},
3133

0 commit comments

Comments
 (0)