From 3bbb194189ab72c3ed7e4dcc13cdd9cf98be177b Mon Sep 17 00:00:00 2001 From: Samuel Roldan Date: Sun, 28 Jul 2024 16:34:49 -0400 Subject: [PATCH 1/3] docs: Add 2024-07-25 meeting notes --- notes/2024/2024-07-25.md | 88 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 notes/2024/2024-07-25.md diff --git a/notes/2024/2024-07-25.md b/notes/2024/2024-07-25.md new file mode 100644 index 0000000..eabc6d3 --- /dev/null +++ b/notes/2024/2024-07-25.md @@ -0,0 +1,88 @@ +# 2024-07-25 ESLint TSC Meeting Notes + +## Transcript + +[`2024-07-25-transcript.md`](2024-07-25-transcript.md) + +## Attending + +- Nicholas C. Zakas (@nzakas) - TSC +- Milos Djermanovic (@mdjermanovic) - TSC +- Francesco Trotta (@fasttime) - TSC + +@nzakas moderated, and @sam3k took notes. + +## Topics + +### Statuses + +* **@nzakas:** has been working on `@eslint/json`, `@eslint/markdown`, the new config loading RFC, and started work on the core rewrite RFC (but that will take a while). + +* **@mdjermanovic:** finished `eslint-plugin-react` support for ESLint v9, and was mostly reviewing PRs. + +* **@fasttime:** finished updating `@types/eslint` to v9 and I've been also mostly busy reviewing issues and PRs. + + +### [feat: merge `rule.meta.defaultOptions` before validation](https://github.com/eslint/eslintrc/pull/166) + +The Code Inspector code has been pushed to GitHub and we have a dev version running. There are definitely some rough edges still to sand down. + +**Action Items:** @fasttime will do a review as well + +### [Change Request: Better support migrating JS config files](https://github.com/eslint/rewrite/issues/64) + +**Action Items:** @fasttime will look into this after looking at the Code Inspector PR. + +### [feat!: Look Up Config Files From Linted File](https://github.com/eslint/rfcs/pull/120) + +Regarding [this comment](https://github.com/eslint/rfcs/pull/120#issuecomment-2251117016) by @mdjermanovic: + +> I agree with option 2 as presented in [#120 (comment)](https://github.com/eslint/rfcs/pull/120#issuecomment-2221153450): with that setup, `eslint` should not traverse into `subir`. But, with the same setup, I'm still not sure if `eslint subdir`, and especially `eslint subdir/foo.js` should result in files being ignored (as in the FAQ of this RFC document). + +Meeting thread: + +> @nzakas: I think the distinction you're making is between explicitly passing the directory/file vs. having it match a pattern, correct? + +> @mdjermanovic: Mostly, but it could be with patterns too. `eslintrc`, I believe, starts looking for config files from the pattern "root" (that's part of the pattern that represents a literal path, what `glob-parent` returns). I think ignoring files/directories is the only open question, everything else is pretty clear, so my suggestion is to leave that part of the design for discussing on the implementation + +> @nzakas: If we agree that `eslint .` should ignore `subdir`, then that means we need to honor `./eslint.config.js`. And if we honor it, then it seems like we should honor it 100% of the time. The bottom line is that in `eslintrc`, you always get the same result regardless of how you pass the file path on the command line, and I think flat config should do the same. So if `eslint .` ignores `subdir` then so should `eslint subdir` and `eslint subdir/foo.js`. If `eslint .` does not ignore `subdir` then the same should go for `eslint subdir` and `eslint subdir/foo.js`. I don't think mixing and matching makes any sense + +> @mdjermanovic: in this [stackblitz](https://discord.com/channels/688543509199716507/688545247843713092/1266133982689628303) example `eslint .` doesn't go into `subdir` because of the ignorePattern in the cwd config file, but `eslint subdir` and `eslint subdir/file.js` do lint the file. + +> @nzakas: Right, because the lookup behavior is different. It's not a direct map to the new config loader. In eslintrc, the lookup always starts from the file, but that's not true with this RFC. So in eslintrc, `root: true` cuts off the lookup. In this RFC, the lookup first starts from the directory. + +> @mdjermanovic: we could make it different (as proposed in the RFC) and see the feedback during the experimental phase, since it will be behind a feature flag + +> @nzakas: Just to be clear, by as proposed in the RFC, you mean that the subdirectory is always ignored regardless of how it's passed? + +> @mdjermanovic: Yes, except I believe when you run ESLint from that subdirectory. In that case, it won't go up to look for more config files? + +> @fasttime: I think we should ignore `subdir` when someone runs `eslint .`, but without a root directory, I don't see how we can enforce the same behavior regardless of the current directory where eslint is run from. + +> @nzakas: It's really not about a root directory at all. It's about how far up the directory ancestry we are searching for config files. + +**Options Explored:** + +* Option 1: `eslint .` checks all the subtree (Problematic for performance reasons) + +* Option 2: search all the way up the directory tree for the last (uppermost) `eslint.config.js` that is found. (That's eslintrc all over again) + +**Resolution:** we've tabled this for now. + +**Action Items:** @nzakas will think about it more and update the RFC. + +### RFC Duty Schedule + +* Next week: @fasttime +* August 5: @nzakas +* August 12: @fasttime +* August 19: @nzakas + +### Scheduled release for July 26th, 2024 + +**Action Items:** + +- @fasttime will release the following: + + - `eslint` + - `@eslint/js` \ No newline at end of file From 239bc942067d3d6cc90e163bcc25c7f1cc6158e9 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Thu, 8 Aug 2024 16:01:54 -0400 Subject: [PATCH 2/3] Update notes/2024/2024-07-25.md Co-authored-by: Francesco Trotta --- notes/2024/2024-07-25.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/2024/2024-07-25.md b/notes/2024/2024-07-25.md index eabc6d3..63ac53b 100644 --- a/notes/2024/2024-07-25.md +++ b/notes/2024/2024-07-25.md @@ -20,7 +20,7 @@ * **@mdjermanovic:** finished `eslint-plugin-react` support for ESLint v9, and was mostly reviewing PRs. -* **@fasttime:** finished updating `@types/eslint` to v9 and I've been also mostly busy reviewing issues and PRs. +* **@fasttime:** finished updating `@types/eslint` to v9 and has been also mostly busy reviewing issues and PRs. ### [feat: merge `rule.meta.defaultOptions` before validation](https://github.com/eslint/eslintrc/pull/166) From ccc6b67cd2d1f72d6632985fafcf58622b2638b6 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Thu, 8 Aug 2024 16:02:01 -0400 Subject: [PATCH 3/3] Update notes/2024/2024-07-25.md Co-authored-by: Francesco Trotta --- notes/2024/2024-07-25.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/2024/2024-07-25.md b/notes/2024/2024-07-25.md index 63ac53b..2985fbf 100644 --- a/notes/2024/2024-07-25.md +++ b/notes/2024/2024-07-25.md @@ -47,7 +47,7 @@ Meeting thread: > @nzakas: If we agree that `eslint .` should ignore `subdir`, then that means we need to honor `./eslint.config.js`. And if we honor it, then it seems like we should honor it 100% of the time. The bottom line is that in `eslintrc`, you always get the same result regardless of how you pass the file path on the command line, and I think flat config should do the same. So if `eslint .` ignores `subdir` then so should `eslint subdir` and `eslint subdir/foo.js`. If `eslint .` does not ignore `subdir` then the same should go for `eslint subdir` and `eslint subdir/foo.js`. I don't think mixing and matching makes any sense -> @mdjermanovic: in this [stackblitz](https://discord.com/channels/688543509199716507/688545247843713092/1266133982689628303) example `eslint .` doesn't go into `subdir` because of the ignorePattern in the cwd config file, but `eslint subdir` and `eslint subdir/file.js` do lint the file. +> @mdjermanovic: in this [stackblitz](https://stackblitz.com/edit/stackblitz-starters-wjz9em?file=.eslintrc.json,package.json,subdir%2F.eslintrc.json) example `eslint .` doesn't go into `subdir` because of the ignorePattern in the cwd config file, but `eslint subdir` and `eslint subdir/file.js` do lint the file. > @nzakas: Right, because the lookup behavior is different. It's not a direct map to the new config loader. In eslintrc, the lookup always starts from the file, but that's not true with this RFC. So in eslintrc, `root: true` cuts off the lookup. In this RFC, the lookup first starts from the directory.