Files
Verso/server-ce/eslint.config.mjs
Brian Gough f8c7e092fa upgrade to eslint v10 (#34054)
* upgrade from eslint version 8 to eslint version 10

* remove unsupported eslint-env directive

* include jsx files in latexqc linting

* use basePath and extends to maintain paths in writefull eslint

* fix yarn.lock

with ./bin/yarn install

* preserve existing glob patterns in web eslint config

* restore original comments

* fix worker path

* corrected comment about eslint-plugin-mocha

* remove unused imports

* remove unused import of includeIgnoreFile

* switch to individual eslit.config.mjs files

* fix lint errors on eslint.config.mjs in web

* update build scripts for eslint.config.mjs

* update volumes for RUN_LINTING_CI_MONOREPO in web Makefile

updated manually as this makefile is not autogenerated
the RUN_LINTING_CI_MONOREPO command is only used for prettier, not eslint, but updating for consistency.

* migrate from mocha/no-skipped-tests to mocha/no-pending-tests

see https://github.com/lo1tuma/eslint-plugin-mocha/pull/365
"rule no-skipped-tests has been removed, its functionality has been merged into the existing no-pending-tests rule"

GitOrigin-RevId: 2c8f25c8049a0dba374a51df1214286bb5093a51
2026-06-03 08:06:29 +00:00

34 lines
1.1 KiB
JavaScript

import { defineConfig, globalIgnores } from 'eslint/config'
import cypress from 'eslint-plugin-cypress/flat'
import path from 'node:path'
import baseConfig from '../eslint.config.mjs'
const ROOT_DIR = path.resolve(import.meta.dirname, '..')
export default defineConfig([
globalIgnores(['**/hotfix/', '**/develop/']),
{
basePath: ROOT_DIR,
extends: baseConfig,
languageOptions: {
ecmaVersion: 2020,
},
},
{
// The cypress block in baseConfig has patterns rooted at the
// monorepo root (`server-ce/test/helpers/*.ts`). When ESLint loads
// this file (server-ce/eslint.config.mjs) as the closest config --
// which happens when running `yarn run lint` from
// /overleaf/server-ce/test/ -- patterns from baseConfig are
// resolved relative to /overleaf/server-ce/, so those cross-dir
// patterns don't match. Re-declare with paths relative to this
// config file.
files: [
'test/helpers/*.ts',
'test/cypress/support/*.{js,jsx,mjs,cjs,ts,tsx}',
'**/*.spec.ts',
],
...cypress.configs.recommended,
},
])