mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Toolkit: add a warning about tslint migration (#22089)
This commit is contained in:
parent
e07e03c26d
commit
34e4f182bc
@ -46,6 +46,8 @@
|
|||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^6.0.0",
|
||||||
"@types/tmp": "^0.1.0",
|
"@types/tmp": "^0.1.0",
|
||||||
"@types/webpack": "4.4.34",
|
"@types/webpack": "4.4.34",
|
||||||
|
"@typescript-eslint/eslint-plugin": "2.19.2",
|
||||||
|
"@typescript-eslint/parser": "2.19.2",
|
||||||
"axios": "0.19.0",
|
"axios": "0.19.0",
|
||||||
"babel-jest": "24.8.0",
|
"babel-jest": "24.8.0",
|
||||||
"babel-loader": "8.0.6",
|
"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)'));
|
const getStylesSources = () => globby(resolvePath(process.cwd(), 'src/**/*.+(scss|css)'));
|
||||||
|
|
||||||
export const lintPlugin = useSpinner<Fixable>('Linting', async ({ fix }) => {
|
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
|
// @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(
|
const configFile = await globby(resolvePath(process.cwd(), '.eslintrc?(.cjs|.js|.json|.yaml|.yml)')).then(
|
||||||
filePaths => {
|
filePaths => {
|
||||||
|
Loading…
Reference in New Issue
Block a user