Skip to content
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

Upgrade: @eslint/eslintrc@1.0.0 #14865

Merged
merged 5 commits into from Aug 14, 2021
Merged

Upgrade: @eslint/eslintrc@1.0.0 #14865

merged 5 commits into from Aug 14, 2021

Conversation

mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Aug 1, 2021

Remaining steps:

  • import environments from the @eslint/eslintrc API.
  • update package.json with the new version of @eslint/eslintrc.

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:

Updates ESLint to use @eslint/eslintrc version with the "exports" field in package.json (eslint/eslintrc#39), presumably in v8.0.0.

What changes did you make? (Give an overview)

  • Updated modules that used deep imports such as require("@eslint/eslintrc/lib/shared/config-ops") to use the Legacy API from the main (and only) entry point.
  • Removed unused functions from in-memory-fs.

Is there anything you'd like reviewers to focus on?

  • Was there a reason we were using require("@eslint/eslintrc/lib/shared/config-ops") and others instead of Legacy?
  • Fixing in-memory-fs would be a bit more complicated and untestable since we're not using it anymore (aside from one function defineInMemoryFs), so I just removed the unused functions.
  • Environments are imported using a "hack" with absolute paths, in order to test other changes. This will be fixed when we update Breaking: Switch to ESM (fixes #35) eslintrc#39. fixed

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Aug 1, 2021
@mdjermanovic mdjermanovic marked this pull request as draft August 1, 2021 21:48
@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion upgrade This change is related to a dependency upgrade and removed triage An ESLint team member will look at this issue soon labels Aug 5, 2021
@mdjermanovic mdjermanovic reopened this Aug 5, 2021
@mdjermanovic
Copy link
Member Author

Browser Test is failing:

ERROR in ./node_modules/resolve-from/index.js 5:15-32
Module not found: Error: Can't resolve 'module' in '/home/runner/work/eslint/eslint/node_modules/resolve-from'
 @ ./node_modules/import-fresh/index.js 5:20-43
 @ ./node_modules/@eslint/eslintrc/dist/eslintrc.cjs 7:18-41
 @ ./lib/linter/linter.js 23:4-31

ERROR in ./node_modules/resolve-from/index.js 7:11-24
Module not found: Error: Can't resolve 'fs' in '/home/runner/work/eslint/eslint/node_modules/resolve-from'
 @ ./node_modules/import-fresh/index.js 5:20-43
 @ ./node_modules/@eslint/eslintrc/dist/eslintrc.cjs 7:18-41
 @ ./lib/linter/linter.js 23:4-31

ERROR in ./node_modules/@eslint/eslintrc/dist/eslintrc.cjs 5:9-22
Module not found: Error: Can't resolve 'fs' in '/home/runner/work/eslint/eslint/node_modules/@eslint/eslintrc/dist'
 @ ./lib/linter/linter.js 23:4-31

ERROR in ./node_modules/@eslint/eslintrc/dist/eslintrc.cjs 11:13-30
Module not found: Error: Can't resolve 'module' in '/home/runner/work/eslint/eslint/node_modules/@eslint/eslintrc/dist'
 @ ./lib/linter/linter.js 23:4-31

webpack compiled with 4 errors

@nzakas
Copy link
Member

nzakas commented Aug 6, 2021

Opened eslint/eslintrc#51

@nzakas
Copy link
Member

nzakas commented Aug 7, 2021

Published @eslint/eslintrc v1.0.0: https://github.com/eslint/eslintrc/releases/tag/v1.0.0

@mdjermanovic mdjermanovic changed the title Upgrade: @eslint/eslintrc with exports field Upgrade: @eslint/eslintrc@1.0.0 Aug 7, 2021
@mdjermanovic mdjermanovic marked this pull request as ready for review August 7, 2021 19:14
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@btmills btmills merged commit ec9db63 into master Aug 14, 2021
@btmills btmills deleted the eslintrc-esm branch August 14, 2021 23:06
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Feb 11, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion upgrade This change is related to a dependency upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants