Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE: demonstrate Build Linter failure for #1365 #1366

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
name: Spellcheck
script: npm run lint:spelling
env: ALLOW_FAILURE=true
- stage: Test
name: Build Linting
script: npm run lint:build

- stage: Test
name: AVA Regression Tests
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ Run locally:
npm run lint:js
```

### Regenerate `examples/index.html`

If you have changed something in `examples/`, the index may need to be regenerated.

Run locally:

```sh
npm run build
```

### Test and fix your code

1. Open a terminal window to the directory that contains the `aria-practices` repository
Expand Down
4 changes: 2 additions & 2 deletions examples/accordion/accordion.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ <h2 id="rps_label">Role, Property, State, and Tabindex Attributes</h2>
<ul>
<li>Element that serves as an accordion header.</li>
<li>Each accordion header element contains a button that controls the visibility of its content panel.</li>
<li>The example uses heading level 3 so it fits correctly within the outline of the page; the example is contained in a section titled with a level 2 heading.</li>
<li>The example uses heading level 3 so it fits correctly within the outline of the page; the example is contained in a section titled with a level 2 heading.</li>
</ul>
</td>
</tr>
<tr data-test-id="button-aria-expanded">
<td> </td>
<th scope="row"><code>aria-expanded="true"</code></th>
<th scope="row"><code>aria-busy="true"</code></th>
<td><code>button</code></td>
<td>
Set to <code>true</code> when the Accordion panel is expanded, otherwise set to <code>false</code>.
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
"example": "examples"
},
"scripts": {
"build": "node scripts/reference-tables.js",
"fix": "npm run lint:es -- --fix && npm run lint:css -- --fix",
"lint": "npm run lint:es && npm run lint:css && npm run vnu-jar && npm run lint:spelling",
"lint": "npm run lint:es && npm run lint:css && npm run vnu-jar && npm run lint:spelling && npm run lint:build",
carmacleod marked this conversation as resolved.
Show resolved Hide resolved
"lint:css": "stylelint **/*.css",
"lint:es": "eslint .",
"lint:js": "npm run lint:es",
"lint:html": "npm run vnu-jar",
"lint:spelling": "cspell \"examples/**/*.html\" \"aria-practices.html\"",
"lint:build": "./scripts/lint-build.sh",
"regression": "ava --timeout=1m",
"regression-report": "node test/util/report",
"test": "npm run lint && npm run regression",
Expand Down
10 changes: 10 additions & 0 deletions scripts/lint-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

cp examples/index.html examples/index.tmp.html &&
npm run build &&
diff examples/index.html examples/index.tmp.html
rv=$?
cp examples/index.tmp.html examples/index.html
rm examples/index.tmp.html
[ $rv -ne 0 ] && echo 'Please generate examples/index.html by running: npm run build'
exit $rv