spb/spbgit Public MIT
SPB Git — the platform hosting itself
JavaScript 73.9%
CSS 11.7%
Nunjucks 11.6%
Shell 2.7%
1/**2 * ─────────────────────────────────────────────3 * SPB Git — Personal Git Platform4 * ─────────────────────────────────────────────5 * Author : Simon-Pierre Boucher6 * Contact : contact@spboucher.ai7 * File : eslint.config.mjs8 * Purpose : ESLint flat configuration for the whole project9 * License : MIT © Simon-Pierre Boucher10 * ─────────────────────────────────────────────11 */1213import js from '@eslint/js';1415export default [16 js.configs.recommended,17 {18 ignores: ['node_modules/**', 'dev/**', 'coverage/**', 'dist/**', 'src/web/assets/vendor/**'],19 },20 {21 files: ['**/*.mjs', '**/*.cjs', '**/*.js'],22 languageOptions: {23 ecmaVersion: 2024,24 sourceType: 'module',25 globals: {26 console: 'readonly',27 process: 'readonly',28 Buffer: 'readonly',29 URL: 'readonly',30 URLSearchParams: 'readonly',31 fetch: 'readonly',32 setTimeout: 'readonly',33 clearTimeout: 'readonly',34 setInterval: 'readonly',35 clearInterval: 'readonly',36 queueMicrotask: 'readonly',37 AbortController: 'readonly',38 TextEncoder: 'readonly',39 TextDecoder: 'readonly',40 crypto: 'readonly',41 structuredClone: 'readonly',42 },43 },44 rules: {45 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],46 'no-console': 'off',47 eqeqeq: ['error', 'smart'],48 'prefer-const': 'error',49 'no-var': 'error',50 },51 },52 {53 files: ['deploy/ecosystem.config.cjs'],54 languageOptions: {55 sourceType: 'commonjs',56 globals: { module: 'writable', require: 'readonly', __dirname: 'readonly', process: 'readonly' },57 },58 },59 {60 files: ['src/web/assets/js/**/*.js'],61 languageOptions: {62 sourceType: 'script',63 globals: {64 window: 'readonly',65 document: 'readonly',66 localStorage: 'readonly',67 navigator: 'readonly',68 location: 'readonly',69 matchMedia: 'readonly',70 requestAnimationFrame: 'readonly',71 history: 'readonly',72 CustomEvent: 'readonly',73 fetch: 'readonly',74 setTimeout: 'readonly',75 clearTimeout: 'readonly',76 console: 'readonly',77 },78 },79 rules: {80 // Plain browser scripts (no build step): var + empty catch are idiomatic.81 'no-var': 'off',82 'no-unused-vars': ['error', { caughtErrors: 'none' }],83 },84 },85];86