Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat(typescript-estree): add EXPERIMENTAL_useProjectService option to use TypeScript project service#6754
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
feat(typescript-estree): add EXPERIMENTAL_useProjectService option to use TypeScript project service#6754
Changes fromall commits
550465b6ea9f0705f4d991fed323ecd5d3d78f8c4a76acaeba68dece6f6f02ae43145f214fc8da2f71a74ffaffa20d9f826ef8498195462d0db7485b583bb35b9ca22a9aec014ab1b3dbe6cc5d80110c1c326886a5772e2128837a4f52573b1da422814a8ada5180c737d354800ddecdb5d76d4da4566969be30f93d369c7e74202File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -193,6 +193,38 @@ jobs: | ||
| # Sadly 1 day is the minimum | ||
| retention-days: 1 | ||
| unit_tests_tsserver: | ||
| name: Run Unit Tests with Experimental TSServer | ||
| needs: [build] | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| package: | ||
| [ | ||
| 'eslint-plugin', | ||
| 'eslint-plugin-internal', | ||
| 'eslint-plugin-tslint', | ||
| 'typescript-estree', | ||
| ] | ||
| env: | ||
| COLLECT_COVERAGE: false | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 2 | ||
| - name: Install | ||
| uses: ./.github/actions/prepare-install | ||
| with: | ||
| node-version: 18 | ||
| - name: Build | ||
| uses: ./.github/actions/prepare-build | ||
| - name: Run unit tests for ${{ matrix.package }} | ||
| run: npx nx test ${{ matrix.package }} --coverage=false | ||
| env: | ||
| CI: true | ||
| TYPESCRIPT_ESLINT_EXPERIMENTAL_TSSERVER: true | ||
Comment on lines +196 to +226 Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. | ||
| website_tests: | ||
| # The NETLIFY_TOKEN secret will not be available on forks | ||
| if: github.repository_owner == 'typescript-eslint' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import { ESLintUtils } from '@typescript-eslint/utils'; | ||
| import path from 'path'; | ||
| import type { RuleSeverity } from 'tslint'; | ||
| import { Configuration } from 'tslint'; | ||
| @@ -118,7 +119,7 @@ export default createRule<Options, MessageIds>({ | ||
| context, | ||
| [{ rules: tslintRules, rulesDirectory: tslintRulesDirectory, lintFile }], | ||
| ) { | ||
| const fileName =path.resolve(context.getCwd(), context.getFilename()); | ||
MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Explaining: with | ||
| const sourceCode = context.getSourceCode().text; | ||
| const services = ESLintUtils.getParserServices(context); | ||
| const program = services.program; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -16,6 +16,7 @@ const ruleTester = new RuleTester({ | ||
| }); | ||
| const withMetaParserOptions = { | ||
| EXPERIMENTAL_useProjectService: false, | ||
JoshuaKGoldberg marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| tsconfigRootDir: getFixturesRootDir(), | ||
| project: './tsconfig-withmeta.json', | ||
| }; | ||
Uh oh!
There was an error while loading.Please reload this page.
