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): rename automaticSingleRunInference to disallowAutomaticSingleRunInference#8922
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
Merged
JoshuaKGoldberg merged 12 commits intotypescript-eslint:v8fromJoshuaKGoldberg:single-run-inference-by-defaultApr 26, 2024
Uh oh!
There was an error while loading.Please reload this page.
Merged
feat(typescript-estree): rename automaticSingleRunInference to disallowAutomaticSingleRunInference#8922
Changes fromall commits
Commits
Show all changes
12 commits Select commitHold shift + click to select a range
5124835
feat(typescript-estree): disallowAutomaticSingleRunInference, off (fa…
JoshuaKGoldberg400a6b0
Unnecessary Infinity cache lifetime too
JoshuaKGoldberg0930620
disallowAutomaticSingleRunInference in RuleTester
JoshuaKGoldberg8f398e3
Add more explicit disallowAutomaticSingleRunInference: true,s
JoshuaKGoldberg1ed1c52
Fixed for parse.test.ts
JoshuaKGoldberg2fb418b
Fixed persistentParse.test.ts and semanticInfo.test.ts
JoshuaKGoldberg568489f
disallowAutomaticSingleRunInference in docs.test.ts
JoshuaKGoldbergdd20f36
Reset plugin .shot files
JoshuaKGoldberg52aa2db
Merge branch 'v8'
JoshuaKGoldberg86f1a86
Fix unit tests for Windows
JoshuaKGoldbergfa48c88
lint
JoshuaKGoldbergda356bb
Merge branch 'v8' into single-run-inference-by-default
JoshuaKGoldbergFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
19 changes: 10 additions & 9 deletionsdocs/packages/Parser.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
71 changes: 38 additions & 33 deletionsdocs/packages/TypeScript_ESTree.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletionseslint.config.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionspackages/eslint-plugin/tests/docs.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
17 changes: 10 additions & 7 deletionspackages/rule-tester/src/RuleTester.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionspackages/type-utils/tests/TypeOrValueSpecifier.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionspackages/type-utils/tests/isTypeReadonly.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionspackages/type-utils/tests/isUnsafeAssignment.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletionspackages/typescript-estree/src/parseSettings/inferSingleRun.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
71 changes: 38 additions & 33 deletionspackages/typescript-estree/src/parser-options.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletionspackages/typescript-estree/tests/lib/inferSingleRun.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import path from 'path'; | ||
import { inferSingleRun } from '../../src/parseSettings/inferSingleRun'; | ||
describe('inferSingleRun', () => { | ||
beforeEach(() => { | ||
process.argv = ['node', 'eslint']; | ||
process.env.CI = undefined; | ||
process.env.TSESTREE_SINGLE_RUN = undefined; | ||
}); | ||
it('returns false when options is undefined', () => { | ||
const actual = inferSingleRun(undefined); | ||
expect(actual).toBe(false); | ||
}); | ||
it('returns false when options.project is null', () => { | ||
const actual = inferSingleRun({ project: null }); | ||
expect(actual).toBe(false); | ||
}); | ||
it('returns false when options.program is defined', () => { | ||
const actual = inferSingleRun({ programs: [], project: true }); | ||
expect(actual).toBe(false); | ||
}); | ||
it("returns false when TSESTREE_SINGLE_RUN is 'false'", () => { | ||
process.env.TSESTREE_SINGLE_RUN = 'false'; | ||
const actual = inferSingleRun({ project: true }); | ||
expect(actual).toBe(false); | ||
}); | ||
it("returns true when TSESTREE_SINGLE_RUN is 'true'", () => { | ||
process.env.TSESTREE_SINGLE_RUN = 'true'; | ||
const actual = inferSingleRun({ project: true }); | ||
expect(actual).toBe(true); | ||
}); | ||
it("returns true when CI is 'true'", () => { | ||
process.env.CI = 'true'; | ||
const actual = inferSingleRun({ project: true }); | ||
expect(actual).toBe(true); | ||
}); | ||
it('returns true when run by the ESLint CLI in npm/yarn', () => { | ||
process.argv = ['node', path.normalize('node_modules/.bin/eslint')]; | ||
const actual = inferSingleRun({ project: true }); | ||
expect(actual).toBe(true); | ||
}); | ||
it('returns true when run by the ESLint CLI in pnpm', () => { | ||
process.argv = [ | ||
'node', | ||
path.normalize('node_modules/eslint/bin/eslint.js'), | ||
]; | ||
const actual = inferSingleRun({ project: true }); | ||
expect(actual).toBe(true); | ||
}); | ||
it('returns false when none of the known cases are true', () => { | ||
const actual = inferSingleRun({ project: true }); | ||
expect(actual).toBe(false); | ||
}); | ||
}); |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.