commit | a21b3e4f064b3a6f39f153508b1a7041b4176c9e | [log] [tgz] |
---|---|---|
author | dpapad <[email protected]> | Mon Mar 18 23:51:34 2024 |
committer | Chromium LUCI CQ <[email protected]> | Mon Mar 18 23:51:34 2024 |
tree | f02dbe4d1c97a27e79fbbb9ba5c734e2aa89bc22 | |
parent | d9e30b3ab84420f836d41f75ed3e77f85e2fdc2e [diff] |
WebUI: Disallow extension-less JS imports via ESLint, part 2 (last). In this part adding a new no-restricted-syntax ESLint check that catches such violations. Per the JS styleguide at [1] all JS import statements should explitcly specify the file extension. The TS styleguide does not seem to have that requirement and shows examples where the extension is omitted [2]. Given the prevalence of non-extensionless imports in Chromium's codebase it seems better to follow the JS styleguide for both JS and TS to be consistent with the vast majority of existing code. [1] https://google.github.io/styleguide/jsguide.html#es-module-imports [2] https://google.github.io/styleguide/tsguide.html#imports Bug: 40519637 Change-Id: Ic941f5b4b648d8a8f1780fdeef3e348b6e44fedf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5375665 Commit-Queue: Demetrios Papadopoulos <[email protected]> Reviewed-by: Rebekah Potter <[email protected]> Cr-Commit-Position: refs/heads/main@{#1274565}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.