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: code418/eslint-plugin-import
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6512110
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: 6e49a58
Choose a head ref

Commits on Jan 3, 2019

  1. [Fix] import/order: fix autofix to not move imports across fn calls

    Fixes import-js#1252.
    
     - Reordering import statement to line below ignores uncrossable statements
     - Add more tests for ordering around function call
    tihonove authored and ljharb committed Jan 3, 2019
    Copy the full SHA
    e62011f View commit details

Commits on Jun 29, 2019

  1. [New] no-namespace: Make rule fixable

     - Add guards to avoid crashing older versions of ESLint
     - Note that no-namespace's --fix requires ESLint 5+
     - Prevent no-namespace --fix tests from running under ESLint < 5
    Trevor Burnham authored and ljharb committed Jun 29, 2019
    Copy the full SHA
    d030d8e View commit details

Commits on Jul 2, 2019

  1. Copy the full SHA
    1caa402 View commit details

Commits on Jul 8, 2019

  1. fix: Improve parse perf when using @typescript-eslint/parser

    Fixes import-js#1408
    See the above issue for justification.
    bradzacher authored and ljharb committed Jul 8, 2019
    Copy the full SHA
    32704da View commit details
  2. Copy the full SHA
    984fa3b View commit details

Commits on Jul 12, 2019

  1. Copy the full SHA
    22d5440 View commit details

Commits on Jul 17, 2019

  1. Copy the full SHA
    118afd4 View commit details
  2. [Refactor] importType: remove use of cond

    Using normal JS makes for far more understandable and maintainable code.
    ljharb committed Jul 17, 2019
    Copy the full SHA
    c5078ad View commit details
  3. Copy the full SHA
    8a38fd4 View commit details
  4. [Refactor] no-extraneous-dependencies: remove the last bit of lodash

    Using `.length` is clearer than a polymorphic `isEmpty`.
    ljharb committed Jul 17, 2019
    Copy the full SHA
    d3a3fa5 View commit details
  5. Copy the full SHA
    752dcd5 View commit details
  6. Copy the full SHA
    5abd5ed View commit details
  7. Copy the full SHA
    f4e3f1b View commit details

Commits on Jul 19, 2019

  1. Copy the full SHA
    3b21de6 View commit details
  2. Bump to v2.18.1

    ljharb committed Jul 19, 2019
    Copy the full SHA
    b51aa2f View commit details
  3. [bugfix] Skip warning on type interfaces

    Similar to import-js#1377,
    we don't want this rule to apply to exported interfaces.
    lencioni committed Jul 19, 2019
    Copy the full SHA
    582236b View commit details
  4. bump utils to v2.4.1

    ljharb committed Jul 19, 2019
    Copy the full SHA
    b3e5311 View commit details
  5. Bump to v2.18.2

    ljharb committed Jul 19, 2019
    Copy the full SHA
    1a90a20 View commit details

Commits on Jul 20, 2019

  1. Copy the full SHA
    ac14e23 View commit details
  2. [meta] create FUNDING.yml

    ljharb authored Jul 20, 2019
    Copy the full SHA
    989f6cc View commit details

Commits on Aug 3, 2019

  1. Create SECURITY.md

    benmosher authored Aug 3, 2019
    Copy the full SHA
    bcd06ba View commit details
  2. Copy the full SHA
    ebcf17c View commit details
  3. Copy the full SHA
    35a12f9 View commit details

Commits on Aug 4, 2019

  1. Copy the full SHA
    5e143b2 View commit details

Commits on Aug 7, 2019

  1. Copy the full SHA
    92b7533 View commit details

Commits on Aug 8, 2019

  1. Copy the full SHA
    7ffbf03 View commit details

Commits on Aug 17, 2019

  1. Copy the full SHA
    df91bad View commit details

Commits on Aug 19, 2019

  1. Copy the full SHA
    cb70c7e View commit details
  2. Copy the full SHA
    f235aab View commit details

Commits on Aug 24, 2019

  1. Copy the full SHA
    3704801 View commit details

Commits on Sep 4, 2019

  1. Copy the full SHA
    726dda5 View commit details

Commits on Sep 7, 2019

  1. [New] group-exports: make aggregate module exports valid

    Attila Bartha authored and ljharb committed Sep 7, 2019
    Copy the full SHA
    2e047e6 View commit details

Commits on Sep 14, 2019

  1. [eslint] make CI lint everything

    golopot authored and ljharb committed Sep 14, 2019
    Copy the full SHA
    5edc3e6 View commit details

