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

test: add regression testing against old TS and ESLint versions in the CI #5573

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

bradzacher
Copy link
Member

PR Checklist

Overview

#5571 shows that we really need to be testing against old TS versions.
This PR adds testing to the CI so that we can at least catch it.

@bradzacher bradzacher added the tests anything to do with testing label Aug 30, 2022
@nx-cloud
Copy link

nx-cloud bot commented Aug 30, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 72527e5. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


🟥 Failed Commands
Node - nx test utils --coverage=false
Node - nx test utils --coverage=false
Node - nx test scope-manager --coverage=false
Node - nx test scope-manager --coverage=false
✅ Successfully ran 64 targets

Sent with 💌 from NxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@netlify
Copy link

netlify bot commented Aug 30, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 72527e5
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/63f3e5e66415b00008a2a581
😎 Deploy Preview https://deploy-preview-5573--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@bradzacher
Copy link
Member Author

The actions are all setup and working just fine, but there is two problems to solve.

  1. Parsing new features in old versions.
    • Old TS parsers will crash on new syntax which will fail our snapshot tests in the scope analyser and parser, and will fail ESLint rule tests.
  2. Extension rules behave differently on old ESLint versions.
    • Some of our extension rules are built directly on top of the core rule's code - this means that their behaviour is dependent on the core rule's behaviour, which means the tests (which are written against the latest version) can break.

We need a way to:

  1. specify a minimum required TS version for a given snapshot.
  2. specify a minimum required TS version for a given ESLint rule test.
  3. specify a minimum required ESLint version for a given ESLint rule test.

PRIMARY_NODE_VERSION: 18
PRIMARY_TYPESCRIPT_VERSION: '~4.8.0'
Copy link
Member Author

Choose a reason for hiding this comment

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

side note that i hate that this is yet another thing for us to remember to keep in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests anything to do with testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add automated regression testing against old TS versions
2 participants