question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error arfter upgrade 7.11.0 ->7.12.0 " The "path" argument must be of type string. Received undefined"

See original GitHub issue

Tell us about your environment

  • ESLint Version: 7.12.0
  • Node Version: 15.0.1
  • npm Version: 7.0.3
  • OS: Win10

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`
{
  "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`
{
  "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`
{
  "$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
{
  "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 4D <pathfinder@exodus4d.de> (https://github.com/exodus4d)",
  "license": "MIT",
  "bugs": {
    "url": "https://github.com/exodus4d/pathfinder/issues",
    "email": "pathfinder@exodus4d.de"
  },
  "homepage": "https://github.com/exodus4d/pathfinder#readme",
  "private": true
}

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

G:\webpages\pathfinder>npm run eslint -c ".eslintrc.json" ".\js\app\conf\appConfig.mjs"

> pathfinder-eve@2.0.0 eslint
> eslint ".\\js\\app\\conf\\appConfig.mjs"

Oops! Something went wrong! :(

ESLint: 7.12.0

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:258:15)
    at validateString (node:internal/validators:123:11)
    at Object.extname (node:path:752:5)
    at loadConfigFile (G:\webpages\pathfinder\node_modules\@eslint\eslintrc\lib\config-array-factory.js:305:18)
    at ConfigArrayFactory._loadConfigData (G:\webpages\pathfinder\node_modules\@eslint\eslintrc\lib\config-array-factory.js:608:42)
    at ConfigArrayFactory._loadExtendedBuiltInConfig (G:\webpages\pathfinder\node_modules\@eslint\eslintrc\lib\config-array-factory.js:801:25)
    at ConfigArrayFactory._loadExtends (G:\webpages\pathfinder\node_modules\@eslint\eslintrc\lib\config-array-factory.js:777:29)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (G:\webpages\pathfinder\node_modules\@eslint\eslintrc\lib\config-array-factory.js:721:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (G:\webpages\pathfinder\node_modules\@eslint\eslintrc\lib\config-array-factory.js:666:20)
npm ERR! code 2
npm ERR! path G:\webpages\pathfinder
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c "eslint ".\\js\\app\\conf\\appConfig.mjs""

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Exodus~1\AppData\Roaming\npm-cache\_logs\2020-10-24T18_00_36_266Z-debug.log

What did you expect to happen? The issue happened just after the update from ESLint v7.11.0 to v7.12.0

What else might be “special” on my setup?

  • I use typescript parser for a JS-only project (because of JSDoc include() types).
  • Module files have *.mjs extensions

Maybe this help to find the issue. I added some output in the stacktrace, right before the Error:

  1. https://github.com/eslint/eslintrc/blob/04f3cae17fe07b2fd0b74fd3e88482b3094e75e3/lib/config-array-factory.js#L607-L609
    _loadConfigData(ctx) {
        console.dir(ctx)
        return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);
    }

shows filePath: undefined:

{
  filePath: undefined,
  matchBasePath: 'G:\\webpages\\pathfinder',
  name: '.eslintrc.json » eslint:recommended',
  pluginBasePath: 'G:\\webpages\\pathfinder',
  type: 'config'
}
  1. One step back in trace: https://github.com/eslint/eslintrc/blob/04f3cae17fe07b2fd0b74fd3e88482b3094e75e3/lib/config-array-factory.js#L794-L803
    _loadExtendedBuiltInConfig(extendName, ctx) {
        const { eslintAllPath, eslintRecommendedPath } = internalSlotsMap.get(this);
        if (extendName === "eslint:recommended") {
            console.dir(internalSlotsMap.get(this));
            return this._loadConfigData({
                ...ctx,
                filePath: eslintRecommendedPath,
                name: `${ctx.name} » ${extendName}`
            });
        }

shows eslintRecommendedPath: undefined

{
  additionalPluginPool: Map(0) {},
  cwd: 'G:\\webpages\\pathfinder',
  resolvePluginsRelativeTo: undefined,
  builtInRules: Map(0) {},
  resolver: { resolve: [Function: resolve] },
  eslintAllPath: undefined,
  eslintRecommendedPath: undefined
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
mdjermanoviccommented, Oct 25, 2020

@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

0reactions
mdjermanoviccommented, Oct 25, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - The "path" argument must be of type string. Received ...
I received this exact error from eslint while running node 10.0. After investigating the call stack, I found a dependency was using a...
Read more >
module build failed: typeerror [err_invalid_arg_type]: the "from ...
ModuleBuildError: Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined.
Read more >
Puppet release notes
Puppet::Util::Windows is undefined on non-Windows platforms. Fixed a bug ... The generate types command does not handle errors correctly ... Puppet 7.12.0.
Read more >
NEWS
Version 7.3.0. Bug fixes. Accommodate rlang 's new interpolation operator {{ , which was causing make() to fail when drake_plan() commands are ...
Read more >
Changelog - curl
ngtcp2: fix build errors due to changes in ngtcp2 library; ngtcp2: fix C89 compliance nit; noproxy: support proxies specified using cidr notation ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found