Skip to content

web: lint root `*.js` files

Warren Gifford requested to merge vb/tsconfig-eslint into main

Created by: valerybugakov

Context

Resolving the issue uncovered in this PR: https://github.com/sourcegraph/sourcegraph/pull/33979.

Screen Shot 2022-04-20 at 11 57 20

The error reported here means that the file .eslintrc.js itself is both:

  1. Provided to ESLint as an input file to be checked.
  2. Doesn't match the list of files it's supposed to lint according to the tsconfig.json provided in parserOptions.

Changes

  • Root .js files are now linted by yarn lint:js:all command.
  • The error is fixed by creating a separate tsconfig.eslint.json which includes .js files to keep ESLint happy.

Test plan

yarn lint:js:all should lint .js files in the repo's root.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading