Skip to content

Commit 1057d42

Browse files
author
Brijesh Bittu
committed
run and fix eslint issues in the codebase
1 parent 9504a65 commit 1057d42

File tree

15 files changed

+13
-27
lines changed

15 files changed

+13
-27
lines changed

.github/workflows/scripts/prs/checkTargetBranchLabel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-check
22
const vBranchRegex = /^v\d{1,3}\.x$/;
3-
const transferLabels = ['cherry-pick'];
3+
// const transferLabels = ['cherry-pick'];
44

55
/**
66
* @param {Object} params

.github/workflows/scripts/prs/checkTypeLabel.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
// @ts-check
22
const createEnumerationFromArray = (stringArray) =>
33
stringArray.length > 1
4-
? stringArray
4+
? `${stringArray
55
.slice(0, -1)
66
.map((s) => `\`${s}\``)
7-
.join(', ') +
8-
' or ' +
9-
`\`${stringArray.slice(-1)}\``
7+
.join(', ')} or \`${stringArray.slice(-1)}\``
108
: stringArray.map((s) => `\`${s}\``).join('');
119

1210
const typeLabels = [
@@ -15,7 +13,7 @@ const typeLabels = [
1513
'enhancement',
1614
'new feature',
1715
// Those are not "Types" labels, they are "Kind of work" labels, but we don't want to have to handle the overhead of
18-
// setting Types labels with them.
16+
// setting "Types" labels with them.
1917
'release',
2018
'dependencies',
2119
];
@@ -65,12 +63,13 @@ const createCommentHandler =
6563
return;
6664
}
6765

68-
return await github.rest.issues.updateComment({
66+
await github.rest.issues.updateComment({
6967
owner,
7068
repo,
7169
comment_id: commentFound.id,
7270
body: commentLines.join('\n\n'),
7371
});
72+
return;
7473
}
7574

7675
// only create a new comment if it's not the success comment
@@ -81,7 +80,7 @@ const createCommentHandler =
8180
}
8281

8382
core.info(`>>> Creating explanatory comment on PR`);
84-
return await github.rest.issues.createComment({
83+
await github.rest.issues.createComment({
8584
owner,
8685
repo,
8786
issue_number: pullNumber,

apps/code-infra-dashboard/functions/circle-ci-artifacts.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import type { Handler } from '@netlify/functions';
32
import zlib from 'zlib';
43
import util from 'util';

apps/tools-public/toolpad/resources/bundleSizeQueries.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import axios from 'axios';
32

43
function getMainBundleLabel(bundleId: string): string {

apps/tools-public/toolpad/resources/queryAbout.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
function flip(data) {
32
return Object.fromEntries(Object.entries(data).map(([key, value]) => [value, key]));
43
}

apps/tools-public/toolpad/resources/queryGitHubSearchAPI.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import { rawRequest } from 'graphql-request';
32

43
export async function queryGitHubSearchAPI(queryInput = '', type = 'ISSUE') {

apps/tools-public/toolpad/resources/queryJoyUIMonthlyDownloads.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import { formatDatePart, getDateString, getMonthKey } from './queryHeadlessLibrariesDownloads';
32

43
const prepareData = (inData) => {

apps/tools-public/toolpad/resources/queryLabelsActivity.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import { request } from 'graphql-request';
32

43
interface LabelTimelineItem {

apps/tools-public/toolpad/resources/queryPRs.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import { request } from 'graphql-request';
32

43
interface PullRequest {

apps/tools-public/toolpad/resources/queryPRswithoutReviewer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import { request } from 'graphql-request';
32

43
export async function queryPRswithoutReviewer() {

apps/tools-public/toolpad/resources/updateMuiPaidSupport.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable import/prefer-default-export */
21
import dayjs from 'dayjs';
32
import { sheets } from '@googleapis/sheets';
43
import { JWT } from 'google-auth-library';

eslint.config.mjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineConfig } from 'eslint/config';
33
import * as path from 'node:path';
44
import baseConfig from '@mui/configs/eslint';
55
import testConfig from '@mui/configs/eslint/test';
6-
import muiPlugin from '@mui/configs/eslint/material-ui';
76
import { fileURLToPath } from 'url';
87

98
const filename = fileURLToPath(import.meta.url);
@@ -31,9 +30,6 @@ export default defineConfig(
3130
'jsx-a11y/no-autofocus': 'off',
3231
'import-x/extensions': 'off',
3332
},
34-
plugins: {
35-
'material-ui': muiPlugin,
36-
},
3733
},
3834
{
3935
files: [

packages/babel-plugin-minify-errors/__fixtures__/.eslintrc.js renamed to packages/babel-plugin-minify-errors/__fixtures__/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
rules: {
33
// keeps test simple
44
'no-unreachable': 'off',

packages/bundle-size-checker/.eslintrc.cjs renamed to packages/bundle-size-checker/eslint.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
module.exports = {
1+
export default {
22
rules: {
3-
'import/prefer-default-export': 'off',
3+
'import-x/prefer-default-export': 'off',
44
// Allow .js file extensions in import statements for ESM compatibility
5-
'import/extensions': [
5+
'import-x/extensions': [
66
'error',
77
'ignorePackages',
88
{

packages/bundle-size-checker/src/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import path from 'path';
44
import os from 'os';
5-
import fse from 'fs-extra';
5+
import * as fse from 'fs-extra';
66
import yargs from 'yargs';
7-
import Piscina from 'piscina';
7+
import { Piscina } from 'piscina';
88
import micromatch from 'micromatch';
99
import { loadConfig } from './configLoader.js';
1010
import { uploadSnapshot } from './uploadSnapshot.js';

0 commit comments

Comments
 (0)