Skip to content

Commit

Permalink
Upgrade to ESLint 9 and flat config, see phetsims/chipper#1474
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Sep 26, 2024
1 parent 72af85f commit ebea69e
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 17 deletions.
2 changes: 1 addition & 1 deletion js/browser-tools/MultiSnapshotComparison.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2022-2024, University of Colorado Boulder
// eslint-disable-next-line bad-typescript-text
// eslint-disable-next-line phet/bad-typescript-text
// @ts-nocheck
/**
* Snapshot comparison across multiple running urls
Expand Down
3 changes: 1 addition & 2 deletions js/browser-tools/take-snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*
* @author Jonathan Olson <jonathan.olson@colorado.edu>
*/

/* eslint-disable bad-phet-library-text */


const options = QueryStringMachine.getAll( {

Expand Down
4 changes: 3 additions & 1 deletion js/local/puppeteerHelpCT.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ process.on( 'SIGINT', () => process.exit() );
( async () => {

assert( process.argv[ 2 ], 'usage: node puppeteerHelpCT {{SOME_IDENTIFIER_HERE}}' );
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {

await puppeteerLoad( `https://sparky.colorado.edu/continuous-testing/aqua/html/continuous-loop.html?id=localPuppeteer${process.argv[ 2 ]}`, {
waitAfterLoad: 100000,
Expand Down
4 changes: 3 additions & 1 deletion js/report/quickStatusProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const quickStatusProperty = new Property( {} );

// Snapshot quick status loop
( async () => {
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {
const result = await request( '/quickserver/status' );
if ( result ) {
quickStatusProperty.value = result;
Expand Down
4 changes: 3 additions & 1 deletion js/report/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ if ( options.full ) {

// Report loop
( async () => {
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {
const result = await request( '/aquaserver/report' );
if ( result ) {
reportProperty.value = result;
Expand Down
4 changes: 3 additions & 1 deletion js/report/statusProperty.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const startupTimestampProperty = new NumberProperty( 0 );

// Snapshot status loop
( async () => {
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {
const result = await request( '/aquaserver/status' );
if ( result ) {
statusProperty.value = result.status;
Expand Down
16 changes: 12 additions & 4 deletions js/server/ContinuousServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,9 @@ class ContinuousServer {
* @public
*/
async localTaskLoop() {
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {
try {
if ( this.snapshots.length === 0 ) {
await sleep( 1000 );
Expand Down Expand Up @@ -693,7 +695,9 @@ class ContinuousServer {
* @public
*/
async computeWeightsLoop() {
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {
try {
this.computeRecentTestWeights();
}
Expand All @@ -710,7 +714,9 @@ class ContinuousServer {
* @public
*/
async autosaveLoop() {
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {
try {
this.saveToFile();
}
Expand All @@ -726,7 +732,9 @@ class ContinuousServer {
* @public
*/
async generateReportLoop() {
while ( true ) { // eslint-disable-line no-constant-condition

// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {
try {
winston.info( 'Generating Report' );
const testNameMap = {};
Expand Down
5 changes: 3 additions & 2 deletions js/server/ContinuousServerClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
const _ = require( 'lodash' );
const path = require( 'path' );
const assert = require( 'assert' );
const { Worker } = require( 'worker_threads' ); // eslint-disable-line require-statement-match
const { Worker } = require( 'worker_threads' ); // eslint-disable-line phet/require-statement-match
const sleep = require( '../../../perennial/js/common/sleep' );

process.on( 'SIGINT', () => process.exit( 0 ) );
Expand Down Expand Up @@ -89,7 +89,8 @@ class ContinuousServerClient {
console.log( `ctID: ${this.ctID}` );
console.log( `serverURL: ${this.serverURL}` );

while ( true ) { // eslint-disable-line no-constant-condition
// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {

// Always keep this many workers chugging away
while ( this.puppeteerWorkers.length < this.numberOfPuppeteers ) {
Expand Down
3 changes: 2 additions & 1 deletion js/server/QuickServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class QuickServer {
browser: browser
};

while ( true ) { // eslint-disable-line no-constant-condition
// TODO: What happened to no-constant-condition? See https://github.com/phetsims/chipper/issues/1451
while ( true ) {

// Run the test, and let us know if we should wait for next test, or proceed immediately.
await this.runQuickTest();
Expand Down
2 changes: 1 addition & 1 deletion js/server/playwrightCTClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

const assert = require( 'assert' );
const playwrightLoad = require( '../../../perennial/js/common/playwrightLoad' );
const { parentPort } = require( 'worker_threads' ); // eslint-disable-line require-statement-match
const { parentPort } = require( 'worker_threads' ); // eslint-disable-line phet/require-statement-match
const playwright = require( '../../../perennial/node_modules/playwright' );

process.on( 'SIGINT', () => process.exit() );
Expand Down
2 changes: 1 addition & 1 deletion js/server/puppeteerCTClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const assert = require( 'assert' );
const path = require( 'path' );
const puppeteerLoad = require( '../../../perennial/js/common/puppeteerLoad' );
const { parentPort } = require( 'worker_threads' ); // eslint-disable-line require-statement-match
const { parentPort } = require( 'worker_threads' ); // eslint-disable-line phet/require-statement-match

process.on( 'SIGINT', () => process.exit() );

Expand Down
2 changes: 1 addition & 1 deletion js/server/sendSlackMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

const buildLocal = require( '../../../perennial/js/common/buildLocal' );

const { App } = require( '@slack/bolt' ); // eslint-disable-line require-statement-match
const { App } = require( '@slack/bolt' ); // eslint-disable-line phet/require-statement-match

let app;

Expand Down

0 comments on commit ebea69e

Please sign in to comment.