mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -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,11 +1,14 @@
|
||||
import React, { FC } from 'react';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import { Button, Input, Field, Form } from '@grafana/ui';
|
||||
import { StoreState } from 'app/types';
|
||||
import { connect, ConnectedProps } from 'react-redux';
|
||||
import { getNavModel } from '../../core/selectors/navModel';
|
||||
import { createOrganization } from './state/actions';
|
||||
|
||||
import { Button, Input, Field, Form } from '@grafana/ui';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import { getConfig } from 'app/core/config';
|
||||
import { StoreState } from 'app/types';
|
||||
|
||||
import { getNavModel } from '../../core/selectors/navModel';
|
||||
|
||||
import { createOrganization } from './state/actions';
|
||||
|
||||
const mapStateToProps = (state: StoreState) => {
|
||||
return { navModel: getNavModel(state.navIndex, 'global-orgs') };
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import { mockToolkitActionCreator } from 'test/core/redux/mocks';
|
||||
|
||||
import { NavModel } from '@grafana/data';
|
||||
|
||||
import { OrgDetailsPage, Props } from './OrgDetailsPage';
|
||||
import { Organization } from '../../types';
|
||||
import { mockToolkitActionCreator } from 'test/core/redux/mocks';
|
||||
|
||||
import { OrgDetailsPage, Props } from './OrgDetailsPage';
|
||||
import { setOrganizationName } from './state/reducers';
|
||||
|
||||
jest.mock('app/core/core', () => {
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { NavModel } from '@grafana/data';
|
||||
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import OrgProfile from './OrgProfile';
|
||||
import SharedPreferences from 'app/core/components/SharedPreferences/SharedPreferences';
|
||||
import { loadOrganization, updateOrganization } from './state/actions';
|
||||
import { AccessControlAction, Organization, StoreState } from 'app/types';
|
||||
import { getNavModel } from 'app/core/selectors/navModel';
|
||||
import { setOrganizationName } from './state/reducers';
|
||||
import { NavModel } from '@grafana/data';
|
||||
import { VerticalGroup } from '@grafana/ui';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import SharedPreferences from 'app/core/components/SharedPreferences/SharedPreferences';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { getNavModel } from 'app/core/selectors/navModel';
|
||||
import { AccessControlAction, Organization, StoreState } from 'app/types';
|
||||
|
||||
import OrgProfile from './OrgProfile';
|
||||
import { loadOrganization, updateOrganization } from './state/actions';
|
||||
import { setOrganizationName } from './state/reducers';
|
||||
|
||||
export interface Props {
|
||||
navModel: NavModel;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
|
||||
import OrgProfile, { Props } from './OrgProfile';
|
||||
|
||||
jest.mock('app/core/core', () => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { FC } from 'react';
|
||||
|
||||
import { Input, Field, FieldSet, Button, Form } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { AccessControlAction } from 'app/types';
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import React, { FC } from 'react';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { StoreState, UserOrg } from 'app/types';
|
||||
import { useEffectOnce } from 'react-use';
|
||||
import { Button, HorizontalGroup } from '@grafana/ui';
|
||||
import { getUserOrganizations, setUserOrganization } from './state/actions';
|
||||
import { connect, ConnectedProps } from 'react-redux';
|
||||
import { useEffectOnce } from 'react-use';
|
||||
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Button, HorizontalGroup } from '@grafana/ui';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import { StoreState, UserOrg } from 'app/types';
|
||||
|
||||
import { getUserOrganizations, setUserOrganization } from './state/actions';
|
||||
|
||||
const navModel = {
|
||||
main: {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import { locationUtil } from '@grafana/data';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import {
|
||||
HorizontalGroup,
|
||||
Button,
|
||||
@@ -10,10 +13,9 @@ import {
|
||||
Field,
|
||||
InputControl,
|
||||
} from '@grafana/ui';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import { locationUtil } from '@grafana/data';
|
||||
import { getConfig } from 'app/core/config';
|
||||
import { OrgRole, useDispatch } from 'app/types';
|
||||
|
||||
import { addInvitee } from '../invites/state/actions';
|
||||
|
||||
const roles = [
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import React, { FC } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import UserInviteForm from './UserInviteForm';
|
||||
|
||||
import { NavModel } from '@grafana/data';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { getNavModel } from 'app/core/selectors/navModel';
|
||||
import { StoreState } from 'app/types/store';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import { NavModel } from '@grafana/data';
|
||||
|
||||
import UserInviteForm from './UserInviteForm';
|
||||
|
||||
interface Props {
|
||||
navModel: NavModel;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { updateOrganization, setUserOrganization, getUserOrganizations } from './actions';
|
||||
import { updateConfigurationSubtitle } from 'app/core/actions';
|
||||
import { thunkTester } from 'test/core/thunk/thunkTester';
|
||||
|
||||
import { updateConfigurationSubtitle } from 'app/core/actions';
|
||||
import { OrgRole } from 'app/types';
|
||||
|
||||
import { updateOrganization, setUserOrganization, getUserOrganizations } from './actions';
|
||||
|
||||
const setup = () => {
|
||||
const initialState = {
|
||||
organization: {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { ThunkResult } from 'app/types';
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
import { organizationLoaded, userOrganizationsLoaded } from './reducers';
|
||||
import { updateConfigurationSubtitle } from 'app/core/actions';
|
||||
import { ThunkResult } from 'app/types';
|
||||
|
||||
import { organizationLoaded, userOrganizationsLoaded } from './reducers';
|
||||
|
||||
type OrganizationDependencies = { getBackendSrv: typeof getBackendSrv };
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { reducerTester } from '../../../../test/core/redux/reducerTester';
|
||||
import { OrganizationState, OrgRole } from '../../../types';
|
||||
|
||||
import {
|
||||
initialState,
|
||||
organizationLoaded,
|
||||
|
||||
Reference in New Issue
Block a user