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

Eslint failing in make check #2145

Open
jaredlockhart opened this issue Mar 17, 2020 · 2 comments
Open

Eslint failing in make check #2145

jaredlockhart opened this issue Mar 17, 2020 · 2 comments

Comments

@jaredlockhart
Copy link
Collaborator

I just got a failure on eslint on master @ 680e222

===============================================================================
FAILED: eslint
===============================================================================
yarn run v1.22.4
$ /app/node_modules/.bin/eslint client/actions/tests/test_show-heartbeat.js client/utils/closest.js client/actions/tests/utils.js client/actions/console-log/index.js client/actions/tests/test_preference-experiment.js client/actions/show-heartbeat/index.js client/actions/opt-out-study/index.js karma.conf.js normandy/base/management/commands/data/console-log.js client/actions/tests/index.js webpack.config.js client/actions/utils.js client/actions/preference-experiment/index.js babel.config.js client/actions/tests/test_opt-out-study.js client/actions/tests/test_console-log.js client/tests/utils.js client/utils/absolute-path.js
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

-------------------------------------------------------------------------------
Additional error output:
-------------------------------------------------------------------------------
TypeError: Cannot read property 'range' of null
Occurred while linting /app/client/actions/tests/test_show-heartbeat.js:395
    at SourceCode.getTokenBefore (/app/node_modules/eslint/lib/source-code/token-store/index.js:298:18)
    at checkSpacingBefore (/app/node_modules/eslint/lib/rules/template-curly-spacing.js:60:42)
    at TemplateElement (/app/node_modules/eslint/lib/rules/template-curly-spacing.js:119:17)
    at listeners.(anonymous function).forEach.listener (/app/node_modules/eslint/lib/linter/safe-emitter.js:45:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/app/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/app/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
    at NodeEventGenerator.applySelectors (/app/node_modules/eslint/lib/linter/node-event-generator.js:283:22)
    at NodeEventGenerator.enterNode (/app/node_modules/eslint/lib/linter/node-event-generator.js:297:14)
    at CodePathAnalyzer.enterNode (/app/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:634:23)
error Command failed with exit code 2.

-------------------------------------------------------------------------------
Completed in: 14.09s
make: *** [lint] Error 2
@jaredlockhart jaredlockhart mentioned this issue Mar 17, 2020
21 tasks
@mythmon
Copy link
Contributor

mythmon commented Mar 17, 2020

I took a survey of git history trying to figure out where this stopped working. As far as I can tell, make lint has never worked. Or at least, it doesn't work or me today when I check out the commit was introduced in, and it doesn't work today in master. I also tried various points in between. They all produce the error above.

I tried a couple different things to figure out why this isn't working. I tried to make sure my non-docker set up was all to date (it is). I looked for differences in the node_modules directory I'm using compared to what Docker is using (all the packages and versions are the same, compared to yarn list). I tried to run the same therapist command on both (it worked fine outside, is broken inside).

@jaredlockhart
Copy link
Collaborator Author

Looks like this: babel/babel-eslint#681

mythmon added a commit to mythmon/normandy that referenced this issue Mar 23, 2020
I don't understand why, but this seems to help mozilla#2145.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants