Commit d6e81295 by Tobias Skarhed Committed by Dominik Prokop

Packages: create shared tsconfig.json (#18010)

parent 6a3a2f5f
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "../../public/app/types/jquery/*.ts"], "include": ["src/**/*.ts", "src/**/*.tsx", "../../public/app/types/jquery/*.ts"],
"exclude": ["dist", "node_modules"], "exclude": ["dist", "node_modules"],
"compilerOptions": { "compilerOptions": {
"rootDirs": ["."], "rootDirs": ["."],
"module": "esnext",
"outDir": "compiled",
"declaration": true,
"declarationDir": "dist",
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"typeRoots": ["./node_modules/@types", "types"], "typeRoots": ["./node_modules/@types", "types"],
"skipLibCheck": true, // Temp workaround for Duplicate identifier tsc errors, "declarationDir": "dist",
"removeComments": false "outDir": "compiled"
} }
} }
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.tsx", "../../public/app/types/jquery/*.ts"], "include": ["src/**/*.ts", "src/**/*.tsx", "../../public/app/types/jquery/*.ts"],
"exclude": ["dist", "node_modules"], "exclude": ["dist", "node_modules"],
"compilerOptions": { "compilerOptions": {
"rootDirs": ["."], "rootDirs": ["."],
"module": "esnext",
"outDir": "compiled",
"declaration": true,
"declarationDir": "dist",
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"typeRoots": ["./node_modules/@types", "types"], "typeRoots": ["./node_modules/@types", "types"],
"skipLibCheck": true, // Temp workaround for Duplicate identifier tsc errors, "declarationDir": "dist",
"removeComments": false "outDir": "compiled"
} }
} }
import axios from 'axios';
// @ts-ignore // @ts-ignore
import * as _ from 'lodash'; import * as _ from 'lodash';
import { Task, TaskRunner } from './task'; import { Task, TaskRunner } from './task';
......
...@@ -4,7 +4,6 @@ import execa = require('execa'); ...@@ -4,7 +4,6 @@ import execa = require('execa');
import path = require('path'); import path = require('path');
import fs = require('fs'); import fs = require('fs');
import glob = require('glob'); import glob = require('glob');
import util = require('util');
import { Linter, Configuration, RuleFailure } from 'tslint'; import { Linter, Configuration, RuleFailure } from 'tslint';
import * as prettier from 'prettier'; import * as prettier from 'prettier';
...@@ -17,7 +16,6 @@ interface PluginBuildOptions { ...@@ -17,7 +16,6 @@ interface PluginBuildOptions {
export const bundlePlugin = useSpinner<PluginBundleOptions>('Compiling...', async options => await bundleFn(options)); export const bundlePlugin = useSpinner<PluginBundleOptions>('Compiling...', async options => await bundleFn(options));
const readFileAsync = util.promisify(fs.readFile);
// @ts-ignore // @ts-ignore
export const clean = useSpinner<void>('Cleaning', async () => await execa('rimraf', [`${process.cwd()}/dist`])); export const clean = useSpinner<void>('Cleaning', async () => await execa('rimraf', [`${process.cwd()}/dist`]));
......
import { Task, TaskRunner } from './task'; import { Task, TaskRunner } from './task';
import { pluginBuildRunner } from './plugin.build'; import { pluginBuildRunner } from './plugin.build';
import { useSpinner } from '../utils/useSpinner';
import { restoreCwd } from '../utils/cwd'; import { restoreCwd } from '../utils/cwd';
import { getPluginJson } from '../../config/utils/pluginValidation'; import { getPluginJson } from '../../config/utils/pluginValidation';
......
import path = require('path');
import fs = require('fs');
import webpack = require('webpack'); import webpack = require('webpack');
import { getWebpackConfig } from '../../../config/webpack.plugin.config'; import { getWebpackConfig } from '../../../config/webpack.plugin.config';
import formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); import formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
......
import path = require('path');
import * as jestCLI from 'jest-cli'; import * as jestCLI from 'jest-cli';
import { useSpinner } from '../../utils/useSpinner'; import { useSpinner } from '../../utils/useSpinner';
import { jestConfig } from '../../../config/jest.plugin.config'; import { jestConfig } from '../../../config/jest.plugin.config';
......
...@@ -46,7 +46,6 @@ export async function getTeam(team: any): Promise<any> { ...@@ -46,7 +46,6 @@ export async function getTeam(team: any): Promise<any> {
} }
export async function addToTeam(team: any, user: any): Promise<any> { export async function addToTeam(team: any, user: any): Promise<any> {
const members = await client.get(`/teams/${team.id}/members`);
console.log(`Adding user ${user.name} to team ${team.name}`); console.log(`Adding user ${user.name} to team ${team.name}`);
await client.post(`/teams/${team.id}/members`, { userId: user.id }); await client.post(`/teams/${team.id}/members`, { userId: user.id });
} }
......
import execa = require('execa'); import execa = require('execa');
import * as fs from 'fs'; import * as fs from 'fs';
import { changeCwdToGrafanaUi, restoreCwd, changeCwdToGrafanaToolkit } from '../utils/cwd'; import { restoreCwd, changeCwdToGrafanaToolkit } from '../utils/cwd';
import chalk from 'chalk'; import chalk from 'chalk';
import { useSpinner } from '../utils/useSpinner'; import { useSpinner } from '../utils/useSpinner';
import { Task, TaskRunner } from './task'; import { Task, TaskRunner } from './task';
......
...@@ -7,7 +7,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); ...@@ -7,7 +7,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
import * as webpack from 'webpack'; import * as webpack from 'webpack';
import { hasThemeStylesheets, getStyleLoaders, getStylesheetEntries, getFileLoaders } from './webpack/loaders'; import { getStyleLoaders, getStylesheetEntries, getFileLoaders } from './webpack/loaders';
interface WebpackConfigurationOptions { interface WebpackConfigurationOptions {
watch?: boolean; watch?: boolean;
...@@ -51,6 +51,7 @@ const getManualChunk = (id: string) => { ...@@ -51,6 +51,7 @@ const getManualChunk = (id: string) => {
}; };
} }
} }
return null;
}; };
const getEntries = () => { const getEntries = () => {
......
...@@ -3,7 +3,6 @@ import { getStylesheetEntries, hasThemeStylesheets } from './loaders'; ...@@ -3,7 +3,6 @@ import { getStylesheetEntries, hasThemeStylesheets } from './loaders';
describe('Loaders', () => { describe('Loaders', () => {
describe('stylesheet helpers', () => { describe('stylesheet helpers', () => {
const logSpy = jest.spyOn(console, 'log').mockImplementation(); const logSpy = jest.spyOn(console, 'log').mockImplementation();
const errorSpy = jest.spyOn(console, 'error').mockImplementation();
afterAll(() => { afterAll(() => {
logSpy.mockRestore(); logSpy.mockRestore();
......
import { getPluginJson } from '../utils/pluginValidation';
const path = require('path');
const fs = require('fs'); const fs = require('fs');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
......
{ {
"extends": "../tsconfig.json",
"include": ["src/**/*.ts"], "include": ["src/**/*.ts"],
"exclude": ["dist", "node_modules"], "exclude": ["dist", "node_modules"],
"compilerOptions": { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
"rootDirs": ["."], "rootDirs": ["."],
"outDir": "dist/src", "outDir": "dist/src",
"strict": true, "declaration": false,
"alwaysStrict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"typeRoots": ["./node_modules/@types"], "typeRoots": ["./node_modules/@types"],
"skipLibCheck": true, // Temp workaround for Duplicate identifier tsc errors,
"removeComments": false,
"esModuleInterop": true, "esModuleInterop": true,
"lib": ["es2015", "es2017.string"] "lib": ["es2015", "es2017.string"]
} }
......
{ {
"extends": "../../tsconfig.json", "extends": "../tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.tsx"], "include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["dist", "node_modules"], "exclude": ["dist", "node_modules"],
"compilerOptions": { "compilerOptions": {
"rootDirs": [".", "stories"], "rootDirs": [".", "stories"],
"module": "esnext",
"outDir": "compiled",
"declaration": true,
"declarationDir": "dist",
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"typeRoots": ["./node_modules/@types", "types"], "typeRoots": ["./node_modules/@types", "types"],
"skipLibCheck": true, // Temp workaround for Duplicate identifier tsc errors, "declarationDir": "dist",
"removeComments": false "outDir": "compiled"
} }
} }
{
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "esnext",
"declaration": true,
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"skipLibCheck": true, // Temp workaround for Duplicate identifier tsc errors,
"removeComments": false
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment