The prop value with an expression type of OptionalCallExpression could not be resolved. Please file issue to get this fixed immediately.
See original GitHub issueTell 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:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Looks like a
console.error
-ed message coming fromjsx-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.
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.