mozilla / normandy

Firefox recipe server
https://wiki.mozilla.org/Firefox/Recipe_Server
Mozilla Public License 2.0
54 stars 46 forks source link

Eslint failing in make check #2145

Open jaredlockhart opened 4 years ago

jaredlockhart commented 4 years ago

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

===============================================================================
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
mythmon commented 4 years ago

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 commented 4 years ago

Looks like this: https://github.com/babel/babel-eslint/issues/681