GoogleChrome / chromium-dashboard

Chrome Status Dashboard
https://www.chromestatus.com
Apache License 2.0
641 stars 372 forks source link

linting for Python is broken #4559

Open KyleJu opened 4 days ago

KyleJu commented 4 days ago

The linting for Python isn't working currently, as it is not analyzing any files:

Run npm run lint

> lint
> prettier client-src/js-src client-src/elements --check && eslint "client-src/js-src/**/*.{js,ts}" && tsc -p tsconfig.json && lit-analyzer "client-src/elements/chromedash-!(featurelist)*.js"

Checking formatting...
(node:2190) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
All matched files use Prettier code style!

  ✖ Couldn't find any files to analyze

  ✓ Found 0 problems in 0 files

e.g https://github.com/GoogleChrome/chromium-dashboard/actions/runs/11823294287/job/32942285509

dv8081 commented 3 days ago

@KyleJu can you please assign this to me.

jrobbins commented 3 days ago

The lint target is actually looking at JS and TS code, not python. I believe that the problem is the last part of the command: lit-analyzer "client-src/elements/chromedash-!(featurelist)*.js" We no longer have any *.js files in that directory because they were all converted to *.ts.

So, the fix is to change the command to also look at *.ts. However, we have some lit-analyzer errors that need to be addressed as part of that change.

jrobbins commented 3 days ago

In addition to the problem with npm run lint commented on above, there is also a problem with npm run pylint. We need to configure pylint to match our indentation conventions and then address a bunch of remaining lint items.