Commits on Sep 16, 2019

  1. [eslint] manually fix no-unused-vars

    golopot authored and ljharb committed Sep 16, 2019
    Copy the full SHA
    e5967f9 View commit details
  2. Copy the full SHA
    c3cad51 View commit details

Commits on Sep 17, 2019

  1. Merge pull request import-js#1475 from golopot/eslint

    [eslint] make CI lint tests, utils, resolvers, ...etc
    ljharb authored Sep 17, 2019
    Copy the full SHA
    813a116 View commit details

Commits on Sep 29, 2019

  1. Copy the full SHA
    c37e42f View commit details

Commits on Oct 5, 2019

  1. Copy the full SHA
    21bf8c6 View commit details

Commits on Oct 7, 2019

  1. [Fix] named/ExportMap: Fix ExportMap for a merged typescript name…

    …space
    
    A typescript namespace may be declared multiple times, it is then merged
    together and considered to be a single declaration from consuming code.
    In the case where a merged namespace is assigned as the export from a
    module then the declarations from all the instances of the namespace in
    the AST need to be considered as exported.
    benmunro authored and ljharb committed Oct 7, 2019
    Copy the full SHA
    c14c9bd View commit details

Commits on Oct 8, 2019

  1. Copy the full SHA
    0cd5e43 View commit details

Commits on Oct 10, 2019

  1. Copy the full SHA
    b280acd View commit details

Commits on Oct 16, 2019

  1. Fix typos

    sonicdoe committed Oct 16, 2019
    Copy the full SHA
    112a0bf View commit details

Commits on Oct 18, 2019

  1. Copy the full SHA
    15ba863 View commit details
  2. Copy the full SHA
    2cdfc19 View commit details

Commits on Oct 28, 2019

  1. [meta] Fix eslint comma-dangle violations

    brendo authored and ljharb committed Oct 28, 2019
    Copy the full SHA
    1b96580 View commit details
  2. Copy the full SHA
    fb8ae71 View commit details
  3. Copy the full SHA
    568ca43 View commit details

Commits on Nov 17, 2019

  1. Copy the full SHA
    05085bb View commit details

Commits on Dec 3, 2019

  1. [Refactor] no-unused-modules/es-modules-utils: Avoid superfluous …

    …calls and code
    brettz9 authored and ljharb committed Dec 3, 2019
    Copy the full SHA
    14c71a3 View commit details

Commits on Dec 5, 2019

  1. Copy the full SHA
    a0614a7 View commit details
