FlowDeck CI / lint (push) Successful in 43s
FlowDeck CI / test (push) Successful in 4m2s
FlowDeck CI / lint (pull_request) Successful in 42s
FlowDeck CI / test (pull_request) Successful in 4m3s
FlowDeck CI / docker (push) Successful in 1m2s
FlowDeck CI / docker (pull_request) Successful in 35s
tests/conftest.py: mutate the settings singleton (instead of rebinding) so DB + backup dir are isolated per test -> pytest-xdist safe. Real backup tests (snapshot/prune/admin API) and OAuth mock tests (Gitea/GitHub/link) replace the previous skips. init_db() now also creates webhook_subscriptions (full schema without the FastAPI lifespan). ruff check is clean; .eslintrc.json migrated to eslint.config.mjs (flat config). CI: lint job (ruff + eslint), parallel tests (-n auto), run on every branch push. VERSION 5.11.1.
64 lines
2.8 KiB
JavaScript
64 lines
2.8 KiB
JavaScript
// FlowDeck — ESLint flat config (v5.2.0).
|
|
// ESLint v9+ requires the flat config format; the legacy `.eslintrc.json`
|
|
// is no longer read. Run with: `npx eslint static/js`.
|
|
//
|
|
// Self-contained on purpose: no dependency on the `globals` npm package so the
|
|
// config works with a globally-installed ESLint (no node_modules required).
|
|
|
|
const browserGlobals = {
|
|
// Browser / DOM
|
|
window: "readonly", document: "readonly", navigator: "readonly",
|
|
location: "readonly", history: "readonly", screen: "readonly",
|
|
localStorage: "readonly", sessionStorage: "readonly", console: "readonly",
|
|
alert: "readonly", confirm: "readonly", prompt: "readonly", fetch: "readonly",
|
|
setTimeout: "readonly", clearTimeout: "readonly", setInterval: "readonly",
|
|
clearInterval: "readonly", requestAnimationFrame: "readonly",
|
|
cancelAnimationFrame: "readonly", requestIdleCallback: "readonly",
|
|
cancelIdleCallback: "readonly", queueMicrotask: "readonly",
|
|
XMLHttpRequest: "readonly", FormData: "readonly", Blob: "readonly",
|
|
File: "readonly", FileReader: "readonly", URL: "readonly",
|
|
URLSearchParams: "readonly", Image: "readonly", Event: "readonly",
|
|
CustomEvent: "readonly", EventSource: "readonly", WebSocket: "readonly",
|
|
DOMParser: "readonly", Node: "readonly", NodeList: "readonly",
|
|
Element: "readonly", HTMLElement: "readonly", getComputedStyle: "readonly",
|
|
matchMedia: "readonly", IntersectionObserver: "readonly",
|
|
MutationObserver: "readonly", ResizeObserver: "readonly",
|
|
performance: "readonly", crypto: "readonly", btoa: "readonly",
|
|
atob: "readonly", structuredClone: "readonly",
|
|
// ECMAScript built-ins
|
|
JSON: "readonly", Math: "readonly", Date: "readonly", Promise: "readonly",
|
|
Object: "readonly", Array: "readonly", String: "readonly", Number: "readonly",
|
|
Boolean: "readonly", Symbol: "readonly", Map: "readonly", Set: "readonly",
|
|
WeakMap: "readonly", WeakSet: "readonly", Error: "readonly",
|
|
TypeError: "readonly", RangeError: "readonly", RegExp: "readonly",
|
|
Proxy: "readonly", Reflect: "readonly", Intl: "readonly",
|
|
parseInt: "readonly", parseFloat: "readonly", isNaN: "readonly",
|
|
isFinite: "readonly", encodeURIComponent: "readonly",
|
|
decodeURIComponent: "readonly", encodeURI: "readonly", decodeURI: "readonly",
|
|
globalThis: "readonly", Infinity: "readonly", NaN: "readonly",
|
|
// FlowDeck front-end libraries
|
|
Alpine: "readonly", htmx: "readonly", Sortable: "readonly",
|
|
// Globals exposed on window by app.js
|
|
openModal: "readonly", closeModal: "readonly",
|
|
};
|
|
|
|
export default [
|
|
{
|
|
ignores: ["static/js/*.min.js", "static/js/vendor/**"],
|
|
},
|
|
{
|
|
files: ["static/js/**/*.js"],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: "script",
|
|
globals: browserGlobals,
|
|
},
|
|
rules: {
|
|
"no-unused-vars": ["warn", { args: "none" }],
|
|
"no-undef": "warn",
|
|
"no-extra-semi": "warn",
|
|
"no-empty": "warn",
|
|
},
|
|
},
|
|
];
|