Files
learning-platform/eslint.config.js
RaymondVerhoef 8a8745fad2
All checks were successful
On Push to Main / test (push) Successful in 30s
On Push to Main / publish (push) Successful in 59s
On Push to Main / deploy-dev (push) Successful in 1m33s
feat: show build SHA + timestamp in a small footer for deploy verification
Adds a BuildStamp component pinned to the bottom-right of every page
(desktop only, dim monospace text) so it's obvious at a glance which
build is currently running.

The git short SHA and an ISO build timestamp are injected at build time
via Vite's `define`, falling back to 'unknown' if git is not available.
ESLint config declares the two compile-time constants as readonly
globals so no per-file disable comments are needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 15:20:46 +02:00

46 lines
1.2 KiB
JavaScript

import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
globalIgnores(['dist', 'pb_migrations']),
{
files: ['**/*.{js,jsx}'],
extends: [
js.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
globals: {
...globals.browser,
__BUILD_SHA__: 'readonly',
__BUILD_TIME__: 'readonly',
},
parserOptions: { ecmaFeatures: { jsx: true } },
},
rules: {
// Conventional initial-load pattern across the admin/chat surface;
// refactoring every effect is out of scope and not currently
// observed to cause cascading renders in practice.
'react-hooks/set-state-in-effect': 'off',
},
},
{
files: ['src/store/AppContext.jsx'],
rules: {
'react-refresh/only-export-components': 'off',
},
},
{
files: ['vite.config.js'],
languageOptions: { globals: { ...globals.node } },
},
{
files: ['src/lib/__tests__/**/*.{js,jsx}'],
languageOptions: { globals: { ...globals.node } },
},
])