feat: add config.d.ts in tsconfig included files
Signed-off-by: Thomas Cardonne <thomas.cardonne@adevinta.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Add `config.d.ts` files to the list of included file in `tsconfig.json`.
|
||||
|
||||
This allows ESLint to detect issues or deprecations in those files.
|
||||
@@ -17,7 +17,7 @@
|
||||
import chalk from 'chalk';
|
||||
import { ESLint } from 'eslint';
|
||||
import { OptionValues } from 'commander';
|
||||
import { join as joinPath, relative as relativePath } from 'path';
|
||||
import { relative as relativePath } from 'path';
|
||||
import { PackageGraph } from '@backstage/cli-node';
|
||||
import { paths } from '../../lib/paths';
|
||||
|
||||
@@ -45,7 +45,7 @@ export async function command(opts: OptionValues) {
|
||||
|
||||
const deprecations = [];
|
||||
for (const [index, pkg] of packages.entries()) {
|
||||
const results = await eslint.lintFiles(joinPath(pkg.dir, 'src'));
|
||||
const results = await eslint.lintFiles(pkg.dir);
|
||||
for (const result of results) {
|
||||
for (const message of result.messages) {
|
||||
if (message.ruleId !== 'deprecation/deprecation') {
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
"extends": "@backstage/cli/config/tsconfig.json",
|
||||
"include": [
|
||||
"packages/*/src",
|
||||
"packages/*/config.d.ts",
|
||||
"plugins/*/src",
|
||||
"plugins/*/config.d.ts",
|
||||
"plugins/*/dev",
|
||||
"plugins/*/migrations"
|
||||
],
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
"extends": "@backstage/cli/config/tsconfig.json",
|
||||
"include": [
|
||||
"packages/*/src",
|
||||
"packages/*/config.d.ts",
|
||||
"plugins/*/src",
|
||||
"plugins/*/config.d.ts",
|
||||
"plugins/*/dev",
|
||||
"plugins/*/migrations"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user