mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: add lint rule prevent t
import from i18next
(#99761)
* also handle i18next import * fix violations
This commit is contained in:
parent
7883215c68
commit
d198fa1dd0
@ -117,6 +117,11 @@ module.exports = [
|
|||||||
importNames: ['Trans', 't'],
|
importNames: ['Trans', 't'],
|
||||||
message: 'Please import from app/core/internationalization instead',
|
message: 'Please import from app/core/internationalization instead',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'i18next',
|
||||||
|
importNames: ['t'],
|
||||||
|
message: 'Please import from app/core/internationalization instead',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { t } from 'i18next';
|
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
import { DataQuery } from '@grafana/schema';
|
import { DataQuery } from '@grafana/schema';
|
||||||
import { Button, Modal } from '@grafana/ui';
|
import { Button, Modal } from '@grafana/ui';
|
||||||
|
import { t } from 'app/core/internationalization';
|
||||||
import { isQueryLibraryEnabled, useListQueryTemplateQuery } from 'app/features/query-library';
|
import { isQueryLibraryEnabled, useListQueryTemplateQuery } from 'app/features/query-library';
|
||||||
|
|
||||||
import { getK8sNamespace } from '../../query-library/api/query';
|
import { getK8sNamespace } from '../../query-library/api/query';
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { t } from 'i18next';
|
import { t } from 'app/core/internationalization';
|
||||||
|
|
||||||
import { getDashboardAPI } from 'app/features/dashboard/api/dashboard_api';
|
import { getDashboardAPI } from 'app/features/dashboard/api/dashboard_api';
|
||||||
|
|
||||||
import { validationSrv } from '../services/ValidationSrv';
|
import { validationSrv } from '../services/ValidationSrv';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { t } from 'i18next';
|
|
||||||
import { useRef, useEffect } from 'react';
|
import { useRef, useEffect } from 'react';
|
||||||
|
|
||||||
import { useAppNotification } from 'app/core/copy/appNotification';
|
import { useAppNotification } from 'app/core/copy/appNotification';
|
||||||
|
import { t } from 'app/core/internationalization';
|
||||||
|
|
||||||
import { GetSnapshotResponseDto, SnapshotDto } from '../api';
|
import { GetSnapshotResponseDto, SnapshotDto } from '../api';
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import { t } from 'i18next';
|
|
||||||
import { PureComponent } from 'react';
|
import { PureComponent } from 'react';
|
||||||
|
|
||||||
import { selectors } from '@grafana/e2e-selectors';
|
import { selectors } from '@grafana/e2e-selectors';
|
||||||
import { Button, Icon, LoadingPlaceholder } from '@grafana/ui';
|
import { Button, Icon, LoadingPlaceholder } from '@grafana/ui';
|
||||||
import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
|
import { TagBadge } from 'app/core/components/TagFilter/TagBadge';
|
||||||
import { Trans } from 'app/core/internationalization';
|
import { t, Trans } from 'app/core/internationalization';
|
||||||
import { formatDate } from 'app/core/internationalization/dates';
|
import { formatDate } from 'app/core/internationalization/dates';
|
||||||
import { UserSession } from 'app/types';
|
import { UserSession } from 'app/types';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user