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: v2.18.2
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: HEAD
Choose a head ref
Loading
Showing 564 changed files with 34,585 additions and 9,119 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