ci/woodpecker/pr/calendar Pipeline was successful
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/config Pipeline was successful
ci/woodpecker/pr/db Pipeline was successful
ci/woodpecker/pr/jobs Pipeline was successful
ci/woodpecker/pr/video-chat Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/pr/worker Pipeline was successful
ci/woodpecker/push/calendar Pipeline was successful
ci/woodpecker/push/cli Pipeline was successful
ci/woodpecker/push/config Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/jobs Pipeline was successful
ci/woodpecker/push/video-chat Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/worker Pipeline was successful
Replace prom-client with @prometheus-io/client 0.16.1 and retain the private authenticated web-to-worker bridge with native JSON aggregation and explicit collection health. Keep Prometheus recording in dedicated metrics modules, use explicit HTTP outcome recorders and operation observers, and document appointment outcomes, bounded provider failures and handler activity. Remove Node collectors and background sampling. Closes #100
71 lines
2.1 KiB
JavaScript
71 lines
2.1 KiB
JavaScript
import path from 'node:path';
|
|
import { includeIgnoreFile } from '@eslint/compat';
|
|
import js from '@eslint/js';
|
|
import svelte from 'eslint-plugin-svelte';
|
|
import { defineConfig } from 'eslint/config';
|
|
import globals from 'globals';
|
|
import prettier from 'eslint-config-prettier';
|
|
import ts from 'typescript-eslint';
|
|
import { loadConfig } from '@sveltejs/load-config';
|
|
|
|
const loadedConfig = await loadConfig(import.meta.dirname, { traverse: false });
|
|
if (!loadedConfig) throw new Error('Svelte configuration not found');
|
|
if ('error' in loadedConfig) throw loadedConfig.error;
|
|
const svelteConfig = loadedConfig.config;
|
|
|
|
const gitignorePath = path.resolve(import.meta.dirname, '../../.gitignore');
|
|
|
|
export default defineConfig(
|
|
includeIgnoreFile(gitignorePath),
|
|
{ ignores: ['e2e/fixture/data/**'] },
|
|
js.configs.recommended,
|
|
ts.configs.recommended,
|
|
svelte.configs.recommended,
|
|
prettier,
|
|
...svelte.configs.prettier,
|
|
{
|
|
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
|
rules: {
|
|
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
|
|
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
|
|
'no-undef': 'off'
|
|
}
|
|
},
|
|
{
|
|
files: ['src/**/*.ts', 'src/**/*.svelte'],
|
|
ignores: ['src/lib/server/metrics/**', 'src/**/*.test.ts'],
|
|
rules: {
|
|
'no-restricted-imports': [
|
|
'error',
|
|
{
|
|
patterns: [
|
|
{
|
|
group: ['@prometheus-io/client', '@prometheus-io/client/*', '**/metrics/registry*'],
|
|
message:
|
|
'Keep Prometheus details inside server/metrics; use an observer or an explicit HTTP outcome recorder.'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
extraFileExtensions: ['.svelte'],
|
|
parser: ts.parser,
|
|
svelteConfig
|
|
}
|
|
}
|
|
},
|
|
{
|
|
rules: {
|
|
// Type-safe route resolution is overkill for our scale; we'll add it
|
|
// back if/when route renames bite.
|
|
'svelte/no-navigation-without-resolve': 'off'
|
|
}
|
|
}
|
|
);
|