From deed0f150680dccf20c3199410a6f00960a202dd Mon Sep 17 00:00:00 2001 From: Jey Date: Wed, 7 Aug 2019 09:24:15 +0100 Subject: [PATCH] chore: run prettier (#1753) * chore: add .github dir to prettier * chore: run prettier --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- build/tasks/aria-supported.js | 4 +- lib/core/index.js | 4 +- package.json | 4 +- .../landmark-unique/landmark-unique-fail.html | 86 +++++++++++++++---- 5 files changed, 73 insertions(+), 27 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9198c37064..8bf4bdcc68 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,3 @@ - << Describe the changes >> Closes issue: @@ -6,5 +5,6 @@ Closes issue: ## Reviewer checks **Required fields, to be filled out by PR reviewer(s)** + - [ ] Follows the commit message policy, appropriate for next version - [ ] Code is reviewed for security diff --git a/build/tasks/aria-supported.js b/build/tasks/aria-supported.js index 79cc4b3cec..37f9577748 100644 --- a/build/tasks/aria-supported.js +++ b/build/tasks/aria-supported.js @@ -56,9 +56,7 @@ module.exports = function(grunt) { (footnote, index) => `[^${index + 1}]: ${footnote}` ); - const content = `${ - headings.main - }\n\n## Attributes\n\n${attributesTableMarkdown}\n\n${footnotes}`; + const content = `${headings.main}\n\n## Attributes\n\n${attributesTableMarkdown}\n\n${footnotes}`; const destFile = this.data.destFile; // Format the content so Prettier doesn't create a diff after running. diff --git a/lib/core/index.js b/lib/core/index.js index 90d7826464..820b51b0e6 100644 --- a/lib/core/index.js +++ b/lib/core/index.js @@ -32,9 +32,7 @@ var commons; function SupportError(error) { this.name = 'SupportError'; this.cause = error.cause; - this.message = `\`${ - error.cause - }\` - feature unsupported in your environment.`; + this.message = `\`${error.cause}\` - feature unsupported in your environment.`; if (error.ruleId) { this.ruleId = error.ruleId; this.message += ` Skipping ${this.ruleId} rule.`; diff --git a/package.json b/package.json index 8e0a0fef7e..1b5da9019c 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "rule-gen": "node build/rule-generator", "next-release": "standard-version --scripts.prebump=./build/next-version.js --skip.commit=true --skip.tag=true", "sri-update": "grunt build && node build/sri-update && git add sri-history.json", - "fmt": "prettier --write *.{json,md,js} **/*.ts './{build,doc,lib,test}/**/*.{json,md,js,ts,html}'" + "fmt": "prettier --write *.{json,md,js} **/*.ts './{.github,build,doc,lib,test}/**/*.{json,md,js,ts,html}'" }, "devDependencies": { "@babel/core": "^7.5.4", @@ -122,7 +122,7 @@ "revalidator": "~0.3.1", "selenium-webdriver": "~3.6.0", "sri-toolbox": "^0.2.0", - "standard-version": "^7.0.0", + "standard-version": "^7.0.0", "typescript": "^3.5.3", "uglify-js": "^3.4.4", "weakmap-polyfill": "^2.0.0" diff --git a/test/integration/rules/landmark-unique/landmark-unique-fail.html b/test/integration/rules/landmark-unique/landmark-unique-fail.html index df74c01328..f01c8499e1 100644 --- a/test/integration/rules/landmark-unique/landmark-unique-fail.html +++ b/test/integration/rules/landmark-unique/landmark-unique-fail.html @@ -1,5 +1,9 @@
First main
- +
First header
Second header
@@ -9,36 +13,76 @@
form-with-label
form-with-label
-
-
+
+
aside-with-label
aside-with-label
-
-
+
+
iframe-form-with-label
-
+
- - + + - - - -
-
+ + + +
+
@@ -46,8 +90,14 @@ - - - -
-
\ No newline at end of file + + + +
+