Skip to content

Commit

Permalink
Merge pull request #203 from HMPO/DD-272-update-dependencies
Browse files Browse the repository at this point in the history
DD-272 Updating dependencies
  • Loading branch information
KLV96 authored Oct 21, 2024
2 parents 93ad17e + 1dc8cc5 commit b2b476b
Show file tree
Hide file tree
Showing 13 changed files with 739 additions and 1,059 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

25 changes: 0 additions & 25 deletions .eslintrc

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ build/Release
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
.idea/

# Users Environment Variables
.lock-wscript
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
56 changes: 56 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
const js = require('@eslint/js');
const globals = require('globals');


const styleRules = {
quotes: ['error', 'single', { avoidEscape: true }],
'no-trailing-spaces': 'error',
indent: 'error',
'linebreak-style': ['error', 'unix'],
semi: ['error', 'always'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'keyword-spacing': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': [
'error',
{ anonymous: 'always', named: 'never' },
],
'no-mixed-spaces-and-tabs': 'error',
'comma-spacing': ['error', { before: false, after: true }],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
};


module.exports = [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.node,
}
},
rules: {
'no-unused-vars': [
'error',
{ argsIgnorePattern: '^(err|req|res|next)$' },
],
'one-var': ['error', { initialized: 'never' }],
'no-var': 'error',
...styleRules,
},
},
// Unit tests
{
files: ['test/**'],
languageOptions: {
globals: {
...globals.mocha,
sinon: 'readonly',
request: 'readonly',
response: 'readonly',
expect: 'readonly'
},
},
},
];
3 changes: 0 additions & 3 deletions example/.eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion example/assets/javascripts/app.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

/* eslint-disable no-undef */
window.GOVUKFrontend.initAll();
Loading

0 comments on commit b2b476b

Please sign in to comment.