refactor(betterer): brute force betterer to work by moving to subdirectory with package.json
This commit is contained in:
-8858
File diff suppressed because it is too large
Load Diff
@@ -160,7 +160,7 @@ export default defineConfig<PluginOptions>({
|
||||
},
|
||||
{
|
||||
name: 'jaeger',
|
||||
testDir: path.join(testDirRoot, '/jaeger'),
|
||||
testDir: 'e2e/test-plugins/jaeger',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
storageState: 'playwright/.auth/admin.json',
|
||||
@@ -169,7 +169,7 @@ export default defineConfig<PluginOptions>({
|
||||
},
|
||||
{
|
||||
name: 'grafana-postgresql-datasource',
|
||||
testDir: path.join(testDirRoot, '/grafana-postgresql-datasource'),
|
||||
testDir: 'e2e/test-plugins/grafana-postgresql-datasource',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
storageState: 'playwright/.auth/admin.json',
|
||||
@@ -178,7 +178,7 @@ export default defineConfig<PluginOptions>({
|
||||
},
|
||||
{
|
||||
name: 'zipkin',
|
||||
testDir: path.join(testDirRoot, '/zipkin'),
|
||||
testDir: 'e2e/test-plugins/zipkin',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
storageState: 'playwright/.auth/admin.json',
|
||||
|
||||
+3
-3
@@ -56,10 +56,10 @@
|
||||
"watch": "yarn start -d watch,start core:start --watchTheme",
|
||||
"ci:test-frontend": "yarn run test:ci",
|
||||
"i18n:stats": "node ./scripts/cli/reportI18nStats.mjs",
|
||||
"betterer": "betterer --tsconfig ./scripts/cli/tsconfig.json",
|
||||
"betterer:stats": "node ./scripts/cli/reportBettererStats.mjs",
|
||||
"betterer": "betterer --config ./scripts/betterer/.betterer.ts --results ./scripts/betterer/.betterer.results --tsconfig ./scripts/cli/tsconfig.json",
|
||||
"betterer:stats": "ts-node --transpile-only --project ./scripts/cli/tsconfig.json ./scripts/cli/reportBettererStats.ts",
|
||||
"betterer:issues": "ts-node --transpile-only --project ./scripts/cli/tsconfig.json ./scripts/cli/generateBettererIssues.ts",
|
||||
"betterer:ci": "betterer ci --tsconfig ./scripts/cli/tsconfig.json",
|
||||
"betterer:ci": "betterer ci --config ./scripts/betterer/.betterer.ts --results ./scripts/betterer/.betterer.results --tsconfig ./scripts/cli/tsconfig.json",
|
||||
"plugin:build": "nx run-many -t build --projects='tag:scope:plugin'",
|
||||
"plugin:build:commit": "nx run-many -t build:commit --projects='tag:scope:plugin'",
|
||||
"plugin:build:dev": "nx run-many -t dev --projects='tag:scope:plugin' --maxParallel=100",
|
||||
|
||||
@@ -0,0 +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
|
||||
//
|
||||
@@ -1,7 +1,6 @@
|
||||
// @ts-check
|
||||
const { BettererFileTest } = require('@betterer/betterer');
|
||||
const fs = require('fs/promises');
|
||||
const { ESLint } = require('eslint');
|
||||
import { BettererFileTest } from '@betterer/betterer';
|
||||
import { ESLint } from 'eslint';
|
||||
import { promises as fs } from 'fs';
|
||||
|
||||
// Why are we ignoring these?
|
||||
// They're all deprecated/being removed so doesn't make sense to fix types
|
||||
@@ -13,7 +12,7 @@ const eslintPathsToIgnore = [
|
||||
];
|
||||
|
||||
// Avoid using functions that report the position of the issues, as this causes a lot of merge conflicts
|
||||
module.exports = {
|
||||
export default {
|
||||
'better eslint': () =>
|
||||
countEslintErrors()
|
||||
.include('**/*.{ts,tsx}')
|
||||
@@ -53,10 +52,8 @@ function countUndocumentedStories() {
|
||||
/**
|
||||
* Generic regexp pattern matcher, similar to @betterer/regexp.
|
||||
* The only difference is that the positions of the errors are not reported, as this may cause a lot of merge conflicts.
|
||||
* @param {RegExp} pattern - The regular expression pattern to match.
|
||||
* @param {string} issueMessage - The message to display for the issue.
|
||||
*/
|
||||
function regexp(pattern, issueMessage) {
|
||||
function regexp(pattern: RegExp, issueMessage: string) {
|
||||
return new BettererFileTest(async (filePaths, fileTestResult) => {
|
||||
await Promise.all(
|
||||
filePaths.map(async (filePath) => {
|
||||
@@ -82,7 +79,7 @@ function countEslintErrors() {
|
||||
}
|
||||
|
||||
const runner = new ESLint({
|
||||
overrideConfigFile: './.betterer.eslint.config.cjs',
|
||||
overrideConfigFile: './.betterer.eslint.config.js',
|
||||
warnIgnored: false,
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "betterer-tests",
|
||||
"description": "This package.json exists to override the 'type': 'module' setting in root package.json so betterer can run.",
|
||||
"type": "commonjs"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file is here to stop yarn complaining about unknown workspaces.
|
||||
# It should not contain any dependency information.
|
||||
Reference in New Issue
Block a user