Chore: Update eslint configs to ignore `/spec/` files when necessary (#104377)

provisioning/job-errors
Tom Ratcliffe 2 months ago committed by GitHub
parent 9a7cb96eb0
commit f9fb6f3b88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      .betterer.eslint.config.js
  2. 3
      .betterer.results
  3. 1
      eslint.config.js
  4. 5
      public/app/features/explore/spec/helper/setup.tsx
  5. 3
      public/locales/en-US/grafana.json

@ -96,8 +96,14 @@ module.exports = [
},
},
{
files: ['**/*.{ts,tsx}'],
ignores: ['**/*.{test,spec}.{ts,tsx}', '**/__mocks__/**', '**/public/test/**', '**/mocks.{ts,tsx}'],
files: ['**/*.{js,jsx,ts,tsx}'],
ignores: [
'**/*.{test,spec}.{ts,tsx}',
'**/__mocks__/**',
'**/public/test/**',
'**/mocks.{ts,tsx}',
'**/spec/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
},

@ -1723,8 +1723,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not re-export imported variable (\`./external.utils\`)", "0"]
],
"public/app/features/explore/spec/helper/setup.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/explore/state/time.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]

@ -284,6 +284,7 @@ module.exports = [
'**/*.{test,spec}.{ts,tsx}',
'**/__mocks__/',
'public/test',
'**/spec/**/*.{ts,tsx}',
],
rules: {
'@grafana/no-untranslated-strings': 'error',

@ -34,7 +34,6 @@ import {
import { DataSourceRef } from '@grafana/schema';
import { AppChrome } from 'app/core/components/AppChrome/AppChrome';
import { GrafanaContext } from 'app/core/context/GrafanaContext';
import { t } from 'app/core/internationalization';
import { GrafanaRoute } from 'app/core/navigation/GrafanaRoute';
import { Echo } from 'app/core/services/echo/Echo';
import { setLastUsedDatasourceUID } from 'app/core/utils/explore';
@ -291,11 +290,9 @@ export function makeDatasourceSetup({
components: {
QueryEditor(props: QueryEditorProps<LokiDatasource, LokiQuery>) {
return (
// don't need translations, this is a test helper
// eslint-disable-next-line @grafana/no-untranslated-strings
<div>
<input
aria-label={t('explore.make-datasource-setup.aria-label-query', 'query')}
aria-label="query"
defaultValue={props.query.expr}
onChange={(event) => {
props.onChange({ ...props.query, expr: event.target.value });

@ -4739,9 +4739,6 @@
"logs-volumne-panel-list": {
"body-no-logs-volume-available": "No volume information available for the current queries and time range."
},
"make-datasource-setup": {
"aria-label-query": "query"
},
"next": "Next",
"next-prev-result": {
"aria-label-next": "Next result button",

Loading…
Cancel
Save