nextstrain / nextstrain.org

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

Don't use Gatsby's default ESLint rules #690

Closed victorlin closed 1 year ago

victorlin commented 1 year ago

Description of proposed changes

To keep things simple, the existing top-level ESLint configuration is intended to apply for the entire repository.

5c0f68f49607a4376b2e66496c3019fad9ec396c removed all per-line exceptions in static-site/ under the assumption that ESLint was never run within that directory due to ignore patterns. I now realize that is not entirely true.

By default, Gatsby uses a predefined ESLint configuration. It has been used here for a while, most likely unintentionally since static-site/ is ignored in the top-level config.

Override it with an empty configuration file in the Gatsby project root.

Notes:

  1. Gatsby only runs ESLint during develop and not build, which is why this wasn't caught by CI.
  2. Gatsby will still run ESLint and add its own custom rules. This empty file just prevents the default config from being used.

Related issue(s)

Testing

trvrb commented 1 year ago

Looks great to me. Thanks for tracking this down and providing the comprehensive fix Victor.