Nodejs.dev: Lint: `eslint` including extraneous artifacts (ie "/public") — might not be preferable.

Created on 23 Oct 2019  Â·  2Comments  Â·  Source: nodejs/nodejs.dev

Problem

ESLint will sometimes fail on statically generated content that is not meant to be committed into the code base (ie .gitignore).

The issue came up when trying to resolving CI issues related to #352, and where a local public folder was created as a result of triggering one of the scripts (TBD). Once generated, scripts suffered enormous lags and hooks seemed to fail without reasonably clear expectation of this being the cause.

This also meant steps needed to be taken before making a successful commit.

Resolution

  • [ ] The alternatives to pick from:

    • Delete the public folder — not always desirable
    • Add a .eslintignore entry for "/public" — adds more overhead to ensure it tracks generated and uncommitted code
    • Symbolically link .eslintignore -> .gitignore — reduces overhead but warrants clear mention in the file
  • [ ] This possible branches to land this on:

    • master
    • staging

I'm willing to make this PR as soon as we decide on the above.

/cc @nodejs/website-redesign

bug build

Most helpful comment

public directory is a production version of the site, so we don't need to check for linting/formatting in there.

Already added in #326

All 2 comments

public directory is a production version of the site, so we don't need to check for linting/formatting in there.

Already added in #326

Bug fixed in #326

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jemjam picture jemjam  Â·  3Comments

marcustisater picture marcustisater  Â·  4Comments

benhalverson picture benhalverson  Â·  3Comments

antsmartian picture antsmartian  Â·  3Comments

mmarchini picture mmarchini  Â·  4Comments