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.

The prop value with an expression type of OptionalCallExpression could not be resolved. Please file issue to get this fixed immediately.

See original GitHub issue

Tell us about your environment

  • ESLint Version: 6.8.0
  • Node Version: 13.8.0
  • npm Version: 6.13.6
  • yarn Version: 1.22.4

What parser (default, Babel-ESLint, etc.) are you using? babel-eslint, typescript-eslint Please show your full configuration:

Configuration
const path = require('path');

module.exports = {
  env: {
    browser: true,
    commonjs: true,
    es6: true,
    jest: true,
    node: true,
  },
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/recommended',
    'prettier',
    'prettier/@typescript-eslint',
    'plugin:jsx-a11y/recommended',
  ],
  globals: {
    BROWSER: 'readonly',
    CHECKIN: 'readonly',
    DELIVERY: 'readonly',
    google: 'readonly',
    ga: 'readonly',
  },
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaFeatures: {
      jsx: true, // Allows for the parsing of JSX
    },
    ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
    project: path.resolve(process.cwd(), 'tsconfig.json'),
    tsconfigRootDir: process.cwd(),
    sourceType: 'module', // Allows for the use of imports
  },
  plugins: [
    '@typescript-eslint',
    'react',
    'import',
    'sort-imports-es6-autofix',
    'jsx-a11y',
    'react-hooks',
  ],
  rules: {
    'arrow-parens': 'warn',
    camelcase: 'off',
    indent: 'off',
    'import/first': 'warn',
    'import/newline-after-import': 'warn',
    'import/no-amd': 'warn',
    'no-duplicate-imports': 'warn',
    'sort-imports-es6-autofix/sort-imports-es6': [
      'error',
      {
        ignoreCase: false,
        ignoreMemberSort: false,
        memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
      },
    ],
    '@typescript-eslint/camelcase': 'warn',
    'new-parens': 'warn',
    'no-bitwise': 'warn',
    'no-caller': 'warn',
    'no-console': 'warn',
    'quote-props': ['warn', 'as-needed'],
    'no-array-constructor': 'off',
    semi: 'warn',
    // 'comma-dangle': ['warn', 'always'], //will have to reenable once working correctly
    // 'no-underscore-dangle': ['warn', { 'allowAfterThis': true }], was turned on, haven't foudn exactl equivalent yet
    '@typescript-eslint/array-type': 'off',
    '@typescript-eslint/explicit-function-return-type': 'off',
    '@typescript-eslint/explicit-member-accessibility': 'off',
    '@typescript-eslint/indent': 'off',
    'no-unused-vars': 'off',
    '@typescript-eslint/no-unused-vars': [
      'warn',
      { vars: 'all', args: 'none', ignoreRestSiblings: true },
    ], // being handled By TS no unused locals
    '@typescript-eslint/no-explicit-any': 'off',
    '@typescript-eslint/interface-name-prefix': 'off',
    '@typescript-eslint/no-array-constructor': 'warn',
    '@typescript-eslint/no-explicit-any': 'off',
    'no-use-before-define': ['warn', { functions: false, variables: false, classes: false }],
    '@typescript-eslint/no-use-before-define': [
      'warn',
      { functions: false, variables: false, classes: false, typedefs: false },
    ], // only check scopes for variables
    'no-constant-condition': ['warn', { checkLoops: false }],
    // eslint-plugin-react
    'react/forbid-foreign-prop-types': ['warn', { allowInPropTypes: true }],
    'react/jsx-no-comment-textnodes': 'warn',
    'react/jsx-no-duplicate-props': ['warn', { ignoreCase: false }],
    'react/jsx-no-target-blank': 'warn',
    'react/jsx-no-undef': 'error',
    'react/jsx-pascal-case': [
      'warn',
      {
        allowAllCaps: true,
        ignore: [],
      },
    ],
    'react/jsx-uses-react': 'warn',
    'react/jsx-uses-vars': [2],
    'react/no-danger-with-children': 'warn',
    // Disabled because of undesirable warnings
    // See https://github.com/facebook/create-react-app/issues/5204 for
    // blockers until its re-enabled
    // 'react/no-deprecated': 'warn',
    'react/no-direct-mutation-state': 'warn',
    'react/no-is-mounted': 'warn',
    'react/no-typos': 'warn',
    'react/react-in-jsx-scope': 'error',
    'react/require-render-return': 'error',
    'react/style-prop-object': 'warn',
    'jsx-a11y/click-events-have-key-events': 'off',
    'react-hooks/rules-of-hooks': 'warn',
    'react-hooks/exhaustive-deps': 'warn',
  },
  settings: {
    react: {
      version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
    },
    'import/parsers': {
      'typescript-eslint-parser': ['.ts', '.tsx'],
    },
  },
};

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

$ npx eslint --cache --cache-location ./.eslint-cache -c .eslintrc.js  --no-eslintrc --max-warnings 0 'src/js/**/*.{ts,tsx,js,jsx}' '../shared/src/**/*.{ts,tsx,js,jsx}'
The prop value with an expression type of OptionalCallExpression could not be resolved. Please file issue to get this fixed immediately.
✨  Done in 56.04s.

npx eslint --cache --cache-location ./.eslint-cache -c .eslintrc.js  --no-eslintrc --max-warnings 0 'src/js/**/*.{ts,tsx,js,jsx}' '../shared/src/**/*.{ts,tsx,js,jsx}'

What did you expect to happen? not to see the message about filing an issue.

What actually happened? Please include the actual, raw output from ESLint. $ npx eslint --cache --cache-location ./.eslint-cache -c .eslintrc.js --no-eslintrc --max-warnings 0 ‘src/js//*.{ts,tsx,js,jsx}’ '…/shared/src//*.{ts,tsx,js,jsx}’ The prop value with an expression type of OptionalCallExpression could not be resolved. Please file issue to get this fixed immediately. ✨ Done in 56.04s. Are you willing to submit a pull request to fix this bug?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mdjermanoviccommented, Apr 8, 2020

Looks like a console.error-ed message coming from jsx-ast-utils, see this line.

This lib is used by some react/jsx plugins.

It might be good to file an issue in jsx-ast-utils repo.

0reactions
eslint-deprecated[bot]commented, May 11, 2020

Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting this error: The prop value with an expression type ...
I am getting this error: The prop value with an expression type of Chain Expression could not be resolved. Please file is Failed...
Read more >
eslint/eslint - Gitter
This can happen for a couple different reasons: 1. If ESLint is installed globally, then make sure eslint-plugin-prefer-object-spread is also installed globally ...
Read more >
ses - UNPKG
If it is absent, this should be an adequate ... Does not make anything worse, since the ... 262, // TODO https://github.com/Agoric/SES-shim/issues/551.
Read more >
minsung/node_modules/prettier/esm/parser-typescript.mjs
n This option cannot be used with --cursor-offset. ... pe(){const e=v(["\n Maintain existing\n (mixed values within one file are normalised ...
Read more >
Files changed (87) - Renovate Bot Package Diff
+ * [`prop-types`]: fix Cannot read property 'type' of undefined error when ... + * [`jsx-no-useless-fragment`]: accept fragments with call expressions ...
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