TSLint → ESLint (#21006)

* Alphabetized tslint and tsconfig files

* Optimized tsconfig files

* Optimized editorconfig & prettier config files

… to reduce redundancy

* Switched to @grafana/tsconfig

… and:
* de-duped options
* removed options with default values

* Fixed nasty issue with types for nested slate-react

* Replaced TSLint with ESLint

* TSLint disables → ESLint disables

… also JSHint removals, which haven’t had an affect since it was replaced with TSLint.

* Compliances for ESLint, Prettier and TypeScript

* Updated lockfile
This commit is contained in:
Steven Vachon
2020-02-07 20:40:04 -05:00
committed by GitHub
parent 7dcf5887e6
commit f48169633c
86 changed files with 909 additions and 746 deletions

View File

@@ -1,11 +1,14 @@
/* jshint ignore:start */
ace.define("ace/theme/grafana-dark",["require","exports","module","ace/lib/dom"], function(acequire, exports, module) {
"use strict";
ace.define('ace/theme/grafana-dark', ['require', 'exports', 'module', 'ace/lib/dom'], function(
acequire,
exports,
module
) {
'use strict';
exports.isDark = true;
exports.cssClass = "gf-code-dark";
exports.cssText = ".gf-code-dark .ace_gutter {\
exports.cssClass = 'gf-code-dark';
exports.cssText =
'.gf-code-dark .ace_gutter {\
background: #2f3129;\
color: #8f908a\
}\
@@ -107,10 +110,8 @@ ace.define("ace/theme/grafana-dark",["require","exports","module","ace/lib/dom"]
}\
.gf-code-dark .ace_indent-guide {\
background: url(data:image/png;base64,ivborw0kggoaaaansuheugaaaaeaaaaccayaaaczgbynaaaaekleqvqimwpq0fd0zxbzd/wpaajvaoxesgneaaaaaelftksuqmcc) right repeat-y\
}";
}';
var dom = acequire("../lib/dom");
var dom = acequire('../lib/dom');
dom.importCssString(exports.cssText, exports.cssClass);
});
/* jshint ignore:end */

View File

@@ -35,7 +35,6 @@ export function queryPartEditorDirective(templateSrv: any) {
$scope.partActions = [];
function clickFuncParam(this: any, paramIndex: number) {
/*jshint validthis:true */
const $link = $(this);
const $input = $link.next();
@@ -55,7 +54,6 @@ export function queryPartEditorDirective(templateSrv: any) {
}
function inputBlur(this: any, paramIndex: number) {
/*jshint validthis:true */
const $input = $(this);
const $link = $input.prev();
const newValue = $input.val();
@@ -74,14 +72,12 @@ export function queryPartEditorDirective(templateSrv: any) {
}
function inputKeyPress(this: any, paramIndex: number, e: any) {
/*jshint validthis:true */
if (e.which === 13) {
inputBlur.call(this, paramIndex);
}
}
function inputKeyDown(this: any) {
/*jshint validthis:true */
this.style.width = (3 + this.value.length) * 8 + 'px';
}

View File

@@ -35,7 +35,6 @@ export function sqlPartEditorDirective(templateSrv: any) {
$scope.partActions = [];
function clickFuncParam(this: any, paramIndex: number) {
/*jshint validthis:true */
const $link = $(this);
const $input = $link.next();
@@ -61,7 +60,6 @@ export function sqlPartEditorDirective(templateSrv: any) {
}
function switchToLink($input: JQuery, paramIndex: number) {
/*jshint validthis:true */
const $link = $input.prev();
const newValue = $input.val();
@@ -79,14 +77,12 @@ export function sqlPartEditorDirective(templateSrv: any) {
}
function inputKeyPress(this: any, paramIndex: number, e: any) {
/*jshint validthis:true */
if (e.which === 13) {
switchToLink($(this), paramIndex);
}
}
function inputKeyDown(this: any) {
/*jshint validthis:true */
this.style.width = (3 + this.value.length) * 8 + 'px';
}