Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have installed every version since version 12, unable to overcome bug #1898

Open
alilland opened this issue Apr 7, 2023 · 0 comments
Open

Comments

@alilland
Copy link

alilland commented Apr 7, 2023

What version of this package are you using?
currently using v12, error message shows the JSX file that the bug is being thrown in v13, have tried versions all the way up to 17, version 17 throws different errors

What operating system, Node.js, and npm version?
v16.15.0

What happened?
I get the following error

$ yarn standard
$ /Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/.bin/standard
standard: Unexpected linter output:

TypeError: Cannot read properties of null (reading 'range')
    at SourceCode.getTokenBefore (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/token-store/index.js:303:18)
    at checkSpacingBefore (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/rules/template-curly-spacing.js:52:42)
    at TemplateElement (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/rules/template-curly-spacing.js:117:17)
    at /Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/util/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/util/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/util/node-event-generator.js:251:26)
    at NodeEventGenerator.applySelectors (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/util/node-event-generator.js:280:22)
    at NodeEventGenerator.enterNode (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/util/node-event-generator.js:294:14)
    at CodePathAnalyzer.enterNode (/Users/aronlilland/Documents/dev/controlair/backbone-ui/applications/backbone/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:632:23)

If you think this is a bug in `standard`, open an issue: https://github.com/standard/standard/issues

it appears to have issues when parsing this line of JSX {opt.overrideOn

<TableRowColumn colSpan={1} style={{ textAlign: 'center' }}>
  {opt.overrideOn
    ? (opt.inputQuantity || 0) * opt.overrideHours
    : (opt.inputQuantity || 0) * opt.standardRate
  }
</TableRowColumn>

What did you expect to happen?
expecting to see CLI output of what needs to be linted

Are you willing to submit a pull request to fix this bug?
yes, but dont know where to start, dont understand the issue - seems to be something with eslint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant