Closed exodus4d closed 3 years ago
cc @bradzacher
Thanks for so many details!
Can you please check the version in G:\webpages\pathfinder\node_modules\@eslint\eslintrc\package.json
?
Here it is:
"name": "@eslint/eslintrc",
"version": "0.1.3"
When I switch back to 7.11.0
the issue is gone.
This looks like a problem with the package manager, ESLint v7.12.0
has dependency "@eslint/eslintrc": "^0.2.0"
, but is getting 0.1.3
.
YeahI can confirm this. I even get the information that @eslint/eslintrc 0.2.0
is installed:
G:\webpages\pathfinder>npm list @eslint/eslintrc --depth=2
pathfinder-eve@2.0.0 G:\webpages\pathfinder
`-- eslint@7.12.0
`-- @eslint/eslintrc@0.2.0
G:\webpages\pathfinder\node_modules\@eslint\eslintrc\package.json
does not reflect that and shows version 0.1.3
:)
I get the same result after a reinstall:
G:\webpages\pathfinder\node_modules
dirG:\webpages\pathfinder\package-lock.json
G:\webpages\pathfinder npm i
Could this be a caching issue? - Ill do some more tests, maybe I figure out something. I can also try an manually install @eslint/eslintrc@0.2.0
I made some more investigations:
NPM packeges eslint
+ eslintrc
do have the correct version after npm i
in my project root. (My previous comment can be ignored).:
import/no-unused-modules
. Unfortunately the stacktrace does not include that information.
Throwing a custom Error
, points me to it: . https://github.com/eslint/eslintrc/blob/04f3cae17fe07b2fd0b74fd3e88482b3094e75e3/lib/config-array-factory.js#L419-L428
constructor({
additionalPluginPool = new Map(),
cwd = process.cwd(),
resolvePluginsRelativeTo,
builtInRules,
resolver = ModuleResolver,
eslintAllPath,
eslintRecommendedPath
} = {}) {
if(!eslintRecommendedPath) throw new Error('xx'); // <<==
// ...
}
import
in *.eslintrc.json
, ESLint works as expected :D . I guess this issue is no longer within scope of ESLint right? It was just a bit hard to pin down the error source, because no rule
name is shown in the stacktrace.
{
"plugins": [
"@typescript-eslint",
// "import", // <<== error cause
"jsdoc",
"json"
]
}
@exodus4d would everything else work well if you turn off just import/no-unused-modules
rule?
The problem with no-unused-modules
is that it requires ESLint's internal module FileEnumerator
, but now configArrayFactory
argument basically must be passed to the FileEnumerator
constructor.
Yes everything seems to work if "import/no-unused-modules": "off
.
import/no-unused-modules: off
➜ Worksimport/no-unused-modules: warn
➜ Error@mdjermanovic that seems like a breaking change in publicly accessible API, in a minor version :-/
Thanks for the thorough investigation!
If I understand correctly, there was a problem with npm
upgrading the dependencies, but that happens sometimes and deleting node_modules
+ npm i
helps as always. There's nothing to fix in ESLint about that.
The other problem is with import/no-unused-modules
using an internal API that has changed now.
@mdjermanovic that seems like a breaking change in publicly accessible API, in a minor version :-/
I'll leave this issue open for discussion, but we have public API documented here:
https://eslint.org/docs/developer-guide/nodejs-api
https://github.com/eslint/eslint/issues/13654 will really help to avoid these problems
Tell us about your environment
What parser (default,
@babel/eslint-parser
,@typescript-eslint/parser
, etc.) are you using?"parser": "@typescript-eslint/parser"
Please show your full configuration:Configuration `.eslintrc.json`
```json { "env": { "browser": true, "es6": true, "es2021": true, "amd": true, "node": true }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:jsdoc/recommended" ], "globals": {}, "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2020, "sourceType": "module", "ecmaFeatures": { "impliedStrict": true }, "project": "./tsconfig.eslint.json", "extraFileExtensions": [".mjs", ".d.ts", ".json"] }, "plugins": [ "@typescript-eslint", "import", "jsdoc", "json" ], "reportUnusedDisableDirectives": true, "root": true, "rules": { "for-direction": "error", "getter-return": [ "error", { "allowImplicit": true } ], "no-async-promise-executor": "error", "no-await-in-loop": "error", "no-compare-neg-zero": "error", "no-cond-assign": [ "error", "always" ], "no-console": [ "error", { "allow": ["ok", "pf", "brand", "info", "warn", "error", "debug", "group", "groupCollapsed", "groupEnd", "table"] } ], "no-constant-condition": "warn", "no-control-regex": "error", "no-debugger": "error", "no-dupe-args": "error", "no-dupe-else-if": "off", "no-dupe-keys": "error", "no-duplicate-case": "error", "no-empty": "error", "no-empty-character-class": "error", "no-ex-assign": "error", "no-extra-boolean-cast": "error", "no-func-assign": "error", "no-import-assign": "off", "no-inner-declarations": "error", "no-invalid-regexp": "error", "no-irregular-whitespace": "error", "no-misleading-character-class": "error", "no-obj-calls": "error", "no-promise-executor-return": "off", "no-prototype-builtins": "error", "no-regex-spaces": "error", "no-setter-return": "off", "no-sparse-arrays": "error", "no-template-curly-in-string": "error", "no-unexpected-multiline": "error", "no-unreachable": "error", "no-unreachable-loop": [ "off", { "ignore": [] } ], "no-unsafe-finally": "error", "no-unsafe-negation": "error", "no-useless-backreference": "off", "require-atomic-updates": "off", "use-isnan": "error", "valid-typeof": [ "error", { "requireStringLiterals": true } ], "accessor-pairs": "off", "array-callback-return": [ "error", { "allowImplicit": true } ], "block-scoped-var": "error", "class-methods-use-this": [ "error", { "exceptMethods": [] } ], "complexity": [ "off", 11 ], "consistent-return": "off", "curly": ["error", "multi-line"], "default-case": [ "error", { "commentPattern": "^no default$" } ], "default-case-last": "off", "dot-location": ["error", "property"], "eqeqeq": [ "error", "always", { "null": "ignore" } ], "grouped-accessor-pairs": "off", "guard-for-in": "error", "max-classes-per-file": ["error", 1], "no-alert": "warn", "no-caller": "error", "no-case-declarations": "error", "no-constructor-return": "off", "no-div-regex": "off", "no-else-return": [ "error", { "allowElseIf": false } ], "no-empty-pattern": "error", "no-eq-null": "off", "no-eval": "error", "no-extend-native": "error", "no-extra-bind": "error", "no-extra-label": "error", "no-fallthrough": "error", "no-floating-decimal": "error", "no-global-assign": [ "error", { "exceptions": [] } ], "no-implicit-coercion": [ "off", { "boolean": false, "number": true, "string": true, "allow": [] } ], "no-implicit-globals": "off", "no-implied-eval": "error", "no-iterator": "error", "no-labels": [ "error", { "allowLoop": false, "allowSwitch": false } ], "no-lone-blocks": "error", "no-loop-func": "error", "no-multi-spaces": [ "error", { "ignoreEOLComments": true, "exceptions": { "VariableDeclarator": true, "ImportDeclaration": true } } ], "no-multi-str": "error", "no-new": "error", "no-new-func": "error", "no-new-wrappers": "error", "no-octal": "error", "no-octal-escape": "error", "no-param-reassign": [ "warn", { "props": false } ], "no-proto": "error", "no-restricted-properties": [ "error", { "property": "__defineGetter__", "message": "Please use Object.defineProperty instead." }, { "property": "__defineSetter__", "message": "Please use Object.defineProperty instead." }, { "object": "global", "property": "isFinite", "message": "Please use Number.isFinite instead" }, { "object": "global", "property": "isNaN", "message": "Please use Number.isNaN instead" }, { "object": "window", "property": "isFinite", "message": "Please use Number.isFinite instead" }, { "object": "window", "property": "isNaN", "message": "Please use Number.isNaN instead" }, { "object": "self", "property": "isFinite", "message": "Please use Number.isFinite instead" }, { "object": "self", "property": "isNaN", "message": "Please use Number.isNaN instead" }, { "object": "arguments", "property": "callee", "message": "arguments.callee is deprecated" }, { "object": "Math", "property": "pow", "message": "Use the exponentiation operator (**) instead." } ], "no-return-assign": ["error", "except-parens"], "no-script-url": "error", "no-self-assign": [ "error", { "props": true } ], "no-self-compare": "error", "no-sequences": "error", "no-throw-literal": "error", "no-unmodified-loop-condition": "off", "no-unused-labels": "error", "no-useless-call": "off", "no-useless-catch": "error", "no-useless-concat": "error", "no-useless-escape": "error", "no-useless-return": "error", "no-void": "error", "no-warning-comments": [ "off", { "terms": ["todo", "fixme", "xxx"], "location": "start" } ], "no-with": "error", "prefer-promise-reject-errors": [ "off", { "allowEmptyReject": true } ], "prefer-named-capture-group": "off", "prefer-regex-literals": "off", "radix": "error", "require-unicode-regexp": "off", "vars-on-top": "error", "wrap-iife": [ "error", "outside", { "functionPrototypeMethods": false } ], "yoda": "error", "strict": ["error", "never"], "no-delete-var": "error", "no-label-var": "error", "no-restricted-globals": [ "error", "isFinite", "isNaN", "addEventListener", "blur", "close", "closed", "confirm", "defaultStatus", "defaultstatus", "event", "external", "find", "focus", "frameElement", "frames", "history", "innerHeight", "innerWidth", "length", "location", "locationbar", "menubar", "moveBy", "moveTo", "name", "onblur", "onerror", "onfocus", "onload", "onresize", "onunload", "open", "opener", "opera", "outerHeight", "outerWidth", "pageXOffset", "pageYOffset", "parent", "print", "removeEventListener", "resizeBy", "resizeTo", "screen", "screenLeft", "screenTop", "screenX", "screenY", "scroll", "scrollbars", "scrollBy", "scrollTo", "scrollX", "scrollY", "self", "status", "statusbar", "stop", "toolbar", "top" ], "no-shadow-restricted-names": "error", "no-undef": [ "error", { "typeof": false } ], "no-undef-init": "error", "no-undefined": "off", "array-bracket-newline": [ "off", "consistent" ], "array-bracket-spacing": [ "error", "never" ], "array-element-newline": [ "off", { "multiline": true, "minItems": 3 } ], "block-spacing": [ "error", "always" ], "camelcase": [ "error", { "properties": "never", "ignoreDestructuring": false } ], "capitalized-comments": [ "off", "never", { "line": { "ignorePattern": ".*", "ignoreInlineComments": true, "ignoreConsecutiveComments": true }, "block": { "ignorePattern": ".*", "ignoreInlineComments": true, "ignoreConsecutiveComments": true } } ], "comma-dangle": [ "error", "never" ], "comma-style": [ "error", "last", { "exceptions": { "ArrayExpression": false, "ArrayPattern": false, "ArrowFunctionExpression": false, "CallExpression": false, "FunctionDeclaration": false, "FunctionExpression": false, "ImportDeclaration": false, "ObjectExpression": false, "ObjectPattern": false, "VariableDeclaration": false, "NewExpression": false } } ], "computed-property-spacing": [ "error", "never" ], "consistent-this": "off", "eol-last": "off", "func-name-matching": [ "off", "always", { "includeCommonJSModuleExports": false, "considerPropertyDescriptor": true } ], "func-names": [ "error", "as-needed", { "generators": "as-needed" } ], "func-style": [ "off", "expression" ], "function-call-argument-newline": [ "off", "consistent" ], "function-paren-newline": [ "error", "consistent" ], "id-blacklist": "off", "id-denylist": "off", "id-length": "off", "id-match": "off", "implicit-arrow-linebreak": [ "error", "beside" ], "jsx-quotes": [ "off", "prefer-single" ], "key-spacing": [ "error", { "singleLine": { "beforeColon": false, "afterColon": true, "mode": "strict" }, "multiLine": { "beforeColon": false, "afterColon": true, "mode": "strict", "align": "value" } } ], "line-comment-position": [ "off", { "position": "above", "ignorePattern": "", "applyDefaultPatterns": true } ], "linebreak-style": [ "error", "unix" ], "lines-around-comment": "off", "lines-around-directive": [ "error", { "before": "always", "after": "always" } ], "max-depth": [ "off", 4 ], "max-len": [ "error", { "code": 140, "tabWidth": 4, "comments": 200, "ignoreUrls": true, "ignoreComments": false, "ignoreTrailingComments": true, "ignoreRegExpLiterals": true, "ignoreStrings": true, "ignoreTemplateLiterals": true } ], "max-lines": [ "off", { "max": 300, "skipBlankLines": true, "skipComments": true } ], "max-lines-per-function": [ "off", { "max": 50, "skipBlankLines": true, "skipComments": true, "IIFEs": true } ], "max-nested-callbacks": "off", "max-params": [ "off", 3 ], "max-statements": [ "off", 10 ], "max-statements-per-line": [ "off", { "max": 1 } ], "multiline-comment-style": [ "off", "starred-block" ], "multiline-ternary": [ "off", "never" ], "new-cap": [ "error", { "newIsCap": true, "newIsCapExceptions": [], "capIsNew": false, "capIsNewExceptions": [ "Immutable.Map", "Immutable.Set", "Immutable.List" ] } ], "new-parens": "error", "newline-after-var": "off", "newline-before-return": "off", "newline-per-chained-call": [ "error", { "ignoreChainWithDepth": 4 } ], "no-bitwise": "error", "no-continue": "error", "no-inline-comments": "off", "no-lonely-if": "error", "no-mixed-operators": [ "error", { "groups": [ [ "%", "**" ], [ "%", "+" ], [ "%", "-" ], [ "%", "*" ], [ "%", "/" ], [ "/", "*" ], [ "&", "|", "<<", ">>", ">>>" ], [ "==", "!=", "===", "!==" ], [ "&&", "||" ] ], "allowSamePrecedence": true } ], "no-mixed-spaces-and-tabs": "error", "no-multi-assign": [ "error" ], "no-multiple-empty-lines": [ "error", { "max": 2, "maxBOF": 0, "maxEOF": 0 } ], "no-negated-condition": "off", "no-nested-ternary": "off", "no-new-object": "error", "no-plusplus": "off", "no-restricted-syntax": [ "error", { "selector": "LabeledStatement", "message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand." }, { "selector": "WithStatement", "message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize." } ], "no-spaced-func": "error", "no-tabs": "error", "no-ternary": "off", "no-trailing-spaces": [ "error", { "skipBlankLines": false, "ignoreComments": false } ], "no-underscore-dangle": [ "error", { "allowAfterThis": true, "allowAfterSuper": false, "allowAfterThisConstructor": false, "enforceInMethodNames": false, "allowFunctionParams": false } ], "no-unneeded-ternary": [ "error", { "defaultAssignment": false } ], "no-whitespace-before-property": "error", "nonblock-statement-body-position": [ "error", "beside", { "overrides": { "while": "below" } } ], "object-curly-newline": [ "error", { "ObjectExpression": { "minProperties": 5, "multiline": true, "consistent": true }, "ObjectPattern": { "minProperties": 5, "multiline": true, "consistent": true }, "ImportDeclaration": { "minProperties": 5, "multiline": true, "consistent": true }, "ExportDeclaration": { "minProperties": 5, "multiline": true, "consistent": true } } ], "object-curly-spacing": [ "error", "never" ], "object-property-newline": [ "error", { "allowAllPropertiesOnSameLine": true } ], "one-var": [ "error", "never" ], "one-var-declaration-per-line": [ "error", "always" ], "operator-assignment": [ "error", "always" ], "operator-linebreak": [ "error", "after", { "overrides": { "=": "none" } } ], "padded-blocks": [ "error", { "classes": "always", "blocks": "never", "switches": "never" }, { "allowSingleLineBlocks": true } ], "padding-line-between-statements": [ "error", { "blankLine": "always", "prev": "class", "next": "*" }, { "blankLine": "never", "prev": "return", "next": "block" } ], "prefer-exponentiation-operator": "off", "prefer-object-spread": "warn", "quote-props": [ "error", "as-needed", { "keywords": false, "unnecessary": true, "numbers": false } ], "require-jsdoc": "off", "semi-spacing": [ "error", { "before": false, "after": true } ], "semi-style": [ "error", "last" ], "sort-keys": [ "off", "asc", { "caseSensitive": false, "natural": true } ], "sort-vars": "off", "space-before-blocks": "error", "space-in-parens": [ "error", "never" ], "space-infix-ops": "error", "space-unary-ops": [ "error", { "words": true, "nonwords": false, "overrides": {} } ], "spaced-comment": [ "error", "always", { "line": { "exceptions": [ "-", "+" ], "markers": [ "=", "!", "/" ] }, "block": { "exceptions": [ "-", "+" ], "markers": [ "=", "!", ":", "::" ], "balanced": true } } ], "switch-colon-spacing": [ "error", { "after": true, "before": false } ], "template-tag-spacing": [ "error", "never" ], "unicode-bom": [ "error", "never" ], "wrap-regex": "off", "arrow-body-style": "off", "arrow-spacing": [ "error", { "before": true, "after": true } ], "arrow-parens": "off", "constructor-super": "error", "generator-star-spacing": [ "error", { "before": false, "after": true } ], "no-class-assign": "error", "no-confusing-arrow": [ "error", { "allowParens": true } ], "no-const-assign": "error", "no-new-symbol": "error", "no-restricted-exports": [ "off", { "restrictedNamedExports": [ "default", "then" ] } ], "no-restricted-imports": [ "off", { "paths": [], "patterns": [] } ], "no-this-before-super": "error", "no-useless-computed-key": "error", "no-useless-rename": [ "error", { "ignoreDestructuring": false, "ignoreImport": false, "ignoreExport": false } ], "no-var": "error", "object-shorthand": [ "error", "always", { "ignoreConstructors": false, "avoidQuotes": true } ], "prefer-arrow-callback": [ "error", { "allowNamedFunctions": false, "allowUnboundThis": true } ], "prefer-const": [ "error", { "destructuring": "any", "ignoreReadBeforeAssign": true } ], "prefer-destructuring": [ "error", { "VariableDeclarator": { "array": false, "object": true }, "AssignmentExpression": { "array": true, "object": false } }, { "enforceForRenamedProperties": false } ], "prefer-numeric-literals": "error", "prefer-rest-params": "error", "prefer-spread": "error", "prefer-template": "error", "require-yield": "error", "rest-spread-spacing": ["error", "never"], "sort-imports": [ "off", { "ignoreCase": false, "ignoreDeclarationSort": false, "ignoreMemberSort": false, "memberSyntaxSortOrder": ["none", "all", "multiple", "single"] } ], "symbol-description": "error", "template-curly-spacing": "error", "yield-star-spacing": ["error", "after"], "brace-style": "off", "@typescript-eslint/brace-style": [ "error", "1tbs", { "allowSingleLine": true } ], "comma-spacing": "off", "@typescript-eslint/comma-spacing": [ "error", { "before": false, "after": true } ], "default-param-last": "off", "@typescript-eslint/default-param-last": ["error"], "dot-notation": "off", "@typescript-eslint/dot-notation": [ "error", { "allowKeywords": true } ], "func-call-spacing": "off", "@typescript-eslint/func-call-spacing": ["error", "never"], "indent": "off", "@typescript-eslint/indent": [ "error", 4, { "ArrayExpression": 1, "CallExpression": { "arguments": 1 }, "FunctionDeclaration": { "parameters": 1, "body": 1 }, "FunctionExpression": { "parameters": 1, "body": 1 }, "ImportDeclaration": 1, "ObjectExpression": 1, "SwitchCase": 1, "VariableDeclarator": { "var": 2, "let": 2, "const": 3 }, "flatTernaryExpressions": false, "ignoreComments": false, "ignoredNodes": [], "outerIIFEBody": 1 } ], "init-declarations": "off", "@typescript-eslint/init-declarations": ["off"], "keyword-spacing": "off", "@typescript-eslint/keyword-spacing": [ "error", { "before": true, "after": true, "overrides": { "return": { "after": true }, "throw": { "after": true }, "case": { "after": true } } } ], "lines-between-class-members": "off", "@typescript-eslint/lines-between-class-members": [ "error", "always", { "exceptAfterSingleLine": false } ], "no-array-constructor": "off", "@typescript-eslint/no-array-constructor": ["off"], "no-dupe-class-members": "off", "@typescript-eslint/no-dupe-class-members": ["error"], "no-duplicate-imports": "off", "@typescript-eslint/no-duplicate-imports": ["error"], "no-empty-function": "off", "@typescript-eslint/no-empty-function": [ "error", { "allow": ["arrowFunctions", "functions", "methods"] } ], "no-extra-parens": "off", "@typescript-eslint/no-extra-parens": [ "off", "all", { "conditionalAssign": true, "nestedBinaryExpressions": true, "returnAssign": false, "enforceForArrowConditionals": false } ], "no-extra-semi": "off", "@typescript-eslint/no-extra-semi": ["error"], "no-invalid-this": "off", "@typescript-eslint/no-invalid-this": ["error"], "no-loss-of-precision": "off", "@typescript-eslint/no-loss-of-precision": ["error"], "no-magic-numbers": "off", "@typescript-eslint/no-magic-numbers": [ "off", { "ignore": [], "ignoreArrayIndexes": true, "enforceConst": true, "detectObjects": false } ], "no-redeclare": "off", "@typescript-eslint/no-redeclare": ["error"], "no-shadow": "off", "@typescript-eslint/no-shadow": ["off", { "builtinGlobals": true, "hoist": "never", "ignoreTypeValueShadow": false, "ignoreFunctionTypeParameterNameValueShadow": false }], "no-unused-expressions": "off", "@typescript-eslint/no-unused-expressions": [ "error", { "allowShortCircuit": false, "allowTernary": false, "allowTaggedTemplates": false } ], "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": [ "warn", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true, "argsIgnorePattern": "[iI]gnored" } ], "no-use-before-define": "off", "@typescript-eslint/no-use-before-define": [ "error", { "functions": true, "classes": true, "variables": true, "typedefs": true } ], "no-useless-constructor": "off", "@typescript-eslint/no-useless-constructor": ["error"], "quotes": "off", "@typescript-eslint/quotes": [ "error", "single", { "allowTemplateLiterals": true } ], "require-await": "off", "@typescript-eslint/require-await": "error", "no-return-await": "off", "@typescript-eslint/return-await": ["error", "in-try-catch"], "semi": "off", "@typescript-eslint/semi": ["error", "always"], "space-before-function-paren": "off", "@typescript-eslint/space-before-function-paren": ["error", "never"], "@typescript-eslint/explicit-module-boundary-types": "off", "import/default": "error", "import/named": "error", "import/namespace": "error", "import/no-absolute-path": "error", "import/no-cycle": "error", "import/no-internal-modules": "off", "import/no-self-import": "error", "import/no-unresolved": "error", "import/no-useless-path-segments": [ "error", { "noUselessIndex": true } ], "import/export": "error", "import/no-deprecated": "warn", "import/no-mutable-exports": "warn", "import/no-named-as-default": "warn", "import/no-named-as-default-member": "warn", "import/no-unused-modules": [ "warn", { "missingExports": false, "unusedExports": true } ], "import/unambiguous": "warn", "import/no-amd": "warn", "import/extensions": [ "error", "ignorePackages", { "js": "never", "mjs": "never", "jsx": "never", "ts": "never", "tsx": "never" } ], "import/first": "error", "import/group-exports": "error", "import/newline-after-import": [ "error", { "count": 1 } ], "import/no-default-export": "error", "import/no-duplicates": "warn", "import/prefer-default-export": "off", "jsdoc/check-types": ["warn", { "unifyParentAndChildTypeChecks": true }], "jsdoc/require-jsdoc": [ "warn", { "checkConstructors": false, "checkGetters": true, "checkSetters": true, "contexts": ["ClassProperty"], "require": { "ArrowFunctionExpression": true, "ClassDeclaration": true, "ClassExpression": true, "FunctionDeclaration": true, "FunctionExpression": true, "MethodDefinition": true }, "enableFixer": true } ], "jsdoc/check-line-alignment": ["warn", "always"], "jsdoc/check-indentation": "warn", "jsdoc/check-param-names": [ "error", { "checkRestProperty": true, "enableFixer": true, "checkDestructured": true } ], "jsdoc/check-property-names": [ "error", { "enableFixer": true } ], "jsdoc/check-syntax": "warn", "jsdoc/empty-tags": "error", "jsdoc/require-hyphen-before-param-description": ["warn", "never"], "jsdoc/require-description": [ "warn", { "contexts": [ "ClassDeclaration" ], "descriptionStyle": "any", "checkGetters": false, "checkSetters": false } ], "jsdoc/require-param": [ "error", { "enableFixer": true, "enableRootFixer": true, "enableRestElementFixer": true, "checkRestProperty": true, "autoIncrementBase": 0, "checkConstructors": true, "checkGetters": true, "checkSetters": true, "checkDestructured": true } ], "jsdoc/require-param-type": "warn", "jsdoc/require-param-description": "off", "jsdoc/require-returns": [ "warn", { "checkConstructors": false, "checkGetters": true, "forceRequireReturn": false, "forceReturnsWithAsync": false } ], "jsdoc/require-returns-check": "warn", "jsdoc/require-returns-type": "error", "jsdoc/require-returns-description": "off" }, "settings": { "import/cache": { "lifetime": 5 }, "import/extensions": [".js", ".mjs", ".ts", ".d.ts", ".json"], "import/external-module-folders": ["node_modules", "node_modules/@types"], "import/parsers": { "@typescript-eslint/parser": [".ts", ".d.ts"] }, "import/resolver": { "node": { "extensions": [".js", ".mjs", ".ts", ".d.ts",".json"] } }, "jsdoc": { "mode": "typescript", "ignorePrivate": true, "tagNamePreference": { "inheritDoc": { "message": "Lowercase is prefered", "replacement": "inheritdoc" } } } } } ```Configuration `tsconfig.eslint.json`
```json { "extends": "./tsconfig.base.json", "include": [ "js/**/*", ".eslintrc.json", "tsconfig.json", "tsconfig.base.json", "tsconfig.eslint.json", "gulpfile.js", "jsdoc.json" ], "exclude": ["node_modules"] } ```Configuration `tsconfig.base.json`
```json { "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { "target": "ESNext", // Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. "module": "ESNext", // Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. "lib": [ // Specify library files to be included in the compilation. "ES2020", "DOM", "WebWorker" ], "allowJs": true, // Allow javascript files to be compiled. "checkJs": true, // Report errors in .js files. //"outDir": "build", // Redirect output structure to the directory. //"rootDir": ".", // Specify the root directory of input files. Use to control the output directory structure with --outDir. // Strict Checks "alwaysStrict": true, // Parse in strict mode and emit "use strict" for each source file "strict": true, // Enable all strict type-checking options. "noImplicitAny": true, // Raise error on expressions and declarations with an implied 'any' type. "strictPropertyInitialization": true, // Module Resolution Options "esModuleInterop": false, // Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. // Advanced Options "resolveJsonModule": true // Include modules imported with '.json' extension //"skipLibCheck": true //"baseUrl": "." }, "include": ["./js/**/*"] } ```package.json
```json { "name": "pathfinder-eve", "version": "2.0.0", "engines": { "node": "12.x" }, "description": "Pathfinder is a system mapping tool for EVE ONLINE", "root": true, "main": "index.php", "type": "module", "dependencies": { "easytimer.js": "^4.3.0", "jquery": "^3.5.1", "localforage": "^1.9.0", "mustache": "^4.0.1", "pnotify": "^5.1.2", "velocity-animate": "^2.0.6" }, "devDependencies": { "@types/node": "^14.14.2", "@typescript-eslint/eslint-plugin": "^4.5.0", "@typescript-eslint/parser": "^4.5.0", "ansi-colors": "^4.1.1", "eslint": "^7.12.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsdoc": "^30.7.3", "eslint-plugin-json": "^2.x.x", "fancy-log": "^1.3.3", "file-extension": "^4.0.5", "flat": "^5.0.2", "gulp": "^4.0.2", "gulp-autoprefixer": "^7.0.1", "gulp-brotli": "^3.0.0", "gulp-bytediff": "1.0.x", "gulp-clean-css": "^4.3.0", "gulp-debug": "^4.0.0", "gulp-filter": "^6.0.0", "gulp-gzip": "1.x.x", "gulp-if": "^3.0.0", "gulp-image-resize": "^0.13.1", "gulp-imagemin": "^7.1.0", "gulp-jshint": "2.1.x", "gulp-rename": "^2.0.0", "gulp-requirejs-optimize": "1.3.x", "gulp-sass": "^4.1.0", "gulp-sourcemaps": "^2.6.5", "gulp-uglify": "^3.0.2", "imagemin-webp": "^6.0.0", "jshint": "^2.12.0", "jshint-stylish": "^2.x.x", "lodash.padend": "4.6.x", "module-lookup-amd": "^6.2.0", "node-notifier": "^8.0.0", "node-sass": "^4.14.1", "pretty-bytes": "^5.4.1", "promised-del": "1.0.x", "rollup": "^2.32.1", "rollup-plugin-amd": "^4.0.0", "slash": "^3.0.0", "terminal-table": "0.0.x", "typescript": "^4.0.3", "uglify-es": "^3.0.x" }, "scripts": { "gulp": "gulp", "eslint": "eslint", "eslint-find-option-rules": "eslint-find-rules" }, "repository": { "type": "git", "url": "git+https://github.com/exodus4d/pathfinder.git" }, "browserslist": [ "last 2 versions", "> 2%", "not dead", "not IE 11" ], "keywords": [ "pathfinder", "exodus 4d", "eve online", "wormhole", "mapping" ], "author": "Exodus 4DWhat did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
What did you expect to happen? The issue happened just after the update from ESLint
v7.11.0
tov7.12.0
What else might be "special" on my setup?
*.mjs
extensionsMaybe this help to find the issue. I added some output in the stacktrace, right before the Error:
https://github.com/eslint/eslintrc/blob/04f3cae17fe07b2fd0b74fd3e88482b3094e75e3/lib/config-array-factory.js#L607-L609
shows
filePath: undefined
:One step back in trace: https://github.com/eslint/eslintrc/blob/04f3cae17fe07b2fd0b74fd3e88482b3094e75e3/lib/config-array-factory.js#L794-L803
shows
eslintRecommendedPath: undefined