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

Strictly define Node API #374

Merged
merged 1 commit into from
Jun 27, 2023
Merged

Conversation

bmish
Copy link
Collaborator

@bmish bmish commented Jun 27, 2023

Part of #222.

This follows the lead of ESLint core and other ESLint plugins in strictly defining their Node API so that users cannot reach in and import/depend on arbitrary files inside the plugin.

  • https://eslint.org/docs/latest/user-guide/migrating-to-8.0.0#remove-lib

    Beginning in v8.0.0, ESLint is strictly defining its public API. Previously, you could reach into individual files such as require("eslint/lib/rules/semi") and this is no longer allowed. There are a limited number of existing APIs that are now available through the /use-at-your-own-risk entrypoint for backwards compatibility, but these APIs are not formally supported and may break or disappear at any point in time.

https://nodejs.org/api/packages.html#main-entry-point-export

If anyone needs something that is no longer accessible, please file an issue to let us know and we can consider whether it's something that should be explicitly exported.

Related example: ember-cli/eslint-plugin-ember#1514

@bmish bmish added the breaking label Jun 27, 2023
@bmish bmish mentioned this pull request Jun 27, 2023
@coveralls
Copy link

Coverage Status

coverage: 100.0%. remained the same when pulling 9a5aee8 on bmish:strict-node-api into b68511a on platinumazure:master.

@platinumazure platinumazure merged commit 391647e into platinumazure:master Jun 27, 2023
11 checks passed
bmish added a commit to bmish/eslint-plugin-qunit that referenced this pull request Jun 28, 2023
* master: (31 commits)
  chore: use ecmaVersion latest for eslint (platinumazure#379)
  chore: use node protocol for imports (platinumazure#378)
  upgrade: Upgrade dependencies in preparation for major release (platinumazure#377)
  feat!: Require eslint@^8.38, drop support for eslint@7.x (platinumazure#376)
  feat!: change require-expect rule default option to never-except-zero (platinumazure#375)
  feat!: strictly define node API (platinumazure#374)
  feat!: drop support for Node 12, 14, 17, 19 (platinumazure#373)
  Upgrade: Bump semver from 7.5.0 to 7.5.3 (platinumazure#372)
  Upgrade: Bump @typescript-eslint/parser from 5.59.0 to 5.60.0 (platinumazure#371)
  Upgrade: Bump release-it from 15.10.1 to 15.11.0 (platinumazure#366)
  Upgrade: Bump markdownlint-cli from 0.33.0 to 0.35.0 (platinumazure#370)
  Upgrade: Bump all-contributors-cli from 6.24.0 to 6.26.0 (platinumazure#359)
  Upgrade: Bump eslint-plugin-eslint-plugin from 5.0.8 to 5.1.0 (platinumazure#357)
  Upgrade: Bump vm2 from 3.9.17 to 3.9.19 (platinumazure#355)
  Upgrade: Bump eslint from 8.38.0 to 8.39.0 (platinumazure#342)
  Upgrade: Bump vm2 from 3.9.16 to 3.9.17 (platinumazure#341)
  Upgrade: Bump @typescript-eslint/parser from 5.54.1 to 5.59.0 (platinumazure#340)
  Upgrade: Bump eslint from 8.36.0 to 8.38.0 (platinumazure#335)
  Upgrade: Bump semver from 7.3.8 to 7.5.0 (platinumazure#339)
  Upgrade: Bump vm2 from 3.9.11 to 3.9.16 (platinumazure#336)
  ...
bmish added a commit to bmish/eslint-plugin-qunit that referenced this pull request Jun 28, 2023
* master: (31 commits)
  chore: use ecmaVersion latest for eslint (platinumazure#379)
  chore: use node protocol for imports (platinumazure#378)
  upgrade: Upgrade dependencies in preparation for major release (platinumazure#377)
  feat!: Require eslint@^8.38, drop support for eslint@7.x (platinumazure#376)
  feat!: change require-expect rule default option to never-except-zero (platinumazure#375)
  feat!: strictly define node API (platinumazure#374)
  feat!: drop support for Node 12, 14, 17, 19 (platinumazure#373)
  Upgrade: Bump semver from 7.5.0 to 7.5.3 (platinumazure#372)
  Upgrade: Bump @typescript-eslint/parser from 5.59.0 to 5.60.0 (platinumazure#371)
  Upgrade: Bump release-it from 15.10.1 to 15.11.0 (platinumazure#366)
  Upgrade: Bump markdownlint-cli from 0.33.0 to 0.35.0 (platinumazure#370)
  Upgrade: Bump all-contributors-cli from 6.24.0 to 6.26.0 (platinumazure#359)
  Upgrade: Bump eslint-plugin-eslint-plugin from 5.0.8 to 5.1.0 (platinumazure#357)
  Upgrade: Bump vm2 from 3.9.17 to 3.9.19 (platinumazure#355)
  Upgrade: Bump eslint from 8.38.0 to 8.39.0 (platinumazure#342)
  Upgrade: Bump vm2 from 3.9.16 to 3.9.17 (platinumazure#341)
  Upgrade: Bump @typescript-eslint/parser from 5.54.1 to 5.59.0 (platinumazure#340)
  Upgrade: Bump eslint from 8.36.0 to 8.38.0 (platinumazure#335)
  Upgrade: Bump semver from 7.3.8 to 7.5.0 (platinumazure#339)
  Upgrade: Bump vm2 from 3.9.11 to 3.9.16 (platinumazure#336)
  ...
bmish added a commit to bmish/eslint-plugin-qunit that referenced this pull request Jun 28, 2023
* master: (31 commits)
  chore: use ecmaVersion latest for eslint (platinumazure#379)
  chore: use node protocol for imports (platinumazure#378)
  upgrade: Upgrade dependencies in preparation for major release (platinumazure#377)
  feat!: Require eslint@^8.38, drop support for eslint@7.x (platinumazure#376)
  feat!: change require-expect rule default option to never-except-zero (platinumazure#375)
  feat!: strictly define node API (platinumazure#374)
  feat!: drop support for Node 12, 14, 17, 19 (platinumazure#373)
  Upgrade: Bump semver from 7.5.0 to 7.5.3 (platinumazure#372)
  Upgrade: Bump @typescript-eslint/parser from 5.59.0 to 5.60.0 (platinumazure#371)
  Upgrade: Bump release-it from 15.10.1 to 15.11.0 (platinumazure#366)
  Upgrade: Bump markdownlint-cli from 0.33.0 to 0.35.0 (platinumazure#370)
  Upgrade: Bump all-contributors-cli from 6.24.0 to 6.26.0 (platinumazure#359)
  Upgrade: Bump eslint-plugin-eslint-plugin from 5.0.8 to 5.1.0 (platinumazure#357)
  Upgrade: Bump vm2 from 3.9.17 to 3.9.19 (platinumazure#355)
  Upgrade: Bump eslint from 8.38.0 to 8.39.0 (platinumazure#342)
  Upgrade: Bump vm2 from 3.9.16 to 3.9.17 (platinumazure#341)
  Upgrade: Bump @typescript-eslint/parser from 5.54.1 to 5.59.0 (platinumazure#340)
  Upgrade: Bump eslint from 8.36.0 to 8.38.0 (platinumazure#335)
  Upgrade: Bump semver from 7.3.8 to 7.5.0 (platinumazure#339)
  Upgrade: Bump vm2 from 3.9.11 to 3.9.16 (platinumazure#336)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants