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

Apply TypeScript rules to additional file types #838

Merged
merged 1 commit into from
Apr 5, 2023
Merged

Apply TypeScript rules to additional file types #838

merged 1 commit into from
Apr 5, 2023

Conversation

jose-elias-alvarez
Copy link
Contributor

Currently, TypeScript-specific rules in the typescript config apply to .ts files but not .tsx files. This PR simply adds the .tsx extension to the files array.

@bmish
Copy link
Collaborator

bmish commented Jan 26, 2023

There's a place we need to do this in base.js too.

@bmish
Copy link
Collaborator

bmish commented Jan 26, 2023

Let's add .mts and .cts extensions while we're here.

https://www.typescriptlang.org/docs/handbook/esm-node.html#new-file-extensions

@bmish bmish added the breaking Breaking changes for major releases label Jan 26, 2023
@jose-elias-alvarez jose-elias-alvarez changed the title feat: apply TypeScript rules to .tsx files feat!: apply TypeScript rules to additional filetypes Jan 26, 2023
@jose-elias-alvarez
Copy link
Contributor Author

Thanks for the quick review! Updated the list of filetypes in the base and typescript configs and also updated the PR title.

@bmish
Copy link
Collaborator

bmish commented Jan 26, 2023

Can you also add the new extensions to:

  • lib/rules/no-missing-tests.js
  • lib/utils/is-test-file.js
  • tests/lib/utils/is-test-file.js

@bmish
Copy link
Collaborator

bmish commented Jan 26, 2023

I would consider this a breaking change. What's your level of urgency with getting this out?

@jose-elias-alvarez
Copy link
Contributor Author

Can you also add the new extensions to:

  • lib/rules/no-missing-tests.js
  • lib/utils/is-test-file.js
  • tests/lib/utils/is-test-file.js

Updated!

I would consider this a breaking change. What's your level of urgency with getting this out?

I agree that this could be considered a breaking change, since it's likely to trigger linting errors in files that didn't have them before. No specific urgency from our end - the motivation came from a project with custom configs extending the Square configs, so it's not too hard for us to do this on our end for now.

Copy link
Collaborator

@bmish bmish left a comment

Choose a reason for hiding this comment

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

Thanks!

@bmish bmish changed the title feat!: apply TypeScript rules to additional filetypes Apply TypeScript rules to additional file types Apr 5, 2023
@bmish bmish merged commit f9f0912 into square:master Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking changes for major releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants