Skip to content

Commit f2d9774

Browse files
committed
Rename rule to no-empty-alt-text
1 parent 8f80d4d commit f2d9774

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

docs/rules/GH003-no-empty-string-alt.md renamed to docs/rules/GH003-no-empty-alt-text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# GH003 No empty string alt
1+
# GH003 No Empty Alt Text
22

33
## Rule details
44

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const gitHubCustomRules = require("./src/rules/index").rules;
66

77
module.exports = [...gitHubCustomRules];
88

9-
const offByDefault = ["no-empty-string-alt"];
9+
const offByDefault = ["no-empty-alt-text"];
1010

1111
for (const rule of gitHubCustomRules) {
1212
const ruleName = rule.names[1];

src/rules/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module.exports = {
22
rules: [
33
require("./no-default-alt-text"),
44
require("./no-generic-link-text"),
5-
require("./no-empty-string-alt"),
5+
require("./no-empty-alt-text"),
66
],
77
};

src/rules/no-empty-string-alt.js renamed to src/rules/no-empty-alt-text.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
2-
names: ["GH003", "no-empty-string-alt"],
2+
names: ["GH003", "no-empty-alt-text"],
33
description: "Please provide an alternative text for the image.",
44
information: new URL(
5-
"https://github.com/github/markdownlint-github/blob/main/docs/rules/GH003-no-empty-string-alt.md",
5+
"https://github.com/github/markdownlint-github/blob/main/docs/rules/GH003-no-empty-alt-text.md",
66
),
77
tags: ["accessibility", "images"],
88
function: function GH003(params, onError) {

test/no-empty-string-alt.test.js renamed to test/no-empty-alt-text.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const noEmptyStringAltRule = require("../src/rules/no-empty-string-alt");
1+
const noEmptyStringAltRule = require("../src/rules/no-empty-alt-text");
22
const runTest = require("./utils/run-test").runTest;
33

4-
describe("GH003: No Empty String Alt", () => {
4+
describe("GH003: No Empty Alt Text", () => {
55
describe("successes", () => {
66
test("html image", async () => {
77
const strings = [
@@ -30,7 +30,7 @@ describe("GH003: No Empty String Alt", () => {
3030

3131
expect(failedRules).toHaveLength(4);
3232
for (const rule of failedRules) {
33-
expect(rule).toBe("no-empty-string-alt");
33+
expect(rule).toBe("no-empty-alt-text");
3434
}
3535
});
3636

test/usage.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe("usage", () => {
88

99
expect(rules[0].names).toEqual(["GH001", "no-default-alt-text"]);
1010
expect(rules[1].names).toEqual(["GH002", "no-generic-link-text"]);
11-
expect(rules[2].names).toEqual(["GH003", "no-empty-string-alt"]);
11+
expect(rules[2].names).toEqual(["GH003", "no-empty-alt-text"]);
1212
});
1313
});
1414
describe("init method", () => {
@@ -20,7 +20,7 @@ describe("usage", () => {
2020
"no-space-in-links": false,
2121
"single-h1": true,
2222
"no-emphasis-as-header": true,
23-
"no-empty-string-alt": false,
23+
"no-empty-alt-text": false,
2424
"heading-increment": true,
2525
"no-generic-link-text": true,
2626
"ul-style": {

0 commit comments

Comments
 (0)