Skip to content

Commit

Permalink
Merge branch 'lint-batches-chipper-1484'
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 5, 2024
2 parents 4220f3c + 20b1e35 commit ff70159
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 67 deletions.
60 changes: 0 additions & 60 deletions js/grunt/chipAway.js

This file was deleted.

7 changes: 4 additions & 3 deletions js/grunt/tasks/lint-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
*/

import * as grunt from 'grunt';
import lint, { getLintOptions } from '../../../../perennial-alias/js/grunt/lint.js';
import lint from '../../../../perennial-alias/js/eslint/lint.js';
import getBrands from '../../../../perennial-alias/js/grunt/tasks/util/getBrands.js';
import getRepo from '../../../../perennial-alias/js/grunt/tasks/util/getRepo.js';
import getPhetLibs from '../getPhetLibs.js';
import getLintOptions from '../../../../perennial-alias/js/eslint/getLintOptions.js';

const repo = getRepo();

Expand All @@ -21,10 +22,10 @@ const brands = getBrands( repo );
*/
export const lintAll = ( async () => {

const lintReturnValue = await lint( getLintOptions( { repos: getPhetLibs( repo, brands ) } ) );
const lintSuccess = await lint( getLintOptions( { repos: getPhetLibs( repo, brands ) } ) );

// Output results on errors.
if ( !lintReturnValue.ok ) {
if ( !lintSuccess ) {
grunt.fail.fatal( 'Lint failed' );
}
else {
Expand Down
8 changes: 4 additions & 4 deletions js/scripts/hook-pre-commit-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import Transpiler from '../../../chipper/js/common/Transpiler';
import reportMedia from '../../../chipper/js/grunt/reportMedia.js';
import getRepoList from '../../../perennial-alias/js/common/getRepoList';
import withServer from '../../../perennial-alias/js/common/withServer';
import lint from '../../../perennial-alias/js/eslint/lint';
import check from '../../../perennial-alias/js/grunt/check';
import lint from '../../../perennial-alias/js/grunt/lint';
import puppeteerQUnit from '../../../perennial-alias/js/test/puppeteerQUnit.js';
import getPhetLibs from '../grunt/getPhetLibs';
import generatePhetioMacroAPI from '../phet-io/generatePhetioMacroAPI.js';
Expand Down Expand Up @@ -45,9 +45,9 @@ const repo = getArg( 'repo' );

// Run lint tests if they exist in the checked-out SHAs.
// lint() automatically filters out non-lintable repos
const lintReturnValue = await lint( { repos: [ repo ] } );
outputToConsole && console.log( `Linting had ${lintReturnValue.ok ? 'no ' : ''}errors.` );
process.exit( lintReturnValue.ok ? 0 : 1 );
const lintSuccess = await lint( { repos: [ repo ] } );
outputToConsole && console.log( `Linting had ${lintSuccess ? 'no ' : ''}errors.` );
process.exit( lintSuccess ? 0 : 1 );
}

else if ( command === 'report-media' ) {
Expand Down

0 comments on commit ff70159

Please sign in to comment.