Toolkit: add a warning about tslint migration (#22089)

pull/22070/head^2
Ryan McKinley 5 years ago committed by GitHub
parent e07e03c26d
commit 34e4f182bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/grafana-toolkit/package.json
  2. 11
      packages/grafana-toolkit/src/cli/tasks/plugin.build.ts

@ -46,6 +46,8 @@
"@types/semver": "^6.0.0",
"@types/tmp": "^0.1.0",
"@types/webpack": "4.4.34",
"@typescript-eslint/eslint-plugin": "2.19.2",
"@typescript-eslint/parser": "2.19.2",
"axios": "0.19.0",
"babel-jest": "24.8.0",
"babel-loader": "8.0.6",

@ -63,6 +63,17 @@ const getTypescriptSources = () => globby(resolvePath(process.cwd(), 'src/**/*.+
const getStylesSources = () => globby(resolvePath(process.cwd(), 'src/**/*.+(scss|css)'));
export const lintPlugin = useSpinner<Fixable>('Linting', async ({ fix }) => {
try {
// Show a warning if the tslint file exists
await fs.access(resolvePath(process.cwd(), 'tslint.json'));
console.log('--------------------------------------------------------------');
console.log('NOTE: @grafana/toolkit has migrated to use eslint');
console.log('Update your configs to use .eslintrc rather than tslint.json');
console.log('--------------------------------------------------------------');
} catch {
// OK: tslint does not exist
}
// @todo should remove this because the config file could be in a parent dir or within package.json
const configFile = await globby(resolvePath(process.cwd(), '.eslintrc?(.cjs|.js|.json|.yaml|.yml)')).then(
filePaths => {

Loading…
Cancel
Save