Skip to content

Commit

Permalink
Add Response to the globals list
Browse files Browse the repository at this point in the history
For some reason Response is not being recognised even though it is part of
Javascript (https://caniuse.com/?search=Response). This is possibly due to out
of date dependencies preventing ES6 coding standards being checkd.

It is added to the list of globals to allow `yarn standard` to pass. It may be
possible to remove this after refactoring.
  • Loading branch information
jrmhaig committed Oct 30, 2023
1 parent 1f3813f commit ea44184
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion docs/javascript_restructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,12 @@ npx jasmine-browser-runner serve

and then view the output at http://localhost:8888

In particular, this makes it possible to view the output of `console.log`.
In particular, this makes it possible to view the output of `console.log`.

### Linting

`yarn standard` will complain about the use of `Response` in `app/webpack/javascripts/modules/determination_spec.mjs`
(for example) even though it is part of [ES6.](https://caniuse.com/mdn-api_response_response)
This is due to some dependencies that, it is hoped, will be removed after the
cleanup is completed. `"Response"` is added to the `globals` section of the
`standard` configuration in `package.json`.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,12 @@
"globals": [
"GOVUK",
"moj",
"Stickyfill"
"Stickyfill",
"Response"
],
"ignore": [
"app/webpack/javascripts/vendor/",
"spec/javascripts/helpers/"
]
}
}
}

0 comments on commit ea44184

Please sign in to comment.