Skip to content

Commit

Permalink
pull latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
azyzz228 committed Oct 18, 2022
2 parents 180c3b5 + 2e1edd6 commit 53d62d0
Show file tree
Hide file tree
Showing 31 changed files with 1,580 additions and 231 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/node-4+.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Tests: node.js'

on: [pull_request, push]

permissions:
contents: read

jobs:
matrix:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Tests: pretest/posttest'

on: [pull_request, push]

permissions:
contents: read

jobs:
# pretest:
# runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: 'Tests: packages'

on: [pull_request, push]

permissions:
contents: read

jobs:
matrix:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: Automatic Rebase

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
contents: write # for ljharb/rebase to push code to rebase
pull-requests: read # for ljharb/rebase to get info about PR
name: "Automatic Rebase"

runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/require-allow-edits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ name: Require “Allow Edits”

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR
name: "Require “Allow Edits”"

runs-on: ubuntu-latest
Expand Down
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
- [`no-restricted-paths`]: support arrays for `from` and `target` options ([#2466], thanks [@AdriAt360])
- [`no-anonymous-default-export`]: add `allowNew` option ([#2505], thanks [@DamienCassou])
- [`order`]: Add `distinctGroup` option ([#2395], thanks [@hyperupcall])
- [`no-extraneous-dependencies`]: Add `includeInternal` option ([#2541], thanks [@bdwain])
- [`no-extraneous-dependencies`]: Add `includeTypes` option ([#2543], thanks [@bdwain])
- [`order`]: new `alphabetize.orderImportKind` option to sort imports with same path based on their kind (`type`, `typeof`) ([#2544], thanks [@stropho])
- [`consistent-type-specifier-style`]: add rule ([#2473], thanks [@bradzacher])
- Add [`no-empty-named-blocks`] rule ([#2568], thanks [@guilhermelimak])

### Fixed
- [`order`]: move nested imports closer to main import entry ([#2396], thanks [@pri1311])
Expand All @@ -21,6 +26,8 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
- [`order`]: leave more space in rankings for consecutive path groups ([#2506], thanks [@Pearce-Ropion])
- [`no-cycle`]: add ExportNamedDeclaration statements to dependencies ([#2511], thanks [@BenoitZugmeyer])
- [`dynamic-import-chunkname`]: prevent false report on a valid webpack magic comment ([#2330], thanks [@mhmadhamster])
- [`export`]: do not error on TS export overloads ([#1590], thanks [@ljharb])
- [`no-unresolved`], [`extensions`]: ignore type only exports ([#2436], thanks [@Lukas-Kullmann])

### Changed
- [Tests] [`named`]: Run all TypeScript test ([#2427], thanks [@ProdigySim])
Expand All @@ -34,6 +41,10 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
- [Docs] [`no-useless-path-segments`]: fix paths ([#2424], thanks [@s-h-a-d-o-w])
- [Tests] [`no-cycle`]: add passing test cases ([#2438], thanks [@georeith])
- [Tests] [`no-restricted-paths`]: Tests for `import type` statements, thanks [@golergka]
- [Refactor] [`no-extraneous-dependencies`] improve performance using cache ([#2374], thanks [@meowtec])
- [meta] `CONTRIBUTING.md`: mention inactive PRs ([#2546], thanks [@stropho])
- [readme] make json for setting groups multiline ([#2570], thanks [@bertyhell])


## [2.26.0] - 2022-04-05

Expand Down Expand Up @@ -960,6 +971,7 @@ for info on changes for earlier releases.
[`import/external-module-folders` setting]: ./README.md#importexternal-module-folders
[`internal-regex` setting]: ./README.md#importinternal-regex

[`consistent-type-specifier-style`]: ./docs/rules/consistent-type-specifier-style.md
[`default`]: ./docs/rules/default.md
[`dynamic-import-chunkname`]: ./docs/rules/dynamic-import-chunkname.md
[`export`]: ./docs/rules/export.md
Expand All @@ -981,6 +993,7 @@ for info on changes for earlier releases.
[`no-deprecated`]: ./docs/rules/no-deprecated.md
[`no-duplicates`]: ./docs/rules/no-duplicates.md
[`no-dynamic-require`]: ./docs/rules/no-dynamic-require.md
[`no-empty-named-blocks`]: ./docs/rules/no-empty-named-blocks.md
[`no-extraneous-dependencies`]: ./docs/rules/no-extraneous-dependencies.md
[`no-import-module-exports`]: ./docs/rules/no-import-module-exports.md
[`no-internal-modules`]: ./docs/rules/no-internal-modules.md
Expand All @@ -1006,14 +1019,20 @@ for info on changes for earlier releases.

[`memo-parser`]: ./memo-parser/README.md

[#2570]: https://github.com/import-js/eslint-plugin-import/pull/2570
[#2568]: https://github.com/import-js/eslint-plugin-import/pull/2568
[#2546]: https://github.com/import-js/eslint-plugin-import/pull/2546
[#2541]: https://github.com/import-js/eslint-plugin-import/pull/2541
[#2531]: https://github.com/import-js/eslint-plugin-import/pull/2531
[#2511]: https://github.com/import-js/eslint-plugin-import/pull/2511
[#2506]: https://github.com/import-js/eslint-plugin-import/pull/2506
[#2503]: https://github.com/import-js/eslint-plugin-import/pull/2503
[#2490]: https://github.com/import-js/eslint-plugin-import/pull/2490
[#2473]: https://github.com/import-js/eslint-plugin-import/pull/2473
[#2466]: https://github.com/import-js/eslint-plugin-import/pull/2466
[#2440]: https://github.com/import-js/eslint-plugin-import/pull/2440
[#2438]: https://github.com/import-js/eslint-plugin-import/pull/2438
[#2436]: https://github.com/import-js/eslint-plugin-import/pull/2436
[#2427]: https://github.com/import-js/eslint-plugin-import/pull/2427
[#2424]: https://github.com/import-js/eslint-plugin-import/pull/2424
[#2419]: https://github.com/import-js/eslint-plugin-import/pull/2419
Expand All @@ -1027,6 +1046,7 @@ for info on changes for earlier releases.
[#2387]: https://github.com/import-js/eslint-plugin-import/pull/2387
[#2381]: https://github.com/import-js/eslint-plugin-import/pull/2381
[#2378]: https://github.com/import-js/eslint-plugin-import/pull/2378
[#2374]: https://github.com/import-js/eslint-plugin-import/pull/2374
[#2371]: https://github.com/import-js/eslint-plugin-import/pull/2371
[#2367]: https://github.com/import-js/eslint-plugin-import/pull/2367
[#2332]: https://github.com/import-js/eslint-plugin-import/pull/2332
Expand Down Expand Up @@ -1342,6 +1362,7 @@ for info on changes for earlier releases.
[#1631]: https://github.com/import-js/eslint-plugin-import/issues/1631
[#1616]: https://github.com/import-js/eslint-plugin-import/issues/1616
[#1613]: https://github.com/import-js/eslint-plugin-import/issues/1613
[#1590]: https://github.com/import-js/eslint-plugin-import/issues/1590
[#1589]: https://github.com/import-js/eslint-plugin-import/issues/1589
[#1565]: https://github.com/import-js/eslint-plugin-import/issues/1565
[#1366]: https://github.com/import-js/eslint-plugin-import/issues/1366
Expand Down Expand Up @@ -1541,6 +1562,7 @@ for info on changes for earlier releases.
[@benmosher]: https://github.com/benmosher
[@benmunro]: https://github.com/benmunro
[@BenoitZugmeyer]: https://github.com/BenoitZugmeyer
[@bertyhell]: https://github.com/bertyhell
[@bicstone]: https://github.com/bicstone
[@Blasz]: https://github.com/Blasz
[@bmish]: https://github.com/bmish
Expand Down Expand Up @@ -1586,14 +1608,15 @@ for info on changes for earlier releases.
[@futpib]: https://github.com/futpib
[@gajus]: https://github.com/gajus
[@gausie]: https://github.com/gausie
[@georeith]: https://github.com/georeith
[@gavriguy]: https://github.com/gavriguy
[@georeith]: https://github.com/georeith
[@giodamelio]: https://github.com/giodamelio
[@golergka]: https://github.com/golergka
[@golopot]: https://github.com/golopot
[@GoodForOneFare]: https://github.com/GoodForOneFare
[@graingert]: https://github.com/graingert
[@grit96]: https://github.com/grit96
[@guilhermelimak]: https://github.com/guilhermelimak
[@guillaumewuip]: https://github.com/guillaumewuip
[@hayes]: https://github.com/hayes
[@himynameisdave]: https://github.com/himynameisdave
Expand Down Expand Up @@ -1645,6 +1668,7 @@ for info on changes for earlier releases.
[@loganfsmyth]: https://github.com/loganfsmyth
[@luczsoma]: https://github.com/luczsoma
[@ludofischer]: https://github.com/ludofischer
[@Lukas-Kullmann]: https://github.com/Lukas-Kullmann
[@lukeapage]: https://github.com/lukeapage
[@lydell]: https://github.com/lydell
[@magarcia]: https://github.com/magarcia
Expand All @@ -1660,6 +1684,7 @@ for info on changes for earlier releases.
[@Maxim-Mazurok]: https://github.com/Maxim-Mazurok
[@maxkomarychev]: https://github.com/maxkomarychev
[@maxmalov]: https://github.com/maxmalov
[@meowtec]: https://github.com/meowtec
[@mgwalker]: https://github.com/mgwalker
[@mhmadhamster]: https://github.com/MhMadHamster
[@MikeyBeLike]: https://github.com/MikeyBeLike
Expand Down
81 changes: 20 additions & 61 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Contributing

Thanks for your interest in helping out! Here are a **few** _weird_ tricks to
~~cut your mortgage in half~~ maximize the global net efficiency of your efforts!
Thanks for your interest in helping out! Here are a **few** _weird_ tricks to ~~cut your mortgage in half~~ maximize the global net efficiency of your efforts!

## TL;DR: Checklist

Expand All @@ -21,96 +20,56 @@ Remember, you don't need to do it all yourself; any of these are helpful! 😎

### Search open + closed issues for similar cases.

You may find an open issue that closely matches what you are thinking. You
may also find a closed issue with discussion that either solves your problem
or explains why we are unlikely to solve it in the near future.
You may find an open issue that closely matches what you are thinking. You may also find a closed issue with discussion that either solves your problem or explains why we are unlikely to solve it in the near future.

If you find a matching issue that is open, and marked `accepted` and/or `help
wanted`, you might want to [open a PR](#prs).
If you find a matching issue that is open, and marked `accepted` and/or `help wanted`, you might want to [open a PR](#prs).

### Open an issue.

Let's discuss your issue. Could be as simple as unclear documentation or a
wonky config file.
If you're suggesting a feature, it might exist and need better
documentation, or it might be in process. Even given those, some discussion might
be warranted to ensure the enhancement is clear.
Let's discuss your issue. Could be as simple as unclear documentation or a wonky config file.
If you're suggesting a feature, it might exist and need better documentation, or it might be in process. Even given those, some discussion might be warranted to ensure the enhancement is clear.

You're welcome to jump right to a PR, but without a discussion, can't make any
guarantees about merging.
You're welcome to jump right to a PR, but without a discussion, can't make any guarantees about merging.

That said: sometimes seeing the code makes the discussion clearer.😄

This is a helpful contribution all by itself. Thanks!

## PRs

If you would like to implement something, firstly: thanks! Community contributions
are a magical thing. Like Redux or [the flux capacitor](https://youtu.be/SR5BfQ4rEqQ?t=2m25s),
they make open source possible.
If you would like to implement something, firstly: thanks! Community contributions are a magical thing. Like Redux or [the flux capacitor](https://youtu.be/SR5BfQ4rEqQ?t=2m25s), they make open source possible.

**Working on your first Pull Request?**
You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).

Here are some things to keep in mind when working on a PR:

**Trying to update an inactive Pull Request?**
If a PR is open, but unfortunately the author is, for any reason, not available to apply code review fixes or rebase the source branch, then please **do not open a new PR**.
Instead, paste a link to your own branch in the PR, and the maintainers can pull in your changes and update the existing PR in-place.

#### Tests

A PR that is just failing test cases for an existing issue is very helpful, as this
can take as much time (if not more) as it takes to implement a new feature or fix
a bug.
A PR that is just failing test cases for an existing issue is very helpful, as this can take as much time (if not more) as it takes to implement a new feature or fix a bug.

If you only have enough time to write tests, fantastic! Submit away. This is a great
jumping-off point for a core contributor or even another PR to continue what you've started.
If you only have enough time to write tests, fantastic! Submit away. This is a great jumping-off point for a core contributor or even another PR to continue what you've started.

#### Docs

For enhancements to rules, please update the docs in `docs/rules` matching the rule
filename from `src/rules`.
For enhancements to rules, please update the docs in `docs/rules` matching the rule filename from `src/rules`.

Also, take a quick look at the rule summary in [README.md] in case it could use tweaking,
or add a line if you've implemented a new rule.
Also, take a quick look at the rule summary in [README.md] in case it could use tweaking, or add a line if you've implemented a new rule.

Bugfixes may not warrant docs changes, though it's worth skimming the existing
docs to see if there are any relevant caveats that need to be removed.
Bugfixes may not warrant docs changes, though it's worth skimming the existing docs to see if there are any relevant caveats that need to be removed.

#### Changelog

Please add a quick blurb to the [**Unreleased**](./CHANGELOG.md#unreleased) section of the change log. Give yourself
some credit, and please link back to the PR for future reference. This is especially
helpful for resolver changes, as the resolvers are less frequently modified and published.
Please add a quick blurb to the [**Unreleased**](./CHANGELOG.md#unreleased) section of the change log. Give yourself some credit, and please link back to the PR for future reference. This is especially helpful for resolver changes, as the resolvers are less frequently modified and published.

Note also that the change log can't magically link back to Github entities (i.e. PRs,
issues, users) or rules; there are a handful of footnote URL definitions at the bottom.
You may need to add one or more URL if you've square-bracketed any such items.
Note also that the change log can't magically link back to Github entities (i.e. PRs, issues, users) or rules; there are a handful of footnote URL definitions at the bottom. You may need to add one or more URL if you've square-bracketed any such items.

## Code of Conduct

This is not so much a set of guidelines as a reference for what I hope may become
a shared perspective on the project. I hope to write a longer essay to this end
in the future. Comments are welcome, I'd like this to be as clear as possible.

### Empathy

People have feelings and perspectives, and people say and believe things for good reasons.

If you find that you summarily disagree with a perspective stated by someone else,
you likely each have histories that have moved you in opposite directions on a continuum
that probably does not have a "wrong" or "right" end. It may be that you simply
are working toward different goals that require different strategies. Every decision
has pros and cons, and could result in some winners and some losers. It's great to
discuss this so that both are well-known, and realize that even with infinite discussion,
cons and losers will likely never go to zero.

Also note that we're not doing brain surgery here, so while it's fine if we spend some time
understanding each other, cordial disagreement should not be expensive in the
long run, and we can accept that we will get some things wrong before we get them right (if ever!).

If we can all get together behind the common goal of embracing empathy, everything else should be able to work itself out.

#### Attribution

Thanks for help from https://mozillascience.github.io/working-open-workshop/contributing/
for inspiration before I wrote this. --ben
Please familiarize yourself with the [Code of Conduct](https://github.com/import-js/.github/blob/main/CODE_OF_CONDUCT.md).

[README.md]: ./README.md
[README.md]: ./README.md
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, a
* Forbid the use of extraneous packages ([`no-extraneous-dependencies`])
* Forbid the use of mutable exports with `var` or `let`. ([`no-mutable-exports`])
* Report modules without exports, or exports without matching import in another module ([`no-unused-modules`])
* Prevent empty named import blocks ([`no-empty-named-blocks`])

[`export`]: ./docs/rules/export.md
[`no-named-as-default`]: ./docs/rules/no-named-as-default.md
Expand All @@ -63,6 +64,7 @@ This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, a
[`no-extraneous-dependencies`]: ./docs/rules/no-extraneous-dependencies.md
[`no-mutable-exports`]: ./docs/rules/no-mutable-exports.md
[`no-unused-modules`]: ./docs/rules/no-unused-modules.md
[`no-empty-named-blocks`]: ./docs/rules/no-empty-named-blocks.md

### Module systems

Expand Down Expand Up @@ -97,6 +99,7 @@ This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, a
* Forbid anonymous values as default exports ([`no-anonymous-default-export`])
* Prefer named exports to be grouped together in a single export declaration ([`group-exports`])
* Enforce a leading comment with the webpackChunkName for dynamic imports ([`dynamic-import-chunkname`])
* Enforce or ban the use of inline type-only markers for named imports ([`consistent-type-specifier-style`])

[`first`]: ./docs/rules/first.md
[`exports-last`]: ./docs/rules/exports-last.md
Expand All @@ -114,6 +117,7 @@ This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, a
[`no-default-export`]: ./docs/rules/no-default-export.md
[`no-named-export`]: ./docs/rules/no-named-export.md
[`dynamic-import-chunkname`]: ./docs/rules/dynamic-import-chunkname.md
[`consistent-type-specifier-style`]: ./docs/rules/consistent-type-specifier-style.md

## `eslint-plugin-import` for enterprise

Expand Down

0 comments on commit 53d62d0

Please sign in to comment.