SPB Git

spb/drive Public

SPB Drive — self-hosted personal cloud drive (files, previews, sharing) on the MacLustr cluster.

JavaScript 82.7% CSS 10.6% Nunjucks 3.6% Shell 1.8% SQL 1.3%
2.2 KB · 49 lines javascript
Raw Blame History
1/**2 * ─────────────────────────────────────────────3 *  SPB Drive — Personal Cloud Drive4 * ─────────────────────────────────────────────5 *  Author  : Simon-Pierre Boucher6 *  Contact : contact@spboucher.ai7 *  File    : eslint.config.mjs8 *  Purpose : ESLint flat config — node + browser sources9 *  License : MIT © Simon-Pierre Boucher10 * ─────────────────────────────────────────────11 */1213import js from '@eslint/js';1415const browserGlobals = {16  window: 'readonly', document: 'readonly', location: 'readonly', localStorage: 'readonly',17  fetch: 'readonly', navigator: 'readonly', console: 'readonly', setTimeout: 'readonly',18  clearTimeout: 'readonly', setInterval: 'readonly', URL: 'readonly', URLSearchParams: 'readonly',19  Blob: 'readonly', FontFace: 'readonly', IntersectionObserver: 'readonly', TextDecoder: 'readonly',20  atob: 'readonly', escape: 'readonly', globalThis: 'readonly',21};2223const nodeGlobals = {24  process: 'readonly', console: 'readonly', Buffer: 'readonly', setTimeout: 'readonly',25  setInterval: 'readonly', clearTimeout: 'readonly', URL: 'readonly', URLSearchParams: 'readonly',26  fetch: 'readonly', TextDecoder: 'readonly', globalThis: 'readonly', Int16Array: 'readonly',27};2829export default [30  js.configs.recommended,31  {32    files: ['src/**/*.mjs', 'cli/**/*.mjs', 'scripts/**/*.mjs', 'test/**/*.mjs'],33    languageOptions: { ecmaVersion: 2024, sourceType: 'module', globals: nodeGlobals },34    rules: {35      'no-unused-vars': ['error', { argsIgnorePattern: '^_|^req$|^reply$', varsIgnorePattern: '^_' }],36      'no-empty': ['error', { allowEmptyCatch: true }],37    },38  },39  {40    files: ['src/web/assets/js/**/*.js'],41    languageOptions: { ecmaVersion: 2024, sourceType: 'module', globals: browserGlobals },42    rules: {43      'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],44      'no-empty': ['error', { allowEmptyCatch: true }],45      'no-unused-expressions': 'off',46    },47  },48];49