Skip to content

chore: add editorconfig#7318

Merged
benelan merged 3 commits intomainfrom
benelan/add-editorconfig
Jul 14, 2023
Merged

chore: add editorconfig#7318
benelan merged 3 commits intomainfrom
benelan/add-editorconfig

Conversation

@benelan
Copy link
Copy Markdown
Contributor

@benelan benelan commented Jul 14, 2023

Summary

Adds .editorconfig to ensure people's editors have the same settings as prettier. Prettier will get settings from editorconfig if there is one found. This PR also switches to the new Prettier 3x default of adding trailing commas.

I linted and nothing else changed except for a few cleanups that also changed w/o the editorconfig. I'll make a separate PR for that.

ref: https://prettier.io/docs/en/configuration.html#editorconfig
options: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties

@github-actions github-actions Bot added the chore Issues with changes that don't modify src or test files. label Jul 14, 2023
@benelan benelan added the skip visual snapshots Pull requests that do not need visual regression testing. label Jul 14, 2023
Copy link
Copy Markdown
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

Comment thread .prettierrc.json Outdated
}
]
"$schema": "https://json.schemastore.org/prettierrc",
"trailingComma": "none"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dasa recently commented on this in the API channel.

Prettier 3.0 has come out and they've changed the default for trailing commas to "all". We've been using "none", but if there's no objections, I think this would be a good time to switch to "all". It might look odd to some of us at first, but reduces git diffs. Ref: https://prettier.io/docs/en/options.html#trailing-commas

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Cool, I prefer all too because it makes it easier to add new items to arrays/objects. I'll switch that one off

@benelan benelan merged commit 08d9fd6 into main Jul 14, 2023
@benelan benelan deleted the benelan/add-editorconfig branch July 14, 2023 23:12
@github-actions github-actions Bot added this to the Design Sprint milestone Jul 14, 2023
benelan added a commit that referenced this pull request Jul 14, 2023
**Related Issue:** #7318

## Summary

Lint and format the code. Prettier will now add trailing commas when
possible, which is the default in 3x.

I know already brought up disabling some jsdoc rules in the past, but I
think we can at least disable the ` jsdoc/require-param-type` one. We
are using TypeScript so defining the types twice seems redundant and
likely to get out of sync when things change.
benelan added a commit that referenced this pull request Jul 18, 2023
## Summary

Adds [`.editorconfig`](https://editorconfig.org/#file-format-details) to
ensure people's editors have the same settings as prettier. Prettier
will get settings from editorconfig if there is one found. This PR also
switches to the new Prettier 3x default of adding trailing commas.

I linted and nothing else changed except for a few cleanups that also
changed w/o the editorconfig. I'll make a separate PR for that.

ref: https://prettier.io/docs/en/configuration.html#editorconfig
options:
https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties
benelan added a commit that referenced this pull request Jul 18, 2023
**Related Issue:** #7318

## Summary

Lint and format the code. Prettier will now add trailing commas when
possible, which is the default in 3x.

I know already brought up disabling some jsdoc rules in the past, but I
think we can at least disable the ` jsdoc/require-param-type` one. We
are using TypeScript so defining the types twice seems redundant and
likely to get out of sync when things change.
benelan added a commit that referenced this pull request Jul 18, 2023
…amping-ar-numberingsystem-bug

* origin/main:
  chore(eslint): disable jsdoc/require-param-type rule in favor of typescript (#7326)
  style: lint and format code (#7319)
  chore: add editorconfig (#7318)
  chore: release next
  fix(input-date-picker): provides placeholder text context for AT users (#7320)
  chore: release next
  fix(dropdown-item): provides accessible label when href is not parsed (#7316)
  ci: create more specific codeowners to limit unnecessary notifications (#7313)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Issues with changes that don't modify src or test files. skip visual snapshots Pull requests that do not need visual regression testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants