mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -1,6 +1,5 @@
|
||||
/* tslint:disable:import-blacklist */
|
||||
import angular from 'angular';
|
||||
import moment from 'moment';
|
||||
import moment from 'moment'; // eslint-disable-line no-restricted-imports
|
||||
import _ from 'lodash';
|
||||
import $ from 'jquery';
|
||||
import kbn from 'app/core/utils/kbn';
|
||||
@@ -108,7 +107,6 @@ export class DashboardLoaderSrv {
|
||||
datasourceSrv: this.datasourceSrv,
|
||||
};
|
||||
|
||||
/*jshint -W054 */
|
||||
const scriptFunc = new Function(
|
||||
'ARGS',
|
||||
'kbn',
|
||||
|
||||
@@ -171,6 +171,8 @@ describe('AdHocFilterField', () => {
|
||||
describe('when called with an empty pairs array', () => {
|
||||
describe('and called with keys', () => {
|
||||
it('then it should return correct pairs', async () => {
|
||||
// @todo remove lint disable when possible: https://github.com/typescript-eslint/typescript-eslint/issues/902
|
||||
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
||||
const { instance } = setup();
|
||||
const pairs: KeyValuePair[] = [];
|
||||
const index = 0;
|
||||
@@ -179,6 +181,7 @@ describe('AdHocFilterField', () => {
|
||||
const value: undefined = undefined;
|
||||
const values: undefined = undefined;
|
||||
const operator: undefined = undefined;
|
||||
/* eslint-enable @typescript-eslint/no-inferrable-types */
|
||||
|
||||
const result = instance.updatePairs(pairs, index, { key, keys, value, values, operator });
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import _ from 'lodash';
|
||||
import * as sdk from 'app/plugins/sdk';
|
||||
import kbn from 'app/core/utils/kbn';
|
||||
// tslint:disable:import-blacklist
|
||||
import moment from 'moment';
|
||||
import moment from 'moment'; // eslint-disable-line no-restricted-imports
|
||||
import angular from 'angular';
|
||||
import jquery from 'jquery';
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ export class IntervalVariable implements IntervalVariableModel, VariableActions
|
||||
label: string;
|
||||
hide: VariableHide;
|
||||
skipUrlSync: boolean;
|
||||
auto_count: number; // tslint:disable-line variable-name
|
||||
auto_min: string; // tslint:disable-line variable-name
|
||||
auto_count: number; // eslint-disable-line camelcase
|
||||
auto_min: string; // eslint-disable-line camelcase
|
||||
options: VariableOption[];
|
||||
auto: boolean;
|
||||
query: string;
|
||||
|
||||
Reference in New Issue
Block a user