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

[New] support ES2022 "Arbitrary module namespace identifier names" #2358

Merged
merged 10 commits into from
Jan 23, 2022

Conversation

sosukesuzuki
Copy link
Contributor

This is still WIP.

Fixes #2355

@ljharb
Copy link
Member

ljharb commented Jan 18, 2022

Thanks, this looks great so far, and <3 for the atomically distinct commits.

@sosukesuzuki sosukesuzuki force-pushed the module-string-names branch 2 times, most recently from 68ca7f0 to fff8786 Compare January 22, 2022 03:22
@sosukesuzuki sosukesuzuki changed the title Support "Arbitrary module namespace identifier names" [New] support ES2022 "Arbitrary module namespace identifier names" Jan 22, 2022
@sosukesuzuki sosukesuzuki marked this pull request as ready for review January 22, 2022 03:38
@sosukesuzuki
Copy link
Contributor Author

This is now ready for review!

@codecov
Copy link

codecov bot commented Jan 22, 2022

Codecov Report

Merging #2358 (fff8786) into main (1cb0dc7) will increase coverage by 0.15%.
The diff coverage is 100.00%.

❗ Current head fff8786 differs from pull request most recent head 1becbb1. Consider uploading reports for the commit 1becbb1 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2358      +/-   ##
==========================================
+ Coverage   94.84%   94.99%   +0.15%     
==========================================
  Files          66       66              
  Lines        2697     2699       +2     
  Branches      892      900       +8     
==========================================
+ Hits         2558     2564       +6     
+ Misses        139      135       -4     
Impacted Files Coverage Δ
src/ExportMap.js 100.00% <ø> (ø)
src/rules/export.js 100.00% <100.00%> (ø)
src/rules/named.js 85.18% <100.00%> (+0.27%) ⬆️
src/rules/namespace.js 96.00% <100.00%> (ø)
src/rules/no-default-export.js 90.90% <100.00%> (ø)
src/rules/no-named-default.js 100.00% <100.00%> (ø)
src/rules/no-named-export.js 88.88% <100.00%> (ø)
src/rules/no-unused-modules.js 97.43% <100.00%> (ø)
src/rules/prefer-default-export.js 100.00% <100.00%> (ø)
utils/parse.js 98.14% <0.00%> (+7.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1cb0dc7...1becbb1. Read the comment docs.

@ljharb ljharb force-pushed the module-string-names branch 2 times, most recently from 4e93a84 to 1becbb1 Compare January 22, 2022 21:42
@ljharb ljharb merged commit 1becbb1 into import-js:main Jan 23, 2022
@sosukesuzuki sosukesuzuki deleted the module-string-names branch January 24, 2022 01:53
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Apr 9, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) | devDependencies | minor | [`2.25.4` -> `2.26.0`](https://renovatebot.com/diffs/npm/eslint-plugin-import/2.25.4/2.26.0) |

---

### Release Notes

<details>
<summary>import-js/eslint-plugin-import</summary>

### [`v2.26.0`](https://github.com/import-js/eslint-plugin-import/blob/HEAD/CHANGELOG.md#&#8203;2260---2022-04-05)

[Compare Source](import-js/eslint-plugin-import@v2.25.4...v2.26.0)

##### Added

-   \[`no-named-default`, `no-default-export`, `prefer-default-export`, `no-named-export`, `export`, `named`, `namespace`, `no-unused-modules`]: support arbitrary module namespace names (\[[#&#8203;2358](import-js/eslint-plugin-import#2358)], thanks \[[@&#8203;sosukesuzuki](https://github.com/sosukesuzuki)])
-   \[`no-dynamic-require`]: support dynamic import with espree (\[[#&#8203;2371](import-js/eslint-plugin-import#2371)], thanks \[[@&#8203;sosukesuzuki](https://github.com/sosukesuzuki)])
-   \[`no-relative-packages`]: add fixer (\[[#&#8203;2381](import-js/eslint-plugin-import#2381)], thanks \[[@&#8203;forivall](https://github.com/forivall)])

##### Fixed

-   \[`default`]: `typescript-eslint-parser`: avoid a crash on exporting as namespace (thanks \[[@&#8203;ljharb](https://github.com/ljharb)])
-   \[`export`]/TypeScript: false positive for typescript namespace merging (\[[#&#8203;1964](import-js/eslint-plugin-import#1964)], thanks \[[@&#8203;magarcia](https://github.com/magarcia)])
-   \[`no-duplicates`]: ignore duplicate modules in different TypeScript module declarations (\[[#&#8203;2378](import-js/eslint-plugin-import#2378)], thanks \[[@&#8203;remcohaszing](https://github.com/remcohaszing)])
-   \[`no-unused-modules`]: avoid a crash when processing re-exports (\[[#&#8203;2388](import-js/eslint-plugin-import#2388)], thanks \[[@&#8203;ljharb](https://github.com/ljharb)])

##### Changed

-   \[Tests] `no-nodejs-modules`: add tests for node protocol URL (\[[#&#8203;2367](import-js/eslint-plugin-import#2367)], thanks \[[@&#8203;sosukesuzuki](https://github.com/sosukesuzuki)])
-   \[Tests] `default`, `no-anonymous-default-export`, `no-mutable-exports`, `no-named-as-default-member`, `no-named-as-default`: add tests for arbitrary module namespace names (\[[#&#8203;2358](import-js/eslint-plugin-import#2358)], thanks \[[@&#8203;sosukesuzuki](https://github.com/sosukesuzuki)])
-   \[Docs] \[`no-unresolved`]: Fix RegExp escaping in readme (\[[#&#8203;2332](import-js/eslint-plugin-import#2332)], thanks \[[@&#8203;stephtr](https://github.com/stephtr)])
-   \[Refactor] `namespace`: try to improve performance (\[[#&#8203;2340](import-js/eslint-plugin-import#2340)], thanks \[[@&#8203;ljharb](https://github.com/ljharb)])
-   \[Docs] make rule doc titles consistent (\[[#&#8203;2393](import-js/eslint-plugin-import#2393)], thanks \[[@&#8203;TheJaredWilcurt](https://github.com/TheJaredWilcurt)])
-   \[Docs] `order`: TS code examples should use TS code blocks (\[[#&#8203;2411](import-js/eslint-plugin-import#2411)], thanks \[[@&#8203;MM25Zamanian](https://github.com/MM25Zamanian)])
-   \[Docs] `no-unresolved`: fix link (\[[#&#8203;2417](import-js/eslint-plugin-import#2417)], thanks \[[@&#8203;kylemh](https://github.com/kylemh)])

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1284
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support "Arbitrary module namespace identifier names"
2 participants