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
550465b
6ea9f07
05f4d99
1fed323
ecd5d3d
78f8c4a
76acaeb
a68dece
6f6f02a
e43145f
214fc8d
a2f71a7
4ffaffa
20d9f82
6ef8498
195462d
0db7485
b583bb3
5b9ca22
a9aec01
4ab1b3d
be6cc5d
80110c1
c326886
a5772e2
128837a
4f52573
b1da422
814a8ad
a5180c7
37d3548
00ddecd
b5d76d4
da45669
69be30f
93d369c
7e74202
File 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 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()); | ||
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.