[go: nahoru, domu]

Fix ESLint TS config for front_end/third_party

When we lint code in front_end/third_party, we do not want to lint any
of the code that is from the third party, which we commit to
front_end/third_party/X/package, where X is the name of the dependency.

However, we do want to lint any code we write directly in
front_end/third_party/X. This is why in the .eslintignore file, we only
ignore any code in the package subdirectory:

```
// Any third_party addition has its source code checked out into
// third_party/X/package, so we ignore that code as it's not code we author or
// own.
front_end/third_party/*/package/
```

However, we also have the ESLint specific tsconfig file, which
explicitly excluded all code in the front_end/third_party directory.
This caused linting to get confused when we added a new dependency:

```
0:0  error  Parsing error: ESLint was configured to run on <tsconfigRootDir>/front_end/third_party/csp_evaluator/csp_evaluator.ts using parserOptions.project: <tsconfigRootDir>/config/typescript/tsconfig.eslint.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
```

This is because the eslintignore told the checks to ignore only the
package directory, but the TSConfig file excluded all of the code,
including the files that we do want to lint.

The fix here is to remove the exclusion from the custom TSConfig, thus
ensuring that we treat the eslintignore file as the source of truth.

Bug: none
Change-Id: Ib32281a6a7567277ac732fa6d6120ff93940dafc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4584472
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kateryna Prokopenko <kprokopenko@chromium.org>
Reviewed-by: Kateryna Prokopenko <kprokopenko@chromium.org>
1 file changed
tree: d7db48d588e1a3d27030cd7727c91b13363a7e51
  1. .vscode/
  2. build_overrides/
  3. config/
  4. docs/
  5. extension-api/
  6. front_end/
  7. inspector_overlay/
  8. node_modules/
  9. scripts/
  10. test/
  11. third_party/
  12. v8/
  13. .clang-format
  14. .editorconfig
  15. .eslintignore
  16. .eslintrc.js
  17. .git-blame-ignore-revs
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .mailmap
  22. .npmignore
  23. .npmrc
  24. .style.yapf
  25. .stylelintignore
  26. .stylelintrc.json
  27. AUTHORS
  28. BUILD.gn
  29. codereview.settings
  30. DEPS
  31. LICENSE
  32. OWNERS
  33. package-lock.json
  34. package.json
  35. PRESUBMIT.py
  36. README.md
  37. tsconfig.json
  38. WATCHLISTS
README.md

Chrome DevTools frontend

npm package

The client-side of the Chrome DevTools, including all JS & CSS to run the DevTools webapp.

Source code

The frontend is available on chromium.googlesource.com.

Project documentation

Check out the project documentation for instructions to set up, use, and maintain a DevTools front-end checkout, as well as design guidelines, and architectural documentation.

Additional references

Source mirrors

DevTools frontend repository is mirrored on GitHub.

DevTools frontend is also available on NPM as the chrome-devtools-frontend package. It's not currently available via CJS or ES modules, so consuming this package in other tools may require some effort.

The version number of the npm package (e.g. 1.0.373466) refers to the Chromium commit position of latest frontend git commit. It's incremented with every Chromium commit, however the package is updated roughly daily.

Getting in touch