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
5 changed files with 21 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
import { parseDocs } from '@electron/docs-parser';
import { promises } from 'node:fs';
import { resolve } from 'node:path';

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