nextstrain / nextstrain.org

The Nextstrain website
https://nextstrain.org
GNU Affero General Public License v3.0
87 stars 49 forks source link

ESLintError prevents running gatsby develop #689

Closed trvrb closed 1 year ago

trvrb commented 1 year ago

Current Behavior

With the just merged linter rules update PR #688, I now get the following behavior. If I run:

cd static-site
rm -rf node_modules/
npm ci
npm run develop

I get the following error:

Generating development JavaScript bundle failed

/Users/trvrb/Documents/src/nextstrain.org/static-site/src/util/parseMarkdown.js
  55:32  error  Unexpected use of 'location'  no-restricted-globals

✖ 1 problem (1 error, 0 warnings)

File: src/util/parseMarkdown.js

failed Building development bundle - 7.859s

I can resolve the error either by commenting the line in question with // eslint-disable-line or I can revert back to 8570806b8836330ddf03f9c78be8ce415b6567d9 (before merge of #688).

@victorlin: Can you reproduce the issue?

Possible solution

Restore the // eslint-disable-line at this line.

Your environment: if running Nextstrain locally

victorlin commented 1 year ago

I can reproduce. Will create a PR to fix this.

trvrb commented 1 year ago

Awesome! I can confirm that PR #690 resolves this issue for me.