Chore: ESlint import order (#44959)

* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
This commit is contained in:
Josh Hunt
2022-04-22 14:33:13 +01:00
committed by GitHub
parent 147a1600e7
commit 3c6e0e8ef8
3311 changed files with 14810 additions and 9526 deletions
+11 -7
View File
@@ -1,10 +1,18 @@
import { configure } from 'enzyme';
import { EventBusSrv } from '@grafana/data';
// This import has side effects, and must be at the top so jQuery is made global before
// angular is imported.
import './global-jquery-shim';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import $ from 'jquery';
import angular from 'angular';
import { configure } from 'enzyme';
import { EventBusSrv } from '@grafana/data';
import 'mutationobserver-shim';
import './mocks/workers';
import '../vendor/flot/jquery.flot';
import '../vendor/flot/jquery.flot.time';
const testAppEvents = new EventBusSrv();
const global = window as any;
global.$ = global.jQuery = $;
@@ -24,10 +32,6 @@ Object.defineProperty(global, 'matchMedia', {
})),
});
import '../vendor/flot/jquery.flot';
import '../vendor/flot/jquery.flot.time';
import angular from 'angular';
angular.module('grafana', ['ngRoute']);
angular.module('grafana.services', ['ngRoute', '$strap.directives']);
angular.module('grafana.panels', []);