Skip to content

Commit aabb1ec

Browse files
authored
Bump cyclic dependencies and convert the decoupled-local-node-rig to use flat eslint config. (#5271)
* Rush update. * Bump cyclic dependencies. * fixup! Rush update. * Update decoupled-node-rig to use flat config. * fixup! Rush update. * fixup! Update decoupled-node-rig to use flat config. * fixup! Rush update. * fixup! Update decoupled-node-rig to use flat config. * fixup! Update decoupled-node-rig to use flat config. * Make eslint 9 the default version in heft-lint-plugin. * fixup! Rush update. * Fix lint issues. * fixup! Rush update. * Rush change * fixup! Fix lint issues. * fixup! Bump cyclic dependencies. * fixup! Fix lint issues. * fixup! Rush update.
1 parent 3c5a9f8 commit aabb1ec

File tree

138 files changed

+1383
-1801
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

+1383
-1801
lines changed

apps/api-extractor/.eslintrc.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

apps/api-extractor/eslint.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2+
// See LICENSE in the project root for license information.
3+
4+
const nodeTrustedToolProfile = require('decoupled-local-node-rig/profiles/default/includes/eslint/flat/profile/node-trusted-tool');
5+
const friendlyLocalsMixin = require('decoupled-local-node-rig/profiles/default/includes/eslint/flat/mixins/friendly-locals');
6+
7+
module.exports = [
8+
...nodeTrustedToolProfile,
9+
...friendlyLocalsMixin,
10+
{
11+
files: ['**/*.ts', '**/*.tsx'],
12+
languageOptions: {
13+
parserOptions: {
14+
tsconfigRootDir: __dirname
15+
}
16+
},
17+
rules: {
18+
'no-console': 'off'
19+
}
20+
}
21+
];

apps/api-extractor/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,13 @@
5252
"typescript": "5.8.2"
5353
},
5454
"devDependencies": {
55-
"decoupled-local-node-rig": "workspace:*",
56-
"@rushstack/heft": "0.73.2",
55+
"@rushstack/heft": "0.74.0",
5756
"@types/lodash": "4.14.116",
5857
"@types/minimatch": "3.0.5",
5958
"@types/resolve": "1.20.2",
6059
"@types/semver": "7.5.0",
60+
"decoupled-local-node-rig": "workspace:*",
61+
"eslint": "~9.25.1",
6162
"local-eslint-config": "workspace:*"
6263
}
6364
}

apps/api-extractor/src/analyzer/TypeScriptInternals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class TypeScriptInternals {
1717
public static getImmediateAliasedSymbol(symbol: ts.Symbol, typeChecker: ts.TypeChecker): ts.Symbol {
1818
// Compiler internal:
1919
// https://github.com/microsoft/TypeScript/blob/v3.2.2/src/compiler/checker.ts
20-
return (typeChecker as any).getImmediateAliasedSymbol(symbol); // eslint-disable-line @typescript-eslint/no-explicit-any
20+
return (typeChecker as any).getImmediateAliasedSymbol(symbol);
2121
}
2222

2323
/**

apps/api-extractor/src/generators/ApiReportGenerator.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ export class ApiReportGenerator {
283283
reportVariant: ApiReportVariant
284284
): void {
285285
// Should we process this declaration at all?
286-
// eslint-disable-next-line no-bitwise
287286
if (!ApiReportGenerator._shouldIncludeDeclaration(collector, astDeclaration, reportVariant)) {
288287
span.modification.skipAll();
289288
return;

apps/api-extractor/src/generators/DtsRollupGenerator.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
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-bitwise */
5-
64
import * as ts from 'typescript';
75
import { FileSystem, type NewlineKind, InternalError } from '@rushstack/node-core-library';
86
import { ReleaseTag } from '@microsoft/api-extractor-model';

apps/heft/.eslintrc.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

apps/heft/eslint.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
2+
// See LICENSE in the project root for license information.
3+
4+
const nodeTrustedToolProfile = require('decoupled-local-node-rig/profiles/default/includes/eslint/flat/profile/node-trusted-tool');
5+
const friendlyLocalsMixin = require('decoupled-local-node-rig/profiles/default/includes/eslint/flat/mixins/friendly-locals');
6+
7+
module.exports = [
8+
...nodeTrustedToolProfile,
9+
...friendlyLocalsMixin,
10+
{
11+
files: ['**/*.ts', '**/*.tsx'],
12+
languageOptions: {
13+
parserOptions: {
14+
tsconfigRootDir: __dirname
15+
}
16+
}
17+
}
18+
];

apps/heft/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
},
5050
"devDependencies": {
5151
"@microsoft/api-extractor": "workspace:*",
52-
"@rushstack/heft": "0.73.2",
52+
"@rushstack/heft": "0.74.0",
5353
"@types/watchpack": "2.4.0",
54-
"decoupled-local-node-rig": "workspace:*"
54+
"decoupled-local-node-rig": "workspace:*",
55+
"eslint": "~9.25.1"
5556
}
5657
}

apps/heft/src/pluginFramework/StaticFileSystemAdapter.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class StaticFileSystemAdapter implements FileSystemAdapter {
4545
callback(e, {} as fs.Stats);
4646
return;
4747
}
48-
// eslint-disable-next-line @rushstack/no-new-null
48+
4949
callback(null, result);
5050
});
5151
}) as FileSystemAdapter['lstat'];
@@ -115,10 +115,8 @@ export class StaticFileSystemAdapter implements FileSystemAdapter {
115115
// When "withFileTypes" is false or undefined, the callback is expected to return a string array.
116116
// Otherwise, we return a fs.Dirent array.
117117
if (options?.withFileTypes) {
118-
// eslint-disable-next-line @rushstack/no-new-null
119118
(callback as ReaddirDirentCallback)(null, result as fs.Dirent[]);
120119
} else {
121-
// eslint-disable-next-line @rushstack/no-new-null
122120
(callback as ReaddirStringCallback)(null, result as string[]);
123121
}
124122
});

0 commit comments

Comments
 (0)