From 0896c7a403fbb865e1546fcdb0828001e6c3d327 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Tue, 14 Feb 2023 10:21:28 -0500 Subject: [PATCH] Infrastructure: Run Prettier on commit of all files (#2614) * Infrastructure: Run Prettier on commit of all files * Update .prettierignore --- .eslintrc.json | 20 +- .github/dependabot.yml | 32 +- .github/workflows/coverage-report.yml | 6 +- .prettierignore | 9 + .prettierrc | 6 + .stylelintrc | 12 +- .vscode/extensions.json | 4 +- CONTRIBUTING.md | 4 +- LICENSE.md | 3 +- README.md | 16 +- cspell.json | 589 +++++++++++++------------- package.json | 6 +- w3c.json | 4 +- 13 files changed, 355 insertions(+), 356 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7e40af6dbc..02e73bdf48 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,5 +1,9 @@ { - "extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:prettier/recommended"], + "extends": [ + "eslint:recommended", + "plugin:jsdoc/recommended", + "plugin:prettier/recommended" + ], "env": { "browser": true, "es6": true @@ -50,26 +54,22 @@ } }, { - "files": [ - "**/*.html" - ], - "plugins":[ - "html" - ], + "files": ["**/*.html"], + "plugins": ["html"], "globals": { "sourceCode": true }, "rules": { "strict": 0, - "no-unused-vars": ["error", { "varsIgnorePattern": "SkipToConfig" }] + "no-unused-vars": ["error", { "varsIgnorePattern": "SkipToConfig" }] } }, { - "files": [ "content/shared/js/app.js" ], + "files": ["content/shared/js/app.js"], "parserOptions": { "ecmaVersion": 11 } }, { - "files": [ "content/shared/js/specLinks.mjs" ], + "files": ["content/shared/js/specLinks.mjs"], "parserOptions": { "sourceType": "module" } } ] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3008641dbb..6771e2d0d1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,18 +1,18 @@ version: 2 updates: -- package-ecosystem: npm - directory: "/" - schedule: - interval: monthly - time: "10:00" - open-pull-requests-limit: 99 - commit-message: - prefix: "Infrastructure" -- package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - time: "10:00" - open-pull-requests-limit: 99 - commit-message: - prefix: "Infrastructure" + - package-ecosystem: npm + directory: "/" + schedule: + interval: monthly + time: "10:00" + open-pull-requests-limit: 99 + commit-message: + prefix: "Infrastructure" + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + time: "10:00" + open-pull-requests-limit: 99 + commit-message: + prefix: "Infrastructure" diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 80f8307bc4..43579afa38 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -3,9 +3,9 @@ name: Regression Tests Coverage Report on: pull_request_target: paths: - - "content/**/examples/**" - - "test/**" - - "!content/landmarks/examples/**" + - "content/**/examples/**" + - "test/**" + - "!content/landmarks/examples/**" permissions: contents: read diff --git a/.prettierignore b/.prettierignore index 7805de1a30..405e2c669c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,3 +4,12 @@ common # Vendored theme files bootstrap.css bootstrap-theme.css + +# Ignore HTML formatting as the diffs are not great +*.html + +# Ignore third party JavaScript +**/*.min.js +content/patterns/landmarks/examples/js/visua11y.js +content/shared/js/highlight.pack.js +content/shared/js/skipto.js diff --git a/.prettierrc b/.prettierrc index 2c90e42739..80411df699 100644 --- a/.prettierrc +++ b/.prettierrc @@ -6,6 +6,12 @@ "options": { "singleQuote": false } + }, + { + "files": ["**/*.yml"], + "options": { + "singleQuote": false + } } ] } diff --git a/.stylelintrc b/.stylelintrc index 080e9691e2..45eadff29b 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -4,18 +4,14 @@ "media-feature-name-no-unknown": [ true, { - "ignoreMediaFeatureNames": [ - "forced-colors" - ] - }, + "ignoreMediaFeatureNames": ["forced-colors"] + } ], "font-family-no-missing-generic-family-keyword": [ true, { - "ignoreFontFamilies": [ - "Font Awesome 5 Free" - ] - }, + "ignoreFontFamilies": ["Font Awesome 5 Free"] + } ], "selector-class-pattern": null, "selector-id-pattern": null diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 8481f95630..ff1b97a2e4 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,3 @@ { - "recommendations": [ - "streetsidesoftware.code-spell-checker" - ] + "recommendations": ["streetsidesoftware.code-spell-checker"] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 04f3475f83..9b2f1e3c7c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Contributions to this repository are intended to become part of Technical Report [Software and Document License](https://www.w3.org/Consortium/Legal/copyright-software). To make substantive contributions to documents, you must either participate in the relevant W3C Working Group or transfer copyright to W3C. -If you are not the sole contributor to a contribution (pull request), please identify all +If you are not the sole contributor to a contribution (pull request), please identify all contributors in the pull request comment. To add a contributor (other than yourself, that's automatic), mark them one per line as follows: @@ -17,5 +17,5 @@ If you added a contributor by mistake, you can remove them in a comment with: -@github_username ``` -If you are making a pull request on behalf of someone else but you had no part in designing the +If you are making a pull request on behalf of someone else but you had no part in designing the feature, you can remove yourself with the above syntax. diff --git a/LICENSE.md b/LICENSE.md index 0f7c218c64..5ceb4a4c03 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,3 @@ All documents in this Repository are licensed by contributors -under the +under the [W3C Software and Document License](https://www.w3.org/Consortium/Legal/copyright-software). - diff --git a/README.md b/README.md index cacd6fda8e..a219370806 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ This repository maintains the WAI-ARIA Authoring Practices Guide (APG). -* Published at: [w3.org/wai/aria/apg](https://www.w3.org/wai/aria/apg/) -* Developed by the [Authoring Practices Task Force](https://www.w3.org/WAI/ARIA/task-forces/practices/) of the [ARIA Working Group](http://www.w3.org/WAI/ARIA/). -* Staff contact: [Michael Cooper](http://www.w3.org/People/cooper/). +- Published at: [w3.org/wai/aria/apg](https://www.w3.org/wai/aria/apg/) +- Developed by the [Authoring Practices Task Force](https://www.w3.org/WAI/ARIA/task-forces/practices/) of the [ARIA Working Group](http://www.w3.org/WAI/ARIA/). +- Staff contact: [Michael Cooper](http://www.w3.org/People/cooper/). Please do not provide commit access to this repository without coordination. ## How the work is organized -* Work is planned and prioritized in our [milestones](https://github.com/w3c/aria-practices/milestones?direction=asc&sort=due_date&state=open). Each milestone corresponds to a working draft or release published to w3.org. -* Work is organized by topic in our [projects](https://github.com/w3c/aria-practices/projects). Each project corresponds to a type of design pattern or section of guidance. -* The [scope of work and roadmap](https://github.com/w3c/aria-practices/wiki/Scope) are described in the project wiki. +- Work is planned and prioritized in our [milestones](https://github.com/w3c/aria-practices/milestones?direction=asc&sort=due_date&state=open). Each milestone corresponds to a working draft or release published to w3.org. +- Work is organized by topic in our [projects](https://github.com/w3c/aria-practices/projects). Each project corresponds to a type of design pattern or section of guidance. +- The [scope of work and roadmap](https://github.com/w3c/aria-practices/wiki/Scope) are described in the project wiki. ## Contributing @@ -109,9 +109,9 @@ contains additional useful editorial guidance. ## ARIA Roles, Properties and States Referenced in Guidance and Examples(Also known as APG Coverage Report) -[APG Coverage Report](https://raw.githack.com/w3c/aria-practices/main/coverage/index.html) includes information on number of guidance and example references in the WAI-ARIA Authoring Practices for each ARIA role, property and state. +[APG Coverage Report](https://raw.githack.com/w3c/aria-practices/main/coverage/index.html) includes information on number of guidance and example references in the WAI-ARIA Authoring Practices for each ARIA role, property and state. -As of January 11, 2022, APG has examples of +As of January 11, 2022, APG has examples of 1. CSV Files of Role, Properties and States Coverage 2. Roles with no Guidance or Examples (29) diff --git a/cspell.json b/cspell.json index 36a32fb03d..633ec50f16 100644 --- a/cspell.json +++ b/cspell.json @@ -1,299 +1,294 @@ { - "version": "0.2", - "dictionaries": [ - "html", - "css", - "javascript", - "npm" - ], - "words": [ - "Accesskey", - "accesskey", - "activedescendants", - "affordance", - "Ahlefeldt", - "alertdialog", - "alertdialogs", - "Anjou", - "Aristov", - "avacmd", - "AXAPI", - "Balusani", - "Bellew", - "Bijl", - "Bocoup", - "Bogdan", - "Bohrium", - "Bookmarklet", - "Bookmarklets", - "Bosc", - "Botr", - "Brinza", - "Bucketwheat", - "camelcase", - "Capitan", - "Carron", - "checkmark", - "Chjat", - "citystate", - "Claremont", - "Codepen", - "codepenbutton", - "colheader", - "Colom", - "combobox's", - "comboboxes", - "commenters", - "contenteditable", - "contentinfos", - "Cook'n", - "Copernicium", - "Coughlin", - "crossorigin", - "cufc", - "Cundiff", - "Cutey's", - "Dahamiwal", - "Darmstadtium", - "datepicker", - "Davoust", - "Defocus", - "Deletable", - "Denicola", - "Deque", - "DHTML", - "dialog's", - "Diggs", - "Dimas", - "discoverability", - "Dmuddy", - "docx", - "Domenic", - "dropup", - "Dubnium", - "Dušek", - "EXPANDO", - "Fairchild", - "Fancytree", - "Fentress", - "Fezensac", - "Flerovium", - "Focusability", - "focusable", - "Foltz", - "Fonseca", - "Foyle", - "Frahm", - "funders", - "Gaelle", - "Garaventa", - "geckodriver", - "genstedt", - "Geppy", - "gridbox", - "gridcells", - "GUIs", - "Gunderson", - "Hassium", - "Hausler", - "Henriette", - "Hickson", - "highlighttext", - "Higley", - "Hillen", - "hljs", - "Hoyt", - "IDREF", - "IDREFS", - "imgs", - "Iskandar", - "issie", - "Jaeun", - "jarosewli", - "Jemma", - "Jinyuan", - "Joanmarie", - "Jèrôme", - "Kasper", - "kbdshortcuts", - "Kesteren", - "Kiærskou", - "Kowno", - "Labelable", - "Lange", - "Lauke", - "Leventhal", - "Lewandowski", - "Lilley", - "listbox's", - "Listboxes", - "listitems", - "Livermorium", - "Malo", - "Manish", - "Marek", - "Meitnerium", - "menubars", - "Menubutton", - "menubuttons", - "menuitems", - "Minard", - "Minard's", - "Mobilow", - "Mojaisk", - "Moloderno", - "moreaccessible", - "Moscovium", - "MSAA", - "multithumb", - "Müller", - "navs", - "Nemeth", - "nightmode", - "Nihonium", - "nodir", - "norotate", - "Nurthen", - "NVDA", - "Obel", - "OCAD", - "octokit", - "Oganesson", - "Okinawans", - "onlosecapture", - "Orscha", - "outdent", - "Paciello", - "PAGEDOWN", - "PAGEUP", - "Pappas", - "perceivability", - "Philipp", - "PIAS", - "Pieters", - "Polovnyov", - "polyline", - "Popout", - "portlet", - "Presentational", - "Pseudocereal", - "radiogroups", - "rawgit", - "Rearrangeable", - "refreshable", - "respec", - "roadmap", - "Roentgenium", - "rowgroups", - "Royds", - "rtrim", - "Rudloff", - "ruleset", - "Sakura", - "Sanaullah", - "Scheuhammer", - "Schonning", - "Schulze", - "Schwerdtfeger", - "Scrollable", - "Seaborgium", - "Seckel", - "Shirisha", - "shizzle", - "Shopify", - "Siboni", - "skipto", - "Smorgeni", - "Sofie", - "sortability", - "sourcecode", - "Spinbuttons", - "Starkrimson", - "Studienska", - "stylelint", - "subfolders", - "submenu", - "submenu's", - "submenus", - "Sulaiman", - "Ségur", - "tabbable", - "tablist", - "tablists", - "tablist’s", - "tabpanels", - "Tatiana", - "Tennessine", - "textarea's", - "textfield", - "Thaarup", - "Theresia", - "Thiel", - "Thiers", - "thomascorthals", - "togglable", - "Tonekunstnerinde", - "transactinide", - "transuranic", - "Transuranium", - "Treegrids", - "treeitems", - "Treeview", - "Tryens", - "uncheck", - "Unchecking", - "unchecks", - "unimp", - "unmanaged", - "Vasily", - "Vinkle", - "virkelig", - "vnurc", - "Vyacheslav", - "walkability", - "WCAG", - "WHATWG", - "widget's", - "Willigers", - "Wilna", - "Wirma", - "Witebsk", - "xlink", - "Yamanishi", - "Zhou" - ], - "ignoreRegExpList": [ - "id=\"(?:[^\\\"]+|\\.)*\"", - "src=\"(?:[^\\\"]+|\\.)*\"", - "class=\"(?:[^\\\"]+|\\.)*\"", - "data-test-id=\"(?:[^\\\"]+|\\.)*\"", - "aria-activedescendant=\"(?:[^\\\"]+|\\.)*\"", - "aria-controls=\"(?:[^\\\"]+|\\.)*\"", - "aria-describedby=\"(?:[^\\\"]+|\\.)*\"", - "aria-details=\"(?:[^\\\"]+|\\.)*\"", - "aria-errormessage=\"(?:[^\\\"]+|\\.)*\"", - "aria-flowto=\"(?:[^\\\"]+|\\.)*\"", - "aria-labelledby=\"(?:[^\\\"]+|\\.)*\"", - "aria-owns=\"(?:[^\\\"]+|\\.)*\"", - "href=\"(?:[^\\\"]+|\\.)*\"", - "for=\"(?:[^\\\"]+|\\.)*\"", - "url\\(\"data\\:image/svg\\+xml.*\"\\)[,;]" - ], - "allowCompoundWords": false, - "ignorePaths": [ - "cspell.json", - "**/*.min.js", - "**/*.pack.js", - "**/*.paint", - "content/shared/css/github.css", - "content/shared/js/skipto.js", - "content/shared/js/specLinks.mjs", - "content/patterns/landmarks/examples/css/bootstrap.css", - "content/patterns/landmarks/examples/css/bootstrap-theme.css", - "content/patterns/landmarks/examples/js/visua11y.js", - "common/**", - "node_modules/**", - "package*.json", - "respec-config.js" - ] + "version": "0.2", + "dictionaries": ["html", "css", "javascript", "npm"], + "words": [ + "Accesskey", + "accesskey", + "activedescendants", + "affordance", + "Ahlefeldt", + "alertdialog", + "alertdialogs", + "Anjou", + "Aristov", + "avacmd", + "AXAPI", + "Balusani", + "Bellew", + "Bijl", + "Bocoup", + "Bogdan", + "Bohrium", + "Bookmarklet", + "Bookmarklets", + "Bosc", + "Botr", + "Brinza", + "Bucketwheat", + "camelcase", + "Capitan", + "Carron", + "checkmark", + "Chjat", + "citystate", + "Claremont", + "Codepen", + "codepenbutton", + "colheader", + "Colom", + "combobox's", + "comboboxes", + "commenters", + "contenteditable", + "contentinfos", + "Cook'n", + "Copernicium", + "Coughlin", + "crossorigin", + "cufc", + "Cundiff", + "Cutey's", + "Dahamiwal", + "Darmstadtium", + "datepicker", + "Davoust", + "Defocus", + "Deletable", + "Denicola", + "Deque", + "DHTML", + "dialog's", + "Diggs", + "Dimas", + "discoverability", + "Dmuddy", + "docx", + "Domenic", + "dropup", + "Dubnium", + "Dušek", + "EXPANDO", + "Fairchild", + "Fancytree", + "Fentress", + "Fezensac", + "Flerovium", + "Focusability", + "focusable", + "Foltz", + "Fonseca", + "Foyle", + "Frahm", + "funders", + "Gaelle", + "Garaventa", + "geckodriver", + "genstedt", + "Geppy", + "gridbox", + "gridcells", + "GUIs", + "Gunderson", + "Hassium", + "Hausler", + "Henriette", + "Hickson", + "highlighttext", + "Higley", + "Hillen", + "hljs", + "Hoyt", + "IDREF", + "IDREFS", + "imgs", + "Iskandar", + "issie", + "Jaeun", + "jarosewli", + "Jemma", + "Jinyuan", + "Joanmarie", + "Jèrôme", + "Kasper", + "kbdshortcuts", + "Kesteren", + "Kiærskou", + "Kowno", + "Labelable", + "Lange", + "Lauke", + "Leventhal", + "Lewandowski", + "Lilley", + "listbox's", + "Listboxes", + "listitems", + "Livermorium", + "Malo", + "Manish", + "Marek", + "Meitnerium", + "menubars", + "Menubutton", + "menubuttons", + "menuitems", + "Minard", + "Minard's", + "Mobilow", + "Mojaisk", + "Moloderno", + "moreaccessible", + "Moscovium", + "MSAA", + "multithumb", + "Müller", + "navs", + "Nemeth", + "nightmode", + "Nihonium", + "nodir", + "norotate", + "Nurthen", + "NVDA", + "Obel", + "OCAD", + "octokit", + "Oganesson", + "Okinawans", + "onlosecapture", + "Orscha", + "outdent", + "Paciello", + "PAGEDOWN", + "PAGEUP", + "Pappas", + "perceivability", + "Philipp", + "PIAS", + "Pieters", + "Polovnyov", + "polyline", + "Popout", + "portlet", + "Presentational", + "Pseudocereal", + "radiogroups", + "rawgit", + "Rearrangeable", + "refreshable", + "respec", + "roadmap", + "Roentgenium", + "rowgroups", + "Royds", + "rtrim", + "Rudloff", + "ruleset", + "Sakura", + "Sanaullah", + "Scheuhammer", + "Schonning", + "Schulze", + "Schwerdtfeger", + "Scrollable", + "Seaborgium", + "Seckel", + "Shirisha", + "shizzle", + "Shopify", + "Siboni", + "skipto", + "Smorgeni", + "Sofie", + "sortability", + "sourcecode", + "Spinbuttons", + "Starkrimson", + "Studienska", + "stylelint", + "subfolders", + "submenu", + "submenu's", + "submenus", + "Sulaiman", + "Ségur", + "tabbable", + "tablist", + "tablists", + "tablist’s", + "tabpanels", + "Tatiana", + "Tennessine", + "textarea's", + "textfield", + "Thaarup", + "Theresia", + "Thiel", + "Thiers", + "thomascorthals", + "togglable", + "Tonekunstnerinde", + "transactinide", + "transuranic", + "Transuranium", + "Treegrids", + "treeitems", + "Treeview", + "Tryens", + "uncheck", + "Unchecking", + "unchecks", + "unimp", + "unmanaged", + "Vasily", + "Vinkle", + "virkelig", + "vnurc", + "Vyacheslav", + "walkability", + "WCAG", + "WHATWG", + "widget's", + "Willigers", + "Wilna", + "Wirma", + "Witebsk", + "xlink", + "Yamanishi", + "Zhou" + ], + "ignoreRegExpList": [ + "id=\"(?:[^\\\"]+|\\.)*\"", + "src=\"(?:[^\\\"]+|\\.)*\"", + "class=\"(?:[^\\\"]+|\\.)*\"", + "data-test-id=\"(?:[^\\\"]+|\\.)*\"", + "aria-activedescendant=\"(?:[^\\\"]+|\\.)*\"", + "aria-controls=\"(?:[^\\\"]+|\\.)*\"", + "aria-describedby=\"(?:[^\\\"]+|\\.)*\"", + "aria-details=\"(?:[^\\\"]+|\\.)*\"", + "aria-errormessage=\"(?:[^\\\"]+|\\.)*\"", + "aria-flowto=\"(?:[^\\\"]+|\\.)*\"", + "aria-labelledby=\"(?:[^\\\"]+|\\.)*\"", + "aria-owns=\"(?:[^\\\"]+|\\.)*\"", + "href=\"(?:[^\\\"]+|\\.)*\"", + "for=\"(?:[^\\\"]+|\\.)*\"", + "url\\(\"data\\:image/svg\\+xml.*\"\\)[,;]" + ], + "allowCompoundWords": false, + "ignorePaths": [ + "cspell.json", + "**/*.min.js", + "**/*.pack.js", + "**/*.paint", + "content/shared/css/github.css", + "content/shared/js/skipto.js", + "content/shared/js/specLinks.mjs", + "content/patterns/landmarks/examples/css/bootstrap.css", + "content/patterns/landmarks/examples/css/bootstrap-theme.css", + "content/patterns/landmarks/examples/js/visua11y.js", + "common/**", + "node_modules/**", + "package*.json", + "respec-config.js" + ] } diff --git a/package.json b/package.json index 753a55bdc1..d9c813f042 100644 --- a/package.json +++ b/package.json @@ -61,10 +61,8 @@ "vnu-jar": "^21.2.5" }, "lint-staged": { - "*.css": [ - "stylelint --fix", - "prettier --ignore-unknown --write" - ], + "*": "prettier --ignore-unknown --write", + "*.css": "stylelint --fix", "*.js": [ "eslint --fix" ], diff --git a/w3c.json b/w3c.json index aaf9a84e59..8368bae974 100644 --- a/w3c.json +++ b/w3c.json @@ -1,8 +1,6 @@ { "group": 83726, - "contacts": [ - "michael-n-cooper" - ], + "contacts": ["michael-n-cooper"], "policy": "restricted", "repo-type": "note" }