Showing 573 changed files with 34,715 additions and 9,045 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
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -7,3 +7,4 @@ insert_final_newline = true
indent_style = space
indent_size = 2
end_of_line = lf
quote_type = single
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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
examples
# we want to ignore "tests/files" here, but unfortunately doing so would
# interfere with unit test and fail it for some reason.
# tests/files
267 changes: 267 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
{
"root": true,
"plugins": [
"eslint-plugin",
"import",
],
"extends": [
"eslint:recommended",
"plugin:eslint-plugin/recommended",
"plugin:import/recommended",
],
"env": {
"node": true,
"es6": true,
"es2017": true,
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020,
},
"rules": {
"array-bracket-spacing": [2, "never"],
"arrow-body-style": [2, "as-needed"],
"arrow-parens": [2, "always"],
"arrow-spacing": [2, { "before": true, "after": true }],
"block-spacing": [2, "always"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline",
}],
"comma-spacing": [2, { "before": false, "after": true }],
"comma-style": [2, "last"],
"computed-property-spacing": [2, "never"],
"curly": [2, "all"],
"default-case": [2, { "commentPattern": "(?:)" }],
"default-case-last": [2],
"default-param-last": [2],
"dot-location": [2, "property"],
"dot-notation": [2, { "allowKeywords": true, "allowPattern": "throws" }],
"eol-last": [2, "always"],
"eqeqeq": [2, "allow-null"],
"for-direction": [2],
"function-call-argument-newline": [2, "consistent"],
"func-call-spacing": [2, "never"],
"implicit-arrow-linebreak": [2, "beside"],
"indent": [2, 2, {
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"FunctionDeclaration": {
"parameters": 1,
"body": 1
},
"FunctionExpression": {
"parameters": 1,
"body": 1
},
"CallExpression": {
"arguments": 1
},
"ArrayExpression": 1,
"ObjectExpression": 1,
"ImportDeclaration": 1,
"flatTernaryExpressions": false,
}],
"jsx-quotes": [2, "prefer-double"],
"key-spacing": [2, {
"beforeColon": false,
"afterColon": true,
"mode": "strict",
}],
"keyword-spacing": ["error", {
"before": true,
"after": true,
"overrides": {
"return": { "after": true },
"throw": { "after": true },
"case": { "after": true }
}
}],
"linebreak-style": [2, "unix"],
"lines-around-directive": [2, {
"before": "always",
"after": "always",
}],
"max-len": 0,
"new-parens": 2,
"no-array-constructor": 2,
"no-compare-neg-zero": 2,
"no-cond-assign": [2, "always"],
"no-extra-parens": 2,
"no-multiple-empty-lines": [2, { "max": 1, "maxEOF": 1, "maxBOF": 0 }],
"no-return-assign": [2, "always"],
"no-trailing-spaces": 2,
"no-use-before-define": [2, { "functions": true, "classes": true, "variables": true }],
"no-var": 2,
"object-curly-spacing": [2, "always"],
"object-shorthand": ["error", "always", {
"ignoreConstructors": false,
"avoidQuotes": false,
"avoidExplicitReturnArrows": true,
}],
"one-var": [2, "never"],
"operator-linebreak": [2, "none", {
"overrides": {
"?": "before",
":": "before",
"&&": "before",
"||": "before",
},
}],
"prefer-const": 2,
"prefer-object-spread": 2,
"prefer-rest-params": 2,
"prefer-template": 2,
"quote-props": [2, "as-needed", { "keywords": false }],
"quotes": [2, "single", {
"allowTemplateLiterals": true,
"avoidEscape": true,
}],
"rest-spread-spacing": [2, "never"],
"semi": [2, "always"],
"semi-spacing": [2, { "before": false, "after": true }],
"semi-style": [2, "last"],
"space-before-blocks": [2, { "functions": "always", "keywords": "always", "classes": "always" }],
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always",
}],
"space-in-parens": [2, "never"],
"space-infix-ops": [2],
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"switch-colon-spacing": [2, { "after": true, "before": false }],
"template-curly-spacing": [2, "never"],
"template-tag-spacing": [2, "never"],
"unicode-bom": [2, "never"],
"use-isnan": [2, { "enforceForSwitchCase": true }],
"valid-typeof": [2],
"wrap-iife": [2, "outside", { "functionPrototypeMethods": true }],
"wrap-regex": [2],
"yield-star-spacing": [2, { "before": false, "after": true }],
"yoda": [2, "never", { "exceptRange": true, "onlyEquality": false }],

"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-docs-description": ["error", { "pattern": "^(Enforce|Ensure|Prefer|Forbid).+\\.$" }],
"eslint-plugin/require-meta-schema": "error",
"eslint-plugin/require-meta-type": "error",

// dog fooding
"import/no-extraneous-dependencies": ["error", {
"devDependencies": [
"tests/**",
"resolvers/*/test/**",
"scripts/**"
],
"optionalDependencies": false,
"peerDependencies": true,
"bundledDependencies": false,
}],
"import/unambiguous": "off",
},

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

"overrides": [
{
"files": "scripts/**",
"rules": {
"no-console": "off",
},
},
{
"files": [
"resolvers/**",
"utils/**",
],
"env": {
"es6": false,
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2016,
},
"rules": {
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "never"
}],
"prefer-destructuring": "off",
"prefer-object-spread": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"prefer-template": "off",
}
},
{
"files": [
"resolvers/webpack/**",
"utils/**",
],
"rules": {
"no-console": 1,
},
},
{
"files": [
"utils/**", // TODO
],
"rules": {
"no-use-before-define": "off",
},
},
{
"files": [
"resolvers/webpack/index.js",
"resolvers/webpack/test/example.js",
"utils/parse.js",
],
"rules": {
"no-console": "off",
},
},
{
"files": [
"resolvers/*/test/**/*",
],
"env": {
"mocha": true,
"es6": false
},
},
{
"files": "tests/**",
"env": {
"mocha": true,
},
"rules": {
"max-len": 0,
"import/default": 0,
},
},
],
}
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']
10 changes: 10 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Reporting a bug? -->
<!--
Please provide the output of running ESLint with this environment variable: `DEBUG=eslint-plugin-import:*`
Windows: `set DEBUG=eslint-plugin-import:* & eslint .`
Linux/Mac: `export DEBUG=eslint-plugin-import:* & eslint .`
It will also be helpful if you can provide a minimal reproducible example
Preferably a GitHub repository containing all the code & ESLint config required
https://stackoverflow.com/help/minimal-reproducible-example
-->
Loading