Skip to content

Commit 4709ffe

Browse files
committed
Suppress no-console rule violations.
1 parent 366ff93 commit 4709ffe

File tree

138 files changed

+492
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+492
-18
lines changed

apps/api-documenter/.eslintrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,14 @@ require('eslint-config-local/patch/modern-module-resolution');
33

44
module.exports = {
55
extends: ['eslint-config-local/profile/node-trusted-tool', 'eslint-config-local/mixins/friendly-locals'],
6-
parserOptions: { tsconfigRootDir: __dirname }
6+
parserOptions: { tsconfigRootDir: __dirname },
7+
8+
overrides: [
9+
{
10+
files: ['*.ts', '*.tsx'],
11+
rules: {
12+
'no-console': 'off'
13+
}
14+
}
15+
]
716
};

apps/api-extractor/.eslintrc.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,14 @@ require('eslint-config-local/patch/modern-module-resolution');
33

44
module.exports = {
55
extends: ['eslint-config-local/profile/node-trusted-tool', 'eslint-config-local/mixins/friendly-locals'],
6-
parserOptions: { tsconfigRootDir: __dirname }
6+
parserOptions: { tsconfigRootDir: __dirname },
7+
8+
overrides: [
9+
{
10+
files: ['*.ts', '*.tsx'],
11+
rules: {
12+
'no-console': 'off'
13+
}
14+
}
15+
]
716
};

apps/heft/src/startWithVersionSelector.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
22
// See LICENSE in the project root for license information.
33

4+
/* eslint-disable no-console */
5+
46
// NOTE: Since startWithVersionSelector.ts is loaded in the same process as start.ts, any dependencies that
57
// we import here may become side-by-side versions. We want to minimize any dependencies.
68
import * as path from 'path';

apps/lockfile-explorer-web/src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const App = (): JSX.Element => {
2626
dispatch(loadEntries(lockfile));
2727
}
2828
loadLockfileAsync().catch((e) => {
29+
// eslint-disable-next-line no-console
2930
console.log(`Failed to read lockfile: ${e}`);
3031
});
3132
}, []);

apps/lockfile-explorer-web/src/components/ConnectionModal/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const ConnectionModal = (): JSX.Element | ReactNull => {
3131
setManualChecked(true);
3232
keepAliveAsync().catch((e) => {
3333
// Keep alive cannot fail
34+
// eslint-disable-next-line no-console
3435
console.error(`Unexpected exception: ${e}`);
3536
});
3637
}, []);

apps/lockfile-explorer-web/src/containers/LockfileEntryDetailsView/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => {
5757
}
5858

5959
loadPackageJson(selectedEntry?.referrers || []).catch((e) => {
60+
// eslint-disable-next-line no-console
6061
console.error(`Failed to load referrers package.json: ${e}`);
6162
});
6263
if (selectedEntry) {
@@ -73,6 +74,7 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => {
7374
logDiagnosticInfo('No resolved entry for dependency:', dependencyToTrace);
7475
}
7576
} else if (selectedEntry) {
77+
// eslint-disable-next-line no-console
7678
console.log('dependency to trace: ', dependencyToTrace);
7779
setInspectDependency(dependencyToTrace);
7880

@@ -110,6 +112,7 @@ export const LockfileEntryDetailsView = (): JSX.Element | ReactNull => {
110112
// YAML file. If not, either something is wrong with our algorithm, or else
111113
// something has changed about how PNPM manages its "transitivePeerDependencies"
112114
// field.
115+
// eslint-disable-next-line no-console
113116
console.error(
114117
'Error analyzing influencers: A referrer appears to be missing its "transitivePeerDependencies" field in the YAML file: ',
115118
dependencyToTrace,

apps/lockfile-explorer-web/src/containers/PackageJsonViewer/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const PackageJsonViewer = (): JSX.Element => {
4141
setPnpmfile(pnpmfile);
4242
}
4343
loadPnpmFileAsync().catch((e) => {
44+
// eslint-disable-next-line no-console
4445
console.error(`Failed to load project's pnpm file: ${e}`);
4546
});
4647
}, []);
@@ -60,10 +61,12 @@ export const PackageJsonViewer = (): JSX.Element => {
6061
if (selectedEntry) {
6162
if (selectedEntry.entryPackageName) {
6263
loadPackageDetailsAsync(selectedEntry.packageJsonFolderPath).catch((e) => {
64+
// eslint-disable-next-line no-console
6365
console.error(`Failed to load project information: ${e}`);
6466
});
6567
} else {
6668
// This is used to develop the lockfile explorer application in case there is a mistake in our logic
69+
// eslint-disable-next-line no-console
6770
console.log('The selected entry has no entry name: ', selectedEntry.entryPackageName);
6871
}
6972
}

apps/lockfile-explorer-web/src/helpers/logDiagnosticInfo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// problems with the algorithm.
66
export const logDiagnosticInfo = (...args: string[]): void => {
77
if (window.appContext.debugMode) {
8+
// eslint-disable-next-line no-console
89
console.log('Diagnostic: ', ...args);
910
}
1011
};

apps/lockfile-explorer-web/src/parsing/LockfileDependency.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export class LockfileDependency {
7171
new Path(containingEntry.packageJsonFolderPath).concat(relativePath)
7272
);
7373
if (!rootRelativePath) {
74+
// eslint-disable-next-line no-console
7475
console.error('No root relative path for dependency!', name);
7576
return;
7677
}
@@ -89,6 +90,7 @@ export class LockfileDependency {
8990
};
9091
this.entryId = 'Peer: ' + this.name;
9192
} else {
93+
// eslint-disable-next-line no-console
9294
console.error('Peer dependencies info missing!', node);
9395
}
9496
} else {

apps/lockfile-explorer-web/src/parsing/LockfileEntry.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export class LockfileEntry {
7979
const packageName = new Path(rawEntryId).basename();
8080

8181
if (!packageJsonFolderPath || !packageName) {
82+
// eslint-disable-next-line no-console
8283
console.error('Could not construct path for entry: ', rawEntryId);
8384
return;
8485
}

0 commit comments

Comments
 (0)