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

HAAR-1250: update dependencies ready for renovate #45

Closed
wants to merge 3 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
29 changes: 4 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2.1

orbs:
hmpps: ministryofjustice/hmpps@6.2
slack: circleci/slack@4.8.3
hmpps: ministryofjustice/hmpps@7
slack: circleci/slack@4.12.1

parameters:
alerts-slack-channel:
Expand Down Expand Up @@ -55,28 +55,6 @@ jobs:
- dist
- .cache/Cypress

check_outdated:
executor:
name: hmpps/node
tag: << pipeline.parameters.node-version >>
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: install-npm
command: 'npm ci --no-audit'
- run:
name: Check version
command: 'npm --version'
- run:
name: Run check
command: 'npm outdated typescript govuk-frontend'
- slack/notify:
event: fail
channel: << pipeline.parameters.alerts-slack-channel >>
template: basic_fail_1

unit_test:
executor:
name: hmpps/node
Expand Down Expand Up @@ -206,7 +184,8 @@ workflows:
only:
- main
jobs:
- check_outdated:
- hmpps/npm_outdated:
slack_channel: << pipeline.parameters.alerts-slack-channel >>
context:
- hmpps-common-vars
- hmpps/npm_security_audit:
Expand Down
27 changes: 8 additions & 19 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"jest": true
},

"plugins": ["import"],
"plugins": ["import", "no-only-tests"],

"settings": {
"import/parsers": {
Expand Down Expand Up @@ -36,7 +36,6 @@
"@typescript-eslint/no-use-before-define": 0,
"class-methods-use-this": 0,
"no-useless-constructor": 0,
"no-promise-executor-return": 0,
"@typescript-eslint/no-unused-vars": [
1,
{
Expand All @@ -49,11 +48,10 @@
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"semi": false,
"arrowParens": "avoid"
"semi": false
}
]
}
Expand Down Expand Up @@ -84,28 +82,19 @@
"tsx": "never"
}
],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}
],
"comma-dangle": ["error", "always-multiline"],
"import/no-extraneous-dependencies": [
"error",
{ "devDependencies": ["**/*.test.js", "**/*.test.ts", "cypress.config.ts"] }
{ "devDependencies": ["**/*.test.js", "**/*.test.ts", "**/testutils/**", "cypress.config.ts"] }
],
"no-only-tests/no-only-tests": "error",
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"semi": false,
"arrowParens": "avoid"
"semi": false
}
]
}
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
7 changes: 0 additions & 7 deletions assets/sass/application-ie8.sass

This file was deleted.

9 changes: 0 additions & 9 deletions assets/sass/application.sass

This file was deleted.

83 changes: 0 additions & 83 deletions assets/sass/components/_header-bar.scss

This file was deleted.

2 changes: 0 additions & 2 deletions assets/sass/local.sass

This file was deleted.

7 changes: 7 additions & 0 deletions assets/scss/application-ie8.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$govuk-global-styles: true;
$path: "/assets/images/";

@import 'govuk/all-ie8';

@import './components/header-bar';
@import 'assets/scss/local';
11 changes: 11 additions & 0 deletions assets/scss/application.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$govuk-global-styles: true;
$path: "/assets/images/";

$moj-page-width: 1170px;
$govuk-page-width: $moj-page-width;

@import 'govuk/all';
@import 'moj/all';

@import './components/header-bar';
@import 'assets/scss/local';
File renamed without changes.
141 changes: 141 additions & 0 deletions assets/scss/components/_header-bar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
.hmpps-header {
@include govuk-responsive-padding(3, 'top');
@include govuk-responsive-padding(3, 'bottom');
background-color: govuk-colour('black');

&__container {
@include govuk-width-container;
display: flex;
justify-content: space-between;
align-items: center;
}

&__logo {
@include govuk-responsive-margin(2, 'right');
position: relative;
top: -2px;
fill: govuk-colour('white');
}

&__title {
@include govuk-responsive-padding(3, 'right');
display: flex;
align-items: center;

&__organisation-name {
@include govuk-responsive-margin(2, 'right');
@include govuk-font($size: 24, $weight: 'bold');
display: flex;
align-items: center;
}

&__service-name {
display: none;
@include govuk-font(24);

@include govuk-media-query($from: desktop) {
display: inline-block;
}
}
}

&__link {
@include govuk-link-common;
@include govuk-link-style-default;

&:link,
&:visited,
&:active {
color: govuk-colour('white');
text-decoration: none;
}

&:hover {
text-decoration: underline;
}

&:focus {
color: govuk-colour('black');

svg {
fill: govuk-colour('black');
}
}

&__sub-text {
@include govuk-font(16);
display: none;

@include govuk-media-query($from: tablet) {
display: block;
}
}
}

&__navigation {
display: flex;
flex-direction: column;
align-items: flex-end;
list-style: none;
margin: 0;
padding: 0;

@include govuk-media-query($from: tablet) {
flex-direction: row;
align-items: center;
}

&__item {
@include govuk-font(19);
margin-bottom: govuk-spacing(1);
text-align: right;

@include govuk-media-query($from: tablet) {
@include govuk-responsive-margin(4, 'right');
@include govuk-responsive-padding(4, 'right');
margin-bottom: 0;
border-right: 1px solid govuk-colour('white');
}

a {
display: inline-block;
}

&:last-child {
margin-right: 0;
border-right: 0;
padding-right: 0;
}
}
}

@media print {
display: none;
}
}

.location-bar {
@include govuk-width-container;
@include govuk-responsive-margin(3, 'bottom');
@include govuk-responsive-padding(3, 'top');
@include govuk-responsive-padding(3, 'bottom');
width: 100%;
display: flex;
flex-wrap: wrap;
border-bottom: 1px solid $govuk-border-colour;

&__location {
@include govuk-font($size: 19, $weight: 'bold');
@include govuk-responsive-margin(3, 'right');
}

&__link {
@include govuk-link-common;
@include govuk-link-style-default;
@include govuk-font($size: 19, $weight: 'normal');
}

@media print {
display: none;
}
}
3 changes: 3 additions & 0 deletions assets/scss/local.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.govuk-main-wrapper {
min-height: 600px;
}
3 changes: 2 additions & 1 deletion audit-ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"low": true,
"package-manager": "auto",
"registry": "https://registry.npmjs.org"
"registry": "https://registry.npmjs.org",
"allowlist": ["GHSA-9c47-m6qq-7p4h"]
}
Loading