chore(betterer): make it work, again
This commit is contained in:
+5
-5
@@ -1,7 +1,7 @@
|
||||
// @ts-check
|
||||
import { BettererFileTest } from '@betterer/betterer';
|
||||
import { ESLint } from 'eslint';
|
||||
import { promises as fs } from 'fs';
|
||||
const { BettererFileTest } = require('@betterer/betterer');
|
||||
const fs = require('fs/promises');
|
||||
const { ESLint } = require('eslint');
|
||||
|
||||
// Why are we ignoring these?
|
||||
// They're all deprecated/being removed so doesn't make sense to fix types
|
||||
@@ -13,7 +13,7 @@ const eslintPathsToIgnore = [
|
||||
];
|
||||
|
||||
// Avoid using functions that report the position of the issues, as this causes a lot of merge conflicts
|
||||
export default {
|
||||
module.exports = {
|
||||
'better eslint': () =>
|
||||
countEslintErrors()
|
||||
.include('**/*.{ts,tsx}')
|
||||
@@ -82,7 +82,7 @@ function countEslintErrors() {
|
||||
}
|
||||
|
||||
const runner = new ESLint({
|
||||
overrideConfigFile: './.betterer.eslint.config.js',
|
||||
overrideConfigFile: './.betterer.eslint.config.cjs',
|
||||
warnIgnored: false,
|
||||
});
|
||||
|
||||
|
||||
+7
-1
@@ -1,5 +1,5 @@
|
||||
// BETTERER RESULTS V2.
|
||||
//
|
||||
//
|
||||
// If this file contains merge conflicts, use `betterer merge` to automatically resolve them:
|
||||
// https://phenomnomnominal.github.io/betterer/docs/results-file/#merge
|
||||
//
|
||||
@@ -1151,6 +1151,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not re-export imported variable (\`profiler\`)", "6"],
|
||||
[0, 0, 0, "Do not re-export imported variable (\`updateLegendValues\`)", "7"]
|
||||
],
|
||||
"public/app/core/internationalization/constants.ts:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`LocaleFileLoader\`)", "0"]
|
||||
],
|
||||
"public/app/core/navigation/GrafanaRouteError.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "0"],
|
||||
[0, 0, 0, "No untranslated strings in text props. Wrap text with <Trans /> or use t()", "1"]
|
||||
@@ -7869,6 +7872,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "\'@grafana/ui/src/themes/_variables.dark.scss.tmpl\' import is restricted from being used by a pattern. Import from the public export instead.", "0"],
|
||||
[0, 0, 0, "\'@grafana/ui/src/themes/_variables.light.scss.tmpl\' import is restricted from being used by a pattern. Import from the public export instead.", "1"],
|
||||
[0, 0, 0, "\'@grafana/ui/src/themes/_variables.scss.tmpl\' import is restricted from being used by a pattern. Import from the public export instead.", "2"]
|
||||
],
|
||||
"vite.config.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
]
|
||||
}`
|
||||
};
|
||||
|
||||
@@ -13,8 +13,8 @@ const unicornPlugin = require('eslint-plugin-unicorn');
|
||||
const grafanaConfig = require('@grafana/eslint-config/flat');
|
||||
const grafanaPlugin = require('@grafana/eslint-plugin');
|
||||
|
||||
const bettererConfig = require('./.betterer.eslint.config');
|
||||
const getEnvConfig = require('./scripts/webpack/env-util');
|
||||
const bettererConfig = require('./.betterer.eslint.config.cjs');
|
||||
const getEnvConfig = require('./scripts/webpack/env-util.cjs');
|
||||
|
||||
/**
|
||||
* @type {Record<string, unknown>}
|
||||
@@ -7,7 +7,7 @@ import i18next from 'i18next';
|
||||
import failOnConsole from 'jest-fail-on-console';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
import getEnvConfig from '../../scripts/webpack/env-util';
|
||||
import getEnvConfig from '../../scripts/webpack/env-util.cjs';
|
||||
|
||||
import { matchers } from './matchers';
|
||||
|
||||
|
||||
+4
-5
@@ -16,9 +16,10 @@
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
// "noUnusedLocals": true, // Standard vite config but disabled because of typecheck errors
|
||||
// "noUnusedParameters": true, // Standard vite config but disabled because typecheck errors
|
||||
// "noFallthroughCasesInSwitch": true, // Standard vite config but disabled because of typecheck errors
|
||||
// Standard vite config but disabled because of typecheck errors
|
||||
// "noUnusedLocals": true,
|
||||
// "noUnusedParameters": true,
|
||||
// "noFallthroughCasesInSwitch": true,
|
||||
|
||||
"baseUrl": "public/",
|
||||
"outDir": "public/dist",
|
||||
@@ -26,8 +27,6 @@
|
||||
"allowJs": true,
|
||||
"useUnknownInCatchVariables": true,
|
||||
"incremental": true,
|
||||
"isolatedModules": true,
|
||||
"moduleResolution": "bundler",
|
||||
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
|
||||
"paths": {
|
||||
"@grafana/schema/dist/esm/*": ["../packages/grafana-schema/src/*"]
|
||||
|
||||
Reference in New Issue
Block a user