-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Add support for TS config files #18134
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
Merged
Merged
Changes from all commits
Commits
Show all changes
144 commits
Select commit
Hold shift + click to select a range
eac9360
Initial working implementation of TS config files
aryaemami59 3833b5b
Simplify implementation
aryaemami59 840378c
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 150d567
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 f196b6b
Use typescript's `transpile()` instead of `tsx` to avoid side effects
aryaemami59 9b630ea
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 ac08d46
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 c5a8862
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 a016dff
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 00af268
Remove unnecessary nullish coalescing
aryaemami59 5ee0c4c
Use `jiti` instead of TypeScript
aryaemami59 d58270e
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 c69224c
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 421587c
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 5eae061
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 40c77d4
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 e004292
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 7540572
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 0f8dc8a
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 6eb0f88
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 6ccf10f
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 7b00b03
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 c341646
Add missing section related to `importedConfigFileModificationTime`
aryaemami59 8614fd3
Enable `esmResolve` for `jiti`
aryaemami59 8556132
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 5ebf9f9
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 68ab0af
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 1081889
Merge branch 'eslint.config.ts' of https://github.com/aryaemami59/esl…
aryaemami59 e7eb303
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 424ce93
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 ab5ef8f
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 599c6a5
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 dad7b0e
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 2bfe8b5
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 10d147e
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 9f09770
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 360cf38
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 b162744
Make `jiti` an optional peer dependency
aryaemami59 8aca3eb
Throw an error if `jiti` is not installed
aryaemami59 b532667
Add `jiti` to `ignoreDependencies` in `knip.jsonc`
aryaemami59 9248177
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 eee920e
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 5ac3927
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 f339591
Fix broken unit tests caused by stubbed `process.version`
aryaemami59 8fa2ddb
Prioritize JavaScript config files over TypeScript config files
aryaemami59 822baf7
Add some basic tests for loading TS config files
aryaemami59 33f5ee6
Fix minor type issues in JSDocs
aryaemami59 90657fa
Partially Inline the `FlatConfig` type from `@types/eslint` to reuse
aryaemami59 9da10d4
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 4467fb3
Merge branch 'eslint.config.ts' of https://github.com/aryaemami59/esl…
aryaemami59 76c3d28
Stringify `mtime`
aryaemami59 b0e5f96
Check if ESLint is running in Deno or Bun
aryaemami59 209c791
Try a different approach for loading TS config files
aryaemami59 ce4b72b
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 61abc9b
Add tests for `lintFiles` with TS config files
aryaemami59 0b11b0d
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 df7a08d
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 bfa5b0c
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 730e5cb
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 f0edb14
Revert "Try a different approach for loading TS config files"
aryaemami59 8a988ca
Convert `Severity` type to a `const enum`
aryaemami59 3d16b62
Add tests for TS config files containing `const enum`s
aryaemami59 391ff9d
Add `ESLintNameSpace` local `namespace`
aryaemami59 60a66d4
Add tests for TS config files containing importing a local `namespace`
aryaemami59 33f77d0
Fix minor type issues in JSDocs
aryaemami59 0112441
Add tests for passing TS config files to `overrideConfigFile`
aryaemami59 7df58cd
Bump `jiti` to version 1.21.1
aryaemami59 de86b20
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 fe914db
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 6ae6261
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 9cf9076
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 226669e
Bump `jiti` to version 1.21.6
aryaemami59 9b9c6ec
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 328e30f
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 2f9c6fc
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 43c66b7
Add basic docs for loading TypeScript configuration files
aryaemami59 3b05c55
Fix lint issues
aryaemami59 3bcc3a4
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 e4b439f
Bump `jiti` to version 2.0.0-beta.1
aryaemami59 5e424b6
Remove `esmResolve` as it has been removed in v2 of `jiti`
aryaemami59 99dc9e6
Fix types for `createCustomTeardown`
aryaemami59 88c03bf
Remove `interopDefault: true`
aryaemami59 90252b3
Fix type of `eslint` in test file
aryaemami59 f4f36c2
Fix lint issues in test file
aryaemami59 05e2276
Add more tests
aryaemami59 5b27883
Defer to v10 in docs
aryaemami59 3e120f9
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 63fa91b
Bump `jiti` to version 2.0.0-beta.3
aryaemami59 beb9f7a
Fix import of `jiti`
aryaemami59 5ea22c5
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 54abd14
Fix `jiti` link in docs
aryaemami59 82e35a5
Fix `jiti` link in docs
aryaemami59 cf360c5
Add `unstable_ts_config` to `activeFlags`
aryaemami59 f801ddc
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 3f772e5
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 9de006e
Fix issues in `configuration-files.md`
aryaemami59 0e6f45e
Fix `LintResults` in `eslint.js`
aryaemami59 7ca2096
Change `LintResults` to `LintResult` in `eslint.js`
aryaemami59 b7c6a44
Remove warning regarding top-level `await`
aryaemami59 8d121d5
Explicitly check for `.ts`, `.mts` or `.cts` extensions
aryaemami59 9951239
Check if `"unstable_ts_config"` flag is enabled
aryaemami59 8c2094a
Fix import and export assignment tests
aryaemami59 0ea096f
Fix remaining issues in `configuration-files.md`
aryaemami59 f08ec04
Fix test title
aryaemami59 6e2cff0
De-duplicate test
aryaemami59 f369145
Revert "Fix broken unit tests caused by stubbed `process.version`"
aryaemami59 25016fc
Remove unnecessary checks for `"unstable_ts_config"` flag
aryaemami59 2111cf7
Fix type of `findConfigFile`
aryaemami59 f2b07cd
Make sure tests fail when the correct config file is not loaded
aryaemami59 896e08f
Add a test for `"unstable_ts_config"`
aryaemami59 4d45eff
Remove fallback to `default` when loading `jiti.createJiti`
aryaemami59 3daca1c
Update `configuration-files.md`
aryaemami59 9881712
Update description of `"unstable_ts_config"` flag
aryaemami59 479847a
Add comment explaining purpose of `helper.ts`
aryaemami59 60f6a22
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 df1e6d9
Disable `moduleCache`
aryaemami59 c16eb7c
Add test to check reloading logic for TS config files
aryaemami59 0277242
Add comment for disabling `moduleCache`
aryaemami59 89f3b07
Rework `hasUnstableTSConfigFlag` logic
aryaemami59 74a6988
Fix unit tests
aryaemami59 f9a4a89
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 79d65e4
Fallback to `default` when loading `jiti`
aryaemami59 166ca0f
Rework logic for loading TS config files
aryaemami59 275dbe1
Remove default value for `hasUnstableTSConfigFlag` parameter
aryaemami59 c560d9e
Remove type assertion
aryaemami59 9a5b2c7
Remove unnecessary `process?.versions?.bun` check
aryaemami59 bd9ce95
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 e26d690
Remove unnecessary `LintResults` type
aryaemami59 62a9007
Fix parameter type of `eslintWithPlugins`
aryaemami59 83a374b
Add tests for loading TypeScript config files that export a promise
aryaemami59 7c25109
Update `jiti` peer dependency to allow any version
aryaemami59 cad6f0a
Warn about using an outdated version of `jiti`
aryaemami59 81e7276
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 c4143e1
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 a54f83c
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 41dc58c
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 e985e83
Fix minor issue in `configuration-files.md`
aryaemami59 bface3f
Add section about `--flag` in `configuration-files.md`
aryaemami59 8cc853d
Reapply "Fix broken unit tests caused by stubbed `process.version`"
aryaemami59 0fd89a0
Switch to `jiti` v1 until `jiti` v2 becomes stable
aryaemami59 8ece0be
Add commented-out unit tests for `jiti` v2
aryaemami59 ef4a619
Merge branch 'main' of https://github.com/eslint/eslint into eslint.c…
aryaemami59 9a80b89
Throw a `TypeError` if `jiti.import` is not a function
aryaemami59 d5a00f9
Change `TypeError` to `Error`
aryaemami59 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.