Merge pull request #15238 from backstage/rugvip/failing-imports
repo-tools: remove lint rule overrides
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/repo-tools': patch
|
||||
---
|
||||
|
||||
declare dependencies
|
||||
@@ -37,6 +37,7 @@
|
||||
"@microsoft/api-extractor": "^7.23.0",
|
||||
"@microsoft/api-extractor-model": "^7.17.2",
|
||||
"@microsoft/tsdoc": "0.14.1",
|
||||
"@microsoft/tsdoc-config": "0.16.1",
|
||||
"chalk": "^4.0.0",
|
||||
"commander": "^9.1.0",
|
||||
"fs-extra": "10.1.0",
|
||||
@@ -51,6 +52,16 @@
|
||||
"@types/mock-fs": "^4.13.0",
|
||||
"mock-fs": "^5.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@rushstack/node-core-library": "*",
|
||||
"prettier": "^2.8.1",
|
||||
"typescript": "> 3.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"prettier": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"dist/**/*.js"
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
/* eslint-disable no-restricted-imports */
|
||||
import {
|
||||
resolve as resolvePath,
|
||||
relative as relativePath,
|
||||
@@ -24,7 +22,7 @@ import {
|
||||
join,
|
||||
} from 'path';
|
||||
import { execFile } from 'child_process';
|
||||
import prettier from 'prettier';
|
||||
import type prettierType from 'prettier';
|
||||
import fs from 'fs-extra';
|
||||
import {
|
||||
Extractor,
|
||||
@@ -213,10 +211,19 @@ ApiReportGenerator.generateReviewFileContent =
|
||||
collector,
|
||||
...moreArgs,
|
||||
);
|
||||
return prettier.format(content, {
|
||||
...require('@spotify/prettier-config'),
|
||||
parser: 'markdown',
|
||||
});
|
||||
|
||||
try {
|
||||
const prettier = require('prettier') as typeof prettierType;
|
||||
|
||||
const config = prettier.resolveConfig.sync(cliPaths.targetRoot) ?? {};
|
||||
return prettier.format(content, {
|
||||
...config,
|
||||
parser: 'markdown',
|
||||
});
|
||||
} catch (e) {
|
||||
// console.warn('Failed to format API report with prettier', e);
|
||||
return content;
|
||||
}
|
||||
};
|
||||
|
||||
export async function createTemporaryTsConfig(includedPackageDirs: string[]) {
|
||||
|
||||
@@ -8512,6 +8512,7 @@ __metadata:
|
||||
"@microsoft/api-extractor": ^7.23.0
|
||||
"@microsoft/api-extractor-model": ^7.17.2
|
||||
"@microsoft/tsdoc": 0.14.1
|
||||
"@microsoft/tsdoc-config": 0.16.1
|
||||
"@types/is-glob": ^4.0.2
|
||||
"@types/mock-fs": ^4.13.0
|
||||
chalk: ^4.0.0
|
||||
@@ -8522,6 +8523,13 @@ __metadata:
|
||||
minimatch: ^5.1.1
|
||||
mock-fs: ^5.1.0
|
||||
ts-node: ^10.0.0
|
||||
peerDependencies:
|
||||
"@rushstack/node-core-library": "*"
|
||||
prettier: ^2.8.1
|
||||
typescript: "> 3.0.0"
|
||||
peerDependenciesMeta:
|
||||
prettier:
|
||||
optional: true
|
||||
bin:
|
||||
backstage-repo-tools: bin/backstage-repo-tools
|
||||
languageName: unknown
|
||||
@@ -11562,7 +11570,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@microsoft/tsdoc-config@npm:~0.16.1":
|
||||
"@microsoft/tsdoc-config@npm:0.16.1, @microsoft/tsdoc-config@npm:~0.16.1":
|
||||
version: 0.16.1
|
||||
resolution: "@microsoft/tsdoc-config@npm:0.16.1"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user