-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add (optional) type declaration checks in app, src #3104
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 15, 2022
colinrotherham
force-pushed
the
lint-types
branch
from
December 15, 2022 08:53
76b1179
to
da19f3e
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 15, 2022 11:21
Inactive
colinrotherham
force-pushed
the
fix-types
branch
from
December 15, 2022 17:33
a9512f8
to
d02e9b3
Compare
colinrotherham
force-pushed
the
lint-types
branch
from
December 15, 2022 17:33
da19f3e
to
6c377bb
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 15, 2022 17:34
Inactive
colinrotherham
force-pushed
the
fix-types
branch
from
December 15, 2022 18:34
d02e9b3
to
d9a2173
Compare
colinrotherham
force-pushed
the
lint-types
branch
from
December 15, 2022 18:34
6c377bb
to
90114cb
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 15, 2022 18:34
Inactive
colinrotherham
force-pushed
the
lint-types
branch
from
December 15, 2022 18:35
90114cb
to
6f8d945
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 15, 2022 18:36
Inactive
colinrotherham
force-pushed
the
lint-types
branch
from
December 15, 2022 18:41
6f8d945
to
bcfe43a
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 15, 2022 18:41
Inactive
colinrotherham
force-pushed
the
lint-types
branch
from
December 15, 2022 19:02
bcfe43a
to
0e11a56
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 15, 2022 19:02
Inactive
colinrotherham
force-pushed
the
fix-types
branch
from
December 15, 2022 19:16
06f2e40
to
ca358bf
Compare
colinrotherham
force-pushed
the
lint-types
branch
from
December 15, 2022 19:16
0e11a56
to
86d99c0
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 15, 2022 19:16
Inactive
colinrotherham
force-pushed
the
fix-types
branch
from
December 16, 2022 15:37
ca358bf
to
98b8e60
Compare
colinrotherham
force-pushed
the
lint-types
branch
from
December 16, 2022 15:37
86d99c0
to
22b8428
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
December 16, 2022 15:37
Inactive
colinrotherham
force-pushed
the
lint-types
branch
from
February 17, 2023 16:53
e5f81e5
to
64b67c3
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
February 17, 2023 16:53
Inactive
colinrotherham
force-pushed
the
lint-types
branch
from
February 17, 2023 17:06
64b67c3
to
3ec82c4
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
February 17, 2023 17:06
Inactive
colinrotherham
force-pushed
the
lint-types
branch
from
February 21, 2023 15:42
3ec82c4
to
046f237
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
February 21, 2023 15:42
Inactive
colinrotherham
force-pushed
the
lint-types
branch
from
February 21, 2023 17:09
046f237
to
79456d1
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
February 21, 2023 17:09
Inactive
colinrotherham
changed the title
Add optional type declaration checks
Add (optional) type declaration checks
Feb 21, 2023
@romaricpascal I've moved the "mandatory" bits to: |
This will let TypeScript infer the element types returned by `querySelector` and `querySelectorAll` from the CSS selector. More info: https://github.com/g-plane/typed-query-selector\#readme
Our vendor directory includes code copied from: 1. https://polyfill.io web service 2. https://www.npmjs.com/package/polyfill-library 3. https://developer.mozilla.org Feature detection doesn’t necessarily follow completed browser API specifications so we’ll ignore it all as “known working”
The webpack plugin `clean-webpack-plugin` uses incompatible types for its dependant glob and minimatch versions Removing it as we already set `{ clean: true }` in the webpack config
…of type 'Element'” We’d missed an `instanceof HTMLElement` check for config.scope
colinrotherham
force-pushed
the
lint-types
branch
from
February 22, 2023 12:56
79456d1
to
43a0e2f
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-3104
February 22, 2023 12:56
Inactive
romaricpascal
approved these changes
Feb 22, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All ready to go! Thanks so much for your patience with this one for all the reviewing, amends and rebasing to keep it up to date 😄
colinrotherham
changed the title
Add (optional) type declaration checks
Add (optional) type declaration checks in app, src
Apr 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a
tsconfig.json
so the TypeScript compiler can check our code and closes:What does this mean for us?
GitHub Actions
Checks are optional and can be run manually
For example, missing or invalid parameters will be spotted by the compiler:
Related changes
This PR completes work we started for v4.4.0:
To assist with code reviews I've split these changes into:
@params
etc #3103Why TypeScript?
We're not actually writing any TypeScript code but this PR includes it to:
standard
standard-with-typescript
tsc
to check if our code would build without errorsSimilar to source maps, we may want
tsc
to output type declarations in future: