mirror of
https://github.com/grafana/grafana.git
synced 2026-08-16 16:14:59 -05:00
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:
@@ -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', []);
|
||||
|
||||
Reference in New Issue
Block a user