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

Release 2.25.0 #2253

Merged
merged 33 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7c382f0
[New] `no-unused-modules`: support dynamic imports
maxkomarychev Jun 20, 2020
1571913
[utils] [new] create internal replacement for `pkg-up` and `read-pkg-up`
mgwalker May 6, 2021
9ccdcb7
[Refactor] switch to an internal replacement for `pkg-up` and `read-p…
mgwalker May 6, 2021
35bd977
[New] `no-unresolved`: add `caseSensitiveStrict` option
sergei-startsev Aug 23, 2021
7579748
[utils] [new] add `visit`, to support dynamic imports
maxkomarychev Jun 20, 2020
4a9be63
[Tests] use ESLint class in `cli` test
ota-meshi Aug 16, 2021
49ada27
[New] `no-unused-modules`: add eslint v8 support
coderaiser Aug 16, 2021
1359e24
[eslint] enable `object-shorthand`, `space-before-function-paren`
ljharb Aug 28, 2021
397b6c5
[Tests] run pretest on CI
Hypnosphi Aug 30, 2021
2a0d207
[Tests] coveralls -> codecov
ljharb Aug 30, 2021
a032b83
[Tests] run `npm run pretest` in travis
ljharb Sep 1, 2021
4d15e26
[patch] TypeScript config: remove `.d.ts` from `import/parsers` setti…
jablko Sep 3, 2021
2a8891f
[utils] [New] `fileExistsWithCaseSync`: add `strict` argument
sergei-startsev Aug 23, 2021
bb8eab9
[eslint] enable `keyword-spacing`
ljharb Sep 6, 2021
7784948
[New] `no-restricted-paths`: add/restore glob pattern support
stropho Sep 6, 2021
4ed7867
[Fix] `no-unresolved`: ignore type-only imports
jablko Sep 11, 2021
47ea669
[Fix] `order`: Fix import ordering in TypeScript module declarations
remcohaszing Sep 12, 2021
58fe766
[Tests] ignore resolver tests, scripts, and unused memo-parser
ljharb Sep 18, 2021
64423e9
[Tests] add passing test for export-star
ljharb Sep 19, 2021
fd85369
[Tests] skip failing test on eslint < 6 + node < 8
ljharb Sep 19, 2021
471790f
[Tests] fix skip usage
jablko Sep 19, 2021
28669b9
[Tests] `no-extraneous-dependencies` ignores unresolved imports
jablko Sep 19, 2021
47e9c89
[Tests] type-only imports were added in TypeScript ESTree 2.23.0
jablko Sep 20, 2021
430d16c
[Tests] eslint-import-resolver-typescript@1.0.2 doesn't resolve .js
jablko Sep 21, 2021
4f0f560
[Docs] `no-namespace`: fix a typo
ljharb Sep 21, 2021
dd81424
[Refactor] `no-unresolved`, `no-extraneous-dependencies`: moduleVisit…
jablko Sep 21, 2021
9a744f7
[Fix] `default`, `ExportMap`: Resolve extended TypeScript configurati…
mrmckeb Sep 28, 2021
62e2d88
[New] Support `eslint` v8
ota-meshi Aug 16, 2021
0e857b6
[Deps] update `array-includes`, `array.prototype.flat`, `is-core-modu…
ljharb Oct 11, 2021
c117be5
[Dev Deps] update `array.prototype.flatmap`, `glob`; remove `babel-pr…
ljharb Oct 11, 2021
900ac9a
[resolvers/webpack] [deps] update `is-core-module`
ljharb Oct 11, 2021
7463de2
utils: v2.7.0
ljharb Oct 11, 2021
b0131d2
Bump to v2.25.0
ljharb Oct 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,38 @@
"eqeqeq": [2, "allow-null"],
"func-call-spacing": 2,
"indent": [2, 2],
"keyword-spacing": ["error", {
before: true,
after: true,
overrides: {
return: { after: true },
throw: { after: true },
case: { after: true }
}
}],
"max-len": [1, 99, 2],
"no-cond-assign": [2, "always"],
"no-return-assign": [2, "always"],
"no-shadow": 1,
"no-var": 2,
"object-curly-spacing": [2, "always"],
"object-shorthand": ["error", "always", {
"ignoreConstructors": false,
"avoidQuotes": true,
}],
"one-var": [2, "never"],
"prefer-const": 2,
"quotes": [2, "single", {
"allowTemplateLiterals": true,
"avoidEscape": true,
}],
"semi": [2, "always"],
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always",
}],

"eslint-plugin/consistent-output": [
"error",
"always",
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/node-4+.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
eslint:
- 8
- 7
- 6
- 5
Expand All @@ -44,24 +45,44 @@ jobs:
env:
TS_PARSER: 2
exclude:
- node-version: 15
eslint: 8
- node-version: 13
eslint: 8
- node-version: 11
eslint: 8
- node-version: 10
eslint: 8
- node-version: 9
eslint: 8
- node-version: 9
eslint: 7
- node-version: 8
eslint: 8
- node-version: 8
eslint: 7
- node-version: 7
eslint: 8
- node-version: 7
eslint: 7
- node-version: 7
eslint: 6
- node-version: 6
eslint: 8
- node-version: 6
eslint: 7
- node-version: 6
eslint: 6
- node-version: 5
eslint: 8
- node-version: 5
eslint: 7
- node-version: 5
eslint: 6
- node-version: 5
eslint: 5
- node-version: 4
eslint: 8
- node-version: 4
eslint: 7
- node-version: 4
Expand All @@ -81,8 +102,9 @@ jobs:
node-version: ${{ matrix.node-version }}
after_install: npm run copy-metafiles && ./tests/dep-time-travel.sh
skip-ls-check: true
- run: npm run pretest
- run: npm run tests-only
- run: npm run coveralls
- uses: codecov/codecov-action@v1

node:
name: 'node 4+'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
after_install: npm run copy-metafiles && ./tests/dep-time-travel.sh && cd ${{ matrix.package }} && npm install
skip-ls-check: true
- run: cd ${{ matrix.package }} && npm run tests-only
- uses: codecov/codecov-action@v1

packages:
name: 'packages: all tests'
Expand Down
8 changes: 6 additions & 2 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"reporter": ["text-summary", "lcov", "text", "html", "json"],
"require": [
"babel-register"
],
Expand All @@ -10,6 +10,10 @@
"exclude": [
"coverage",
"test",
"tests"
"tests",
"resolvers/*/test",
"scripts",
"memo-parser",
"lib"
]
}
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ before_install:
install:
- 'npm install'
- 'if [ -n "${ESLINT_VERSION}" ]; then ./tests/dep-time-travel.sh; fi'
- 'npm run pretest'

script:
- npm run tests-only

after_success:
- npm run coveralls
- bash <(curl -s https://codecov.io/bash)
45 changes: 41 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel

## [Unreleased]

## [2.25.0] - 2021-10-11

### Added
- Support `eslint` v8 ([#2191], thanks [@ota-meshi])
- [`no-unresolved`]: add `caseSensitiveStrict` option ([#1262], thanks [@sergei-startsev])
- [`no-unused-modules`]: add eslint v8 support ([#2194], thanks [@coderaiser])
- [`no-restricted-paths`]: add/restore glob pattern support ([#2219], thanks [@stropho])
- [`no-unused-modules`]: support dynamic imports ([#1660], [#2212], thanks [@maxkomarychev], [@aladdin-add], [@Hypnosphi])

### Fixed
- [`no-unresolved`]: ignore type-only imports ([#2220], thanks [@jablko])
- [`order`]: fix sorting imports inside TypeScript module declarations ([#2226], thanks [@remcohaszing])
- [`default`], `ExportMap`: Resolve extended TypeScript configuration files ([#2240], thanks [@mrmckeb])

### Changed
- [Refactor] switch to an internal replacement for `pkg-up` and `read-pkg-up` ([#2047], thanks [@mgwalker])
- [patch] TypeScript config: remove `.d.ts` from [`import/parsers` setting] and [`import/extensions` setting] ([#2220], thanks [@jablko])
- [Refactor] [`no-unresolved`], [`no-extraneous-dependencies`]: moduleVisitor usage ([#2233], thanks [@jablko])

## [2.24.2] - 2021-08-24

### Fixed
Expand Down Expand Up @@ -221,7 +240,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
- [`order`]: add option pathGroupsExcludedImportTypes to allow ordering of external import types ([#1565], thanks [@Mairu])

### Fixed
- [`no-unused-modules`]: fix usage of `import/extensions` settings ([#1560], thanks [@stekycz])
- [`no-unused-modules`]: fix usage of [`import/extensions` setting] ([#1560], thanks [@stekycz])
- [`extensions`]: ignore non-main modules ([#1563], thanks [@saschanaz])
- TypeScript config: lookup for external modules in @types folder ([#1526], thanks [@joaovieira])
- [`no-extraneous-dependencies`]: ensure `node.source` is truthy ([#1589], thanks [@ljharb])
Expand Down Expand Up @@ -900,13 +919,21 @@ for info on changes for earlier releases.

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

[#2240]: https://github.com/import-js/eslint-plugin-import/pull/2240
[#2233]: https://github.com/import-js/eslint-plugin-import/pull/2233
[#2226]: https://github.com/import-js/eslint-plugin-import/pull/2226
[#2220]: https://github.com/import-js/eslint-plugin-import/pull/2220
[#2219]: https://github.com/import-js/eslint-plugin-import/pull/2219
[#2212]: https://github.com/import-js/eslint-plugin-import/pull/2212
[#2196]: https://github.com/import-js/eslint-plugin-import/pull/2196
[#2194]: https://github.com/import-js/eslint-plugin-import/pull/2194
[#2191]: https://github.com/import-js/eslint-plugin-import/pull/2191
[#2184]: https://github.com/import-js/eslint-plugin-import/pull/2184
[#2179]: https://github.com/import-js/eslint-plugin-import/pull/2179
[#2160]: https://github.com/import-js/eslint-plugin-import/pull/2160
[#2158]: https://github.com/import-js/eslint-plugin-import/pull/2158
[#2156]: https://github.com/import-js/eslint-plugin-import/pull/2156
[#2149]: https://github.com/benmosher/eslint-plugin-import/pull/2149
[#2149]: https://github.com/import-js/eslint-plugin-import/pull/2149
[#2146]: https://github.com/import-js/eslint-plugin-import/pull/2146
[#2140]: https://github.com/import-js/eslint-plugin-import/pull/2140
[#2138]: https://github.com/import-js/eslint-plugin-import/pull/2138
Expand All @@ -919,6 +946,7 @@ for info on changes for earlier releases.
[#2083]: https://github.com/import-js/eslint-plugin-import/pull/2083
[#2075]: https://github.com/import-js/eslint-plugin-import/pull/2075
[#2071]: https://github.com/import-js/eslint-plugin-import/pull/2071
[#2047]: https://github.com/import-js/eslint-plugin-import/pull/2047
[#2034]: https://github.com/import-js/eslint-plugin-import/pull/2034
[#2028]: https://github.com/import-js/eslint-plugin-import/pull/2028
[#2026]: https://github.com/import-js/eslint-plugin-import/pull/2026
Expand Down Expand Up @@ -976,6 +1004,7 @@ for info on changes for earlier releases.
[#1676]: https://github.com/import-js/eslint-plugin-import/pull/1676
[#1666]: https://github.com/import-js/eslint-plugin-import/pull/1666
[#1664]: https://github.com/import-js/eslint-plugin-import/pull/1664
[#1660]: https://github.com/import-js/eslint-plugin-import/pull/1660
[#1658]: https://github.com/import-js/eslint-plugin-import/pull/1658
[#1651]: https://github.com/import-js/eslint-plugin-import/pull/1651
[#1626]: https://github.com/import-js/eslint-plugin-import/pull/1626
Expand Down Expand Up @@ -1047,6 +1076,7 @@ for info on changes for earlier releases.
[#1294]: https://github.com/import-js/eslint-plugin-import/pull/1294
[#1290]: https://github.com/import-js/eslint-plugin-import/pull/1290
[#1277]: https://github.com/import-js/eslint-plugin-import/pull/1277
[#1262]: https://github.com/import-js/eslint-plugin-import/pull/1262
[#1257]: https://github.com/import-js/eslint-plugin-import/pull/1257
[#1253]: https://github.com/import-js/eslint-plugin-import/pull/1253
[#1248]: https://github.com/import-js/eslint-plugin-import/pull/1248
Expand Down Expand Up @@ -1161,8 +1191,8 @@ for info on changes for earlier releases.
[#2161]: https://github.com/import-js/eslint-plugin-import/issues/2161
[#2118]: https://github.com/import-js/eslint-plugin-import/issues/2118
[#2067]: https://github.com/import-js/eslint-plugin-import/issues/2067
[#2056]: https://github.com/import-js/eslint-plugin-import/issues/2056
[#2063]: https://github.com/import-js/eslint-plugin-import/issues/2063
[#2056]: https://github.com/import-js/eslint-plugin-import/issues/2056
[#1998]: https://github.com/import-js/eslint-plugin-import/issues/1998
[#1965]: https://github.com/import-js/eslint-plugin-import/issues/1965
[#1924]: https://github.com/import-js/eslint-plugin-import/issues/1924
Expand Down Expand Up @@ -1267,7 +1297,8 @@ for info on changes for earlier releases.
[#119]: https://github.com/import-js/eslint-plugin-import/issues/119
[#89]: https://github.com/import-js/eslint-plugin-import/issues/89

[Unreleased]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.2...HEAD
[Unreleased]: https://github.com/import-js/eslint-plugin-import/compare/v2.25.0...HEAD
[2.25.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.2...v2.25.0
[2.24.2]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.1...v2.24.2
[2.24.1]: https://github.com/import-js/eslint-plugin-import/compare/v2.24.0...v2.24.1
[2.24.0]: https://github.com/import-js/eslint-plugin-import/compare/v2.23.4...v2.24.0
Expand Down Expand Up @@ -1429,6 +1460,7 @@ for info on changes for earlier releases.
[@isiahmeadows]: https://github.com/isiahmeadows
[@IvanGoncharov]: https://github.com/IvanGoncharov
[@ivo-stefchev]: https://github.com/ivo-stefchev
[@jablko]: https://github.com/jablko
[@jakubsta]: https://github.com/jakubsta
[@jeffshaver]: https://github.com/jeffshaver
[@jf248]: https://github.com/jf248
Expand Down Expand Up @@ -1479,14 +1511,18 @@ for info on changes for earlier releases.
[@MatthiasKunnen]: https://github.com/MatthiasKunnen
[@mattijsbliek]: https://github.com/mattijsbliek
[@Maxim-Mazurok]: https://github.com/Maxim-Mazurok
[@maxkomarychev]: https://github.com/maxkomarychev
[@maxmalov]: https://github.com/maxmalov
[@mgwalker]: https://github.com/mgwalker
[@MikeyBeLike]: https://github.com/MikeyBeLike
[@mplewis]: https://github.com/mplewis
[@mrmckeb]: https://github.com/mrmckeb
[@nickofthyme]: https://github.com/nickofthyme
[@nicolashenry]: https://github.com/nicolashenry
[@noelebrun]: https://github.com/noelebrun
[@ntdb]: https://github.com/ntdb
[@nwalters512]: https://github.com/nwalters512
[@ota-meshi]: https://github.com/ota-meshi
[@panrafal]: https://github.com/panrafal
[@paztis]: https://github.com/paztis
[@pcorpet]: https://github.com/pcorpet
Expand All @@ -1497,6 +1533,7 @@ for info on changes for earlier releases.
[@ramasilveyra]: https://github.com/ramasilveyra
[@randallreedjr]: https://github.com/randallreedjr
[@redbugz]: https://github.com/redbugz
[@remcohaszing]: https://github.com/remcohaszing
[@rfermann]: https://github.com/rfermann
[@rhettlivingston]: https://github.com/rhettlivingston
[@rhys-vdw]: https://github.com/rhys-vdw
Expand Down
47 changes: 33 additions & 14 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,31 @@ configuration:
# Test against this version of Node.js
environment:
matrix:
- nodejs_version: "16"
- nodejs_version: "14"
- nodejs_version: "12"
- nodejs_version: "10"
- nodejs_version: "8"
# - nodejs_version: "6"
# - nodejs_version: "4"
# - nodejs_version: "6"
# - nodejs_version: "4"

image: Visual Studio 2019
matrix:
fast_finish: false
exclude:
- configuration: WSL
nodejs_version: "10"
- configuration: WSL
nodejs_version: "8"
- configuration: WSL
nodejs_version: "6"
- configuration: WSL
nodejs_version: "4"

# allow_failures:
# - nodejs_version: "4" # for eslint 5
allow_failures:
- nodejs_version: "4" # for eslint 5

# platform:
# - x86
# - x64
platform:
- x86
- x64

# Initialization scripts. (runs before repo cloning)
init:
Expand All @@ -35,14 +38,26 @@ init:
if ($env:nodejs_version -eq "4") {
$env:NPM_VERSION="3"
}
if ($env:nodejs_version -in @("8", "10", "12")) {
$env:NPM_VERSION="6.14.5"
if ($env:nodejs_version -in @("8")) {
$env:NPM_VERSION="6"
}
if ($env:nodejs_version -in @("10", "12", "14", "16")) {
$env:NPM_VERSION="6" # TODO: use npm 7
$env:NPM_CONFIG_LEGACY_PEER_DEPS="true"
}
- ps: >-
$env:ESLINT_VERSION="7";
if ([int]$env:nodejs_version -le 8) {
$env:ESLINT_VERSION="6"
}
if ([int]$env:nodejs_version -le 7) {
$env:ESLINT_VERSION="5"
}
if ([int]$env:nodejs_version -le 6) {
$env:ESLINT_VERSION="4"
}
- ps: $env:WINDOWS_NYC_VERSION = "15.0.1"
- ps: $env:TRAVIS_NODE_VERSION = $env:nodejs_version

# Add `ci`-command to `PATH` for running commands either using cmd or wsl depending on the configuration
- ps: $env:PATH += ";$(Join-Path $(pwd) "scripts")"
Expand All @@ -54,6 +69,8 @@ before_build:

# Install dependencies
- ci npm install
- ci npm run copy-metafiles
- bash ./tests/dep-time-travel.sh 2>&1

# fix symlinks
- git config core.symlinks true
Expand Down Expand Up @@ -99,9 +116,6 @@ test_script:
$env:RESOLVERS = [string]::Join(";", $resolvers);
- FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm test & popd )

on_success:
- ci npm run coveralls

# Configuration-specific steps
for:
- matrix:
Expand All @@ -127,6 +141,9 @@ for:
}
$env:RESOLVERS = [string]::Join(";", $resolvers);
- IF DEFINED RESOLVERS FOR %%G in ("%RESOLVERS:;=";"%") do ( pushd %%~G & ci npm install --no-save nyc@%WINDOWS_NYC_VERSION% & popd )
# TODO: enable codecov for native windows builds
# on_success:
# - codecov
- matrix:
only:
- configuration: WSL
Expand All @@ -136,5 +153,7 @@ for:
- ps: $env:WSLENV += ":nodejs_version"
- ps: wsl curl -sL 'https://deb.nodesource.com/setup_${nodejs_version}.x' `| sudo APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 -E bash -
- wsl sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
on_success:
- ci bash <(curl -s https://codecov.io/bash)

build: on
Loading