From 62e4924f634570b4a31b63159244ddedbaf9f67e Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Mon, 30 Dec 2024 18:32:19 -0500 Subject: [PATCH 1/9] cb: updating circleci and package.json to allow CI of md files. --- .circleci/config.yml | 19 +++++++++++++++++++ package.json | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 80a4ab6dda..9bda9d63d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -97,6 +97,22 @@ jobs: command: npm run proof - snyk/scan: organization: uswds + lint_and_format: + executor: my-executor + parallelism: 2 + steps: + - checkout + - attach_workspace: + at: ~/project + - run: + name: lint + command: npm run lint + - run: + name: format + command: npm run prettier:md + - run: + name: check + command: npm run format-check test_a11y_desktop: executor: my-executor parallelism: 2 @@ -144,3 +160,6 @@ workflows: - test_a11y_mobile: requires: - build + - lint-and-format-workflow: + jobs: + - lint-and-format diff --git a/package.json b/package.json index bbb008af53..a9173b7175 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,9 @@ "pa11y-ci:sitemap": "pa11y-ci --sitemap http://localhost:4000/sitemap.xml --sitemap-exclude '/*.pdf|next|together/'", "pa11y-ci:sitemap-mobile": "pa11y-ci --config .pa11yci--mobile --sitemap http://localhost:4000/sitemap.xml --sitemap-exclude '/*.pdf|next|together/'", "pa11y-ci:sitemap-json": "pa11y-ci --json > pa11y-results.json --sitemap http://localhost:4000/sitemap.xml --sitemap-exclude '/*.pdf|next|together/'", - "prettier:scss": "npx prettier --write './css/**/*.scss'" + "prettier:scss": "npx prettier --write './css/**/*.scss'", + "prettier:md": "npx prettier --write './**/*.md'", + "prettier": "npm run prettier:md && npm run prettier:scss", }, "devDependencies": { "@18f/identity-stylelint-config": "^2.0.0", From c40c45587b11b35d5c622c41657ea05223ca77b8 Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Mon, 30 Dec 2024 18:36:41 -0500 Subject: [PATCH 2/9] cb: remove workflow test. --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bda9d63d3..4f6dae21c3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -160,6 +160,3 @@ workflows: - test_a11y_mobile: requires: - build - - lint-and-format-workflow: - jobs: - - lint-and-format From 3502a784efd88ca7c03ab093fc8d2b1bdcfa2d74 Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Mon, 30 Dec 2024 18:44:34 -0500 Subject: [PATCH 3/9] cb: remove workflow test. --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f6dae21c3..a06432d853 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -110,9 +110,6 @@ jobs: - run: name: format command: npm run prettier:md - - run: - name: check - command: npm run format-check test_a11y_desktop: executor: my-executor parallelism: 2 From fc7f02465eae9fafca621f1bcdb6f83e573d9fac Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Mon, 30 Dec 2024 18:47:27 -0500 Subject: [PATCH 4/9] cb: remove typo. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a9173b7175..03bc333f88 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "pa11y-ci:sitemap-json": "pa11y-ci --json > pa11y-results.json --sitemap http://localhost:4000/sitemap.xml --sitemap-exclude '/*.pdf|next|together/'", "prettier:scss": "npx prettier --write './css/**/*.scss'", "prettier:md": "npx prettier --write './**/*.md'", - "prettier": "npm run prettier:md && npm run prettier:scss", + "prettier": "npm run prettier:md && npm run prettier:scss" }, "devDependencies": { "@18f/identity-stylelint-config": "^2.0.0", From d4d83d1449e1bdfc46d46874056ea3d5e24dbaa8 Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:26:16 -0500 Subject: [PATCH 5/9] cb: stop ignoring md files. --- .prettierignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.prettierignore b/.prettierignore index 670d8ffbe9..caa9862deb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -18,5 +18,4 @@ Gemfile.lock .gitkeep *.csv *.html -*.md *.min.js \ No newline at end of file From e8d8afaca29353a1988ee3964e28fdf5c2591bc8 Mon Sep 17 00:00:00 2001 From: James Mejia Date: Tue, 7 Jan 2025 09:36:30 -0600 Subject: [PATCH 6/9] Add linting and formatting job to workflow --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a06432d853..485540d495 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,14 +100,15 @@ jobs: lint_and_format: executor: my-executor parallelism: 2 + name: Lint and format steps: - checkout - attach_workspace: at: ~/project - - run: + - run: name: lint command: npm run lint - - run: + - run: name: format command: npm run prettier:md test_a11y_desktop: @@ -151,6 +152,7 @@ workflows: - test_build: requires: - build + - lint_and_format - test_a11y_desktop: requires: - build From 92cb7c93c6ad09b8faf5bf5828bc172616847e4f Mon Sep 17 00:00:00 2001 From: James Mejia Date: Tue, 7 Jan 2025 09:38:39 -0600 Subject: [PATCH 7/9] Move linting and formatting in workflow Doesn't require a build --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 485540d495..4cc0b222ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -143,6 +143,7 @@ jobs: workflows: circle-uswds-site: jobs: + - lint_and_format - install_ruby_deps - install_node_deps - build: @@ -152,7 +153,6 @@ workflows: - test_build: requires: - build - - lint_and_format - test_a11y_desktop: requires: - build From 6c6ff757d254d91363aa8065d1ba9bd52dd7a961 Mon Sep 17 00:00:00 2001 From: James Mejia Date: Tue, 7 Jan 2025 09:40:24 -0600 Subject: [PATCH 8/9] Move erroneous job name --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4cc0b222ea..fe6bdeaf48 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,7 +100,6 @@ jobs: lint_and_format: executor: my-executor parallelism: 2 - name: Lint and format steps: - checkout - attach_workspace: @@ -143,7 +142,8 @@ jobs: workflows: circle-uswds-site: jobs: - - lint_and_format + - lint_and_format: + name: Lint and format - install_ruby_deps - install_node_deps - build: From 782ac1705b49af9579cbf2067a6cae0f1773db94 Mon Sep 17 00:00:00 2001 From: cathybaptista <161740096+cathybaptista@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:48:12 -0500 Subject: [PATCH 9/9] cb: _uswds-theme-custom-styles.css prettier --- css/_uswds-theme-custom-styles.scss | 3 --- 1 file changed, 3 deletions(-) diff --git a/css/_uswds-theme-custom-styles.scss b/css/_uswds-theme-custom-styles.scss index 6ef34f8e9e..297626741b 100644 --- a/css/_uswds-theme-custom-styles.scss +++ b/css/_uswds-theme-custom-styles.scss @@ -9,7 +9,6 @@ @import "custom-styles/graphic-list"; @import "custom-styles/posts"; - // ======================================== // CUSTOM PROJECT SASS // ---------------------------------------- @@ -1570,8 +1569,6 @@ iframe { margin-bottom: units(4); } - - // Utilities CSS --------------------- // .page-content {