Commit 34e4f182 by Ryan McKinley Committed by GitHub

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

parent e07e03c2
......@@ -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 => {
......
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