build: also lint mjs files (#44581)

This commit is contained in:
Samuel Attard 2024-11-06 15:46:09 -08:00 committed by GitHub
parent ea7b0a4cc8
commit e3d75b3087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 18 deletions

View file

@ -138,7 +138,7 @@ const LINTERS = [{
key: 'javascript',
roots: ['build', 'default_app', 'lib', 'npm', 'script', 'spec'],
ignoreRoots: ['spec/node_modules'],
test: filename => filename.endsWith('.js') || filename.endsWith('.ts'),
test: filename => filename.endsWith('.js') || filename.endsWith('.ts') || filename.endsWith('.mjs'),
run: async (opts, filenames) => {
const eslint = new ESLint({
// Do not use the lint cache on CI builds