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

Only validate CSV headers when CSV has headers #1014

Merged
merged 1 commit into from
May 16, 2024

Conversation

miles-grant-ibigroup
Copy link
Contributor

Checklist

  • Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing
  • The description lists all relevant PRs included in this release (remove this if not merging to master)
  • e2e tests are all passing (remove this if not merging to master)

Description

CSV Headers are not present when appending. We should not validate them as such.

Copy link
Contributor

@amy-corson-ibigroup amy-corson-ibigroup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good rule of thumb when validating CSV headers

Copy link

@josh-willis-arcadis josh-willis-arcadis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ES Lint rules do not apply then all looks good to me.

@@ -34,9 +35,11 @@ const CustomCSVForm = (props: Props) => {
} = props

useEffect(() => {
// Default to true
const validateHeaders = props.validateHeaders !== undefined ? props.validateHeaders : true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do ES Lint rules apply to this repo? I know there are rules for a multiline ternary.

Copy link
Contributor Author

@miles-grant-ibigroup miles-grant-ibigroup May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do ES Lint rules apply to this repo? I know there are rules for a multiline ternary.

Datatools has its own eslint config, supplied by mastarm

@miles-grant-ibigroup miles-grant-ibigroup merged commit ae16265 into dev May 16, 2024
5 checks passed
@miles-grant-ibigroup miles-grant-ibigroup deleted the append-transform-fixes branch May 16, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants