ci: expand CI checks and make consumer sync opt-in
- Add Go, npm, Python, and Java validation to CI - Run Go tests against PostgreSQL - Record performance fixes in the report
This commit is contained in:
1 parent
199a5efaef
commit
22887fef03
100 files changed
+9740
-429
No files matched your search
@@ -0,0 +1,58 @@
|
||||
import js from '@eslint/js';
|
||||
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||
import svelte from 'eslint-plugin-svelte';
|
||||
import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
// An unused binding is fine when its name starts with an underscore (a prop or argument kept for
|
||||
// its position or its documentation).
|
||||
const unusedUnderscore = [
|
||||
'error',
|
||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
|
||||
];
|
||||
|
||||
// Lints the JavaScript, TypeScript and Svelte first-party code. The Go, Python and Java packages
|
||||
// have their own linters (gofmt and go vet, ruff), and generated output is never linted.
|
||||
export default defineConfig([
|
||||
globalIgnores([
|
||||
'**/dist/**',
|
||||
'**/.svelte-kit/**',
|
||||
'**/node_modules/**',
|
||||
'backend/**',
|
||||
'contract/**',
|
||||
'packages/java-backend/**',
|
||||
'packages/python-backend/**',
|
||||
'shared-styles.css',
|
||||
]),
|
||||
js.configs.recommended,
|
||||
{ rules: { 'no-unused-vars': unusedUnderscore } },
|
||||
{
|
||||
files: ['**/*.ts', '**/*.svelte'],
|
||||
extends: [tseslint.configs.recommended],
|
||||
rules: { 'no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': unusedUnderscore },
|
||||
},
|
||||
svelte.configs.recommended,
|
||||
{
|
||||
files: ['packages/node-backend/**/*.js', 'scripts/**/*.{js,mjs}', 'eslint.config.js'],
|
||||
languageOptions: { globals: globals.node },
|
||||
},
|
||||
{
|
||||
files: ['packages/web-ui/**/*.{ts,svelte}'],
|
||||
languageOptions: { globals: globals.browser },
|
||||
},
|
||||
{
|
||||
files: ['**/*.svelte', '**/*.svelte.ts'],
|
||||
languageOptions: { parserOptions: { parser: tseslint.parser } },
|
||||
},
|
||||
{
|
||||
// These three Svelte rules ask for changes to how shipped components render or hold state
|
||||
// (keyed each blocks, derived state, reactive Map and Set). That changes consumer-visible
|
||||
// behaviour, so it is a decision for a component change, not for the lint set-up.
|
||||
files: ['packages/web-ui/**/*.{ts,svelte}'],
|
||||
rules: {
|
||||
'svelte/require-each-key': 'off',
|
||||
'svelte/prefer-writable-derived': 'off',
|
||||
'svelte/prefer-svelte-reactivity': 'off',
|
||||
},
|
||||
},
|
||||
]);
|
||||
Reference in new issue
Block a user