Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: import-js/eslint-plugin-import
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9bac44e629105572ca78a532c968df202e5a18b8
Choose a base ref
...
head repository: import-js/eslint-plugin-import
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b0131d2757bb28e8e1eb3f34670a2c59a3d7b9ff
Choose a head ref

Commits on Apr 6, 2017

  1. [Fix] Fix interpreting some external modules being interpreted as int…

    …ernal modules
    
    Fixes #793.
    
     - Add skipped test to expect scoped internal packages to be "internal"
    ephys authored and ljharb committed Apr 6, 2017
    Copy the full SHA
    e9544f8 View commit details

Commits on Jul 23, 2018

  1. New: no-unused-modules rule

    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Jul 23, 2018
    Copy the full SHA
    75a9eab View commit details

Commits on Jul 30, 2018

  1. New: no-unused-modules rule - minor refactoring

    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Jul 30, 2018
    Copy the full SHA
    1d8ddf7 View commit details
  2. New: no-unused-modules rule - added tests

    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Jul 30, 2018
    Copy the full SHA
    153599d View commit details

Commits on Jul 31, 2018

  1. New: no-unused-modules rule - removed destructoring of context.getF…

    …ilename
    
    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Jul 31, 2018
    Copy the full SHA
    fd1ccc0 View commit details
  2. New: no-unused-modules rule - minor refactoring

    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Jul 31, 2018
    Copy the full SHA
    a402023 View commit details
  3. New: no-unused-modules rule - added more tests

    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Jul 31, 2018
    Copy the full SHA
    230122b View commit details

Commits on Aug 5, 2018

  1. New: no-unused-modules rule - added default src, more comprehensive…

    … sanity checks
    
    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Aug 5, 2018
    Copy the full SHA
    aa7253b View commit details

Commits on Aug 11, 2018

  1. New: no-unused-modules rule - add support for 'import *'

    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Aug 11, 2018
    Copy the full SHA
    d47ccdf View commit details

Commits on Aug 19, 2018

  1. Copy the full SHA
    06a0976 View commit details

Commits on Sep 12, 2018

  1. New: no-unused-modules rule - renamed 'ignore' option to 'ignoreExp…

    …orts', revised docs
    
    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Sep 12, 2018
    Copy the full SHA
    c483514 View commit details
  2. New: no-unused-modules rule - corrected typo in docs

    Signed-off-by: René Fermann <rene.fermann@gmx.de>
    rfermann committed Sep 12, 2018
    Copy the full SHA
    e04c87c View commit details

Commits on Oct 18, 2018

  1. New: no-unused-modules rule - reworked schema, removed UNDEFINED va…

    …riable, fixed documentation
    
    Signed-off-by: Fermann <rene.fermann@capgemini.com>
    Fermann committed Oct 18, 2018
    Copy the full SHA
    2922910 View commit details

Commits on Dec 18, 2018

  1. Copy the full SHA
    0f5c2a5 View commit details

Commits on Dec 23, 2018

  1. Copy the full SHA
    191c77b View commit details
  2. Copy the full SHA
    ae9942f View commit details
  3. Copy the full SHA
    32f4c23 View commit details
  4. Copy the full SHA
    90f7217 View commit details

Commits on Jan 30, 2019

  1. Update README.md for #1256 (#1277)

    kirill-konshin authored and benmosher committed Jan 30, 2019
    3
    Copy the full SHA
    bdc05aa View commit details

Commits on Feb 18, 2019

  1. Refactor no-useless-path-segments rule

    timkraut authored and ljharb committed Feb 18, 2019
    Copy the full SHA
    17e29d8 View commit details
  2. [Tests] update chai to v4

    timkraut authored and ljharb committed Feb 18, 2019
    Copy the full SHA
    246be82 View commit details

Commits on Feb 21, 2019

  1. 1
    Copy the full SHA
    651829d View commit details

Commits on Feb 24, 2019

  1. Copy the full SHA
    b4bad0e View commit details

Commits on Mar 3, 2019

  1. [Tests] use resolve, an actual dep, instead of builtin-modules, a…

    …n erstwhile transitive dep
    ljharb committed Mar 3, 2019
    Copy the full SHA
    158cd80 View commit details
  2. Merge pull request #1295 from jeffshaver/fix-tests

    [Tests] fix broken tests on master
    ljharb authored Mar 3, 2019
    Copy the full SHA
    083bb47 View commit details

Commits on Mar 5, 2019

  1. Copy the full SHA
    a49ab8a View commit details

Commits on Mar 6, 2019

  1. Copy the full SHA
    4808942 View commit details

Commits on Mar 9, 2019

  1. Copy the full SHA
    ba0aed9 View commit details

Commits on Mar 16, 2019

  1. Merge pull request #1290 from timkraut/no-useless-index-in-import-paths

    [New] `no-useless-path-segments`: Add `noUselessIndex` option
    ljharb authored Mar 16, 2019
    Copy the full SHA
    206d676 View commit details

Commits on Mar 19, 2019

  1. Copy the full SHA
    37279e0 View commit details

Commits on Mar 25, 2019

  1. Add rules that show corner cases for commonJS

    Andrew Tamura committed Mar 25, 2019
    Copy the full SHA
    be4f1c7 View commit details

Commits on Mar 27, 2019

  1. Merge pull request #1308 from TakeScoop/root-require

    `no-commonjs`: add tests that show corner cases
    ljharb authored Mar 27, 2019
    Copy the full SHA
    af976b9 View commit details

Commits on Mar 30, 2019

  1. no-duplicates: Add autofix

    lydell committed Mar 30, 2019
    Copy the full SHA
    9ac41f3 View commit details

Commits on Mar 31, 2019

  1. Copy the full SHA
    71a64c6 View commit details
  2. Copy the full SHA
    f47622c View commit details
  3. Copy the full SHA
    cdb7c37 View commit details
  4. Copy the full SHA
    f74a74e View commit details
  5. Copy the full SHA
    0dd398c View commit details
  6. Copy the full SHA
    1ac4bd7 View commit details
  7. Copy the full SHA
    d35b7ff View commit details

Commits on Apr 1, 2019

  1. Test both typescript-eslint-parser and @typescript-eslint/parser

    augments #1304
    Andrew Schmadel authored and ljharb committed Apr 1, 2019
    Copy the full SHA
    3134ad3 View commit details

Commits on Apr 3, 2019

  1. skip @typescript-eslint/parser tests on older eslint versions

    Andrew Schmadel authored and ljharb committed Apr 3, 2019
    Copy the full SHA
    f0eb917 View commit details

Commits on Apr 6, 2019

  1. Copy the full SHA
    cca688d View commit details

Commits on Apr 7, 2019

  1. Merge pull request #1312 from lydell/no-duplicates-autofix

    no-duplicates: Add autofix
    ljharb authored Apr 7, 2019
    Copy the full SHA
    0d812ad View commit details
  2. Merge pull request #1142 from rfermann/master

    New: `no-unused-modules` rule
    ljharb authored Apr 7, 2019
    Copy the full SHA
    3aefa79 View commit details

Commits on Apr 8, 2019

  1. Remove @typescript-eslint/parser before running ESLint<v5 tests

    Andrew Schmadel authored and ljharb committed Apr 8, 2019
    Copy the full SHA
    49af9d8 View commit details

Commits on Apr 10, 2019

  1. Merge pull request #1304 from bradennapier/feature/typescript-export-…

    …type
    
    support export type named exports from typescript
    ljharb authored Apr 10, 2019
    Copy the full SHA
    28dd614 View commit details

Commits on Apr 11, 2019

  1. [*] [deps] update resolve

    ljharb committed Apr 11, 2019
    Copy the full SHA
    40bf40a View commit details
  2. Copy the full SHA
    0ff1c83 View commit details
  3. Merge pull request #1297 from echenley/ech/fix-isBuiltIn-local-aliases

    fix: aliased internal modules that look like core modules
    ljharb authored Apr 11, 2019
    Copy the full SHA
    2d21c4c View commit details
Showing 463 changed files with 18,473 additions and 5,217 deletions.
13 changes: 11 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"presets": [ "es2015-argon" ],
"presets": ["airbnb"],
"sourceMaps": "inline",
"retainLines": true,
"env": {
"test": {
"plugins": [ "istanbul" ]
"plugins": [
"istanbul",
["module-resolver", { "root": ["./src/"] }],
]
},
"testCompiled": {
"plugins": [
["module-resolver", { "root": ["./lib/"] }],
]
}
}
}
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
repo_token: fW3moW39Z8pKOgqTnUMT68DnNCd2SM8Ly
repo_token: fW3moW39Z8pKOgqTnUMT68DnNCd2SM8Ly
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
lib
coverage
.nyc_output
node_modules
tests/files/malformed.js
tests/files/with-syntax-error
tests/files/just-json-files/invalid.json
tests/files/typescript-d-ts/
resolvers/webpack/test/files
# we want to ignore "tests/files" here, but unfortunately doing so would
# interfere with unit test and fail it for some reason.
# tests/files
104 changes: 104 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"root": true,
"plugins": [
"eslint-plugin",
"import",
],
"extends": [
"eslint:recommended",
"plugin:eslint-plugin/recommended",
"plugin:import/recommended",
],
"env": {
"node": true,
"es6": true,
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020,
},
"rules": {
"comma-dangle": [2, "always-multiline"],
"comma-style": [2, "last"],
"curly": [2, "multi-line"],
"eol-last": [2, "always"],
"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",
],
"eslint-plugin/meta-property-ordering": "error",
"eslint-plugin/no-deprecated-context-methods": "error",
"eslint-plugin/no-deprecated-report-api": "off",
"eslint-plugin/prefer-replace-text": "error",
"eslint-plugin/report-message-format": "error",
"eslint-plugin/require-meta-schema": "error",
"eslint-plugin/require-meta-type": "error",

// dog fooding
"import/no-extraneous-dependencies": "error",
"import/unambiguous": "off",
},

"settings": {
"import/resolver": {
"node": {
"paths": [
"src",
],
},
},
},

"overrides": [
{
"files": "scripts/**",
"rules": {
"no-console": "off",
},
},
{
"files": [
"resolvers/*/test/**/*",
],
"env": {
"mocha": true,
"es6": false
},
}
],
}
35 changes: 0 additions & 35 deletions .eslintrc.yml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: eslint-plugin-import # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/eslint-plugin-import
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
114 changes: 114 additions & 0 deletions .github/workflows/node-4+.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: 'Tests: node.js'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
type: majors
preset: '>= 6' # preset: '>=4' # see https://github.com/import-js/eslint-plugin-import/issues/2053

latest:
needs: [matrix]
name: 'latest majors'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
eslint:
- 8
- 7
- 6
- 5
- 4
- 3
- 2
include:
- node-version: 'lts/*'
eslint: 7
ts-parser: 3
env:
TS_PARSER: 3
- node-version: 'lts/*'
eslint: 7
ts-parser: 2
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
eslint: 6
- node-version: 4
eslint: 5

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
continue-on-error: ${{ matrix.eslint == 4 && matrix.node-version == 4 }}
name: 'nvm install ${{ matrix.node-version }} && npm install, with eslint ${{ matrix.eslint }}'
env:
ESLINT_VERSION: ${{ matrix.eslint }}
TRAVIS_NODE_VERSION: ${{ matrix.node-version }}
with:
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
- uses: codecov/codecov-action@v1

node:
name: 'node 4+'
needs: [latest]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
28 changes: 28 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
# pretest:
# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v2
# - uses: ljharb/actions/node/install@main
# name: 'nvm install lts/* && npm install'
# with:
# node-version: 'lts/*'
# skip-ls-check: true
# - run: npm run pretest

posttest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install lts/* && npm install'
with:
node-version: 'lts/*'
skip-ls-check: true
- run: npm run posttest
53 changes: 53 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'Tests: packages'

on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
type: 'majors'
preset: '>= 6' # preset: '>=4' # see https://github.com/import-js/eslint-plugin-import/issues/2053
versionsAsRoot: true

tests:
needs: [matrix]
name: 'packages'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
package:
- resolvers/node
- resolvers/webpack
# - memo-parser
# - utils

steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
env:
ESLINT_VERSION: ${{ matrix.eslint }}
TRAVIS_NODE_VERSION: ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
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'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
Loading