From 7c6593fca170696bbeec59eb4d27586f9b672462 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jun 2026 14:00:12 +0000 Subject: [PATCH 1/2] Bump eslint from 7.32.0 to 10.5.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 10.5.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v10.5.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 10.5.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e11e2d7..4d00a45 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "async": "^3.2.3", "chai": "^6.2.2", "coveralls": "^3.0.7", - "eslint": "^7.32.0", + "eslint": "^10.5.0", "eslint-config-google": "^0.14.0", "mocha": "^6.2.2", "nyc": "^18.0.0", From f0ea438e9973c1e8d2dd7b69378627476a787112 Mon Sep 17 00:00:00 2001 From: Alec Gibson <12036746+alecgibson@users.noreply.github.com> Date: Mon, 29 Jun 2026 11:58:12 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=A7=20Migrate=20ESLint=20config=20?= =?UTF-8?q?to=20flat=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous commit bumped `eslint` to v10, but ESLint 9+ dropped support for the legacy `.eslintrc` format and the `--ignore-path` flag, so `npm run lint` failed before linting a single file. This change ports `.eslintrc.js` to a flat `eslint.config.js` with the same rules: it spreads `eslint-config-google`, then layers our ES3 overrides on top. `parserOptions.ecmaVersion` becomes `languageOptions`, and `ignorePatterns` becomes `ignores` (`node_modules` is ignored by default now). The `lint` script drops `--ignore-path .gitignore` in favour of plain `eslint .`. Google's config still enables `valid-jsdoc` and `require-jsdoc`, both of which ESLint removed from core, so we keep our existing overrides turning them off to keep the config loadable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .eslintrc.js => eslint.config.js | 33 +++++++++++++++++++------------- package.json | 2 +- 2 files changed, 21 insertions(+), 14 deletions(-) rename .eslintrc.js => eslint.config.js (78%) diff --git a/.eslintrc.js b/eslint.config.js similarity index 78% rename from .eslintrc.js rename to eslint.config.js index 97d5b92..07d6f05 100644 --- a/.eslintrc.js +++ b/eslint.config.js @@ -1,3 +1,5 @@ +var google = require('eslint-config-google'); + // The ESLint ecmaVersion argument is inconsistently used. Some rules will ignore it entirely, so if the rule has // been set, it will still error even if it's not applicable to that version number. Since Google sets these // rules, we have to turn them off ourselves. @@ -44,21 +46,26 @@ var SHAREDB_RULES = { // as-needed quote props are easier to write 'quote-props': ['error', 'as-needed' ], + // Google still enables these, but ESLint removed them from core, so turning them off keeps the config loadable 'require-jsdoc': 'off', 'valid-jsdoc': 'off' }; -module.exports = { - extends: 'google', - parserOptions: { - ecmaVersion: 3 +module.exports = [ + { + ignores: ['docs/', 'coverage/'] }, - rules: Object.assign( - {}, - DISABLED_ES6_OPTIONS, - SHAREDB_RULES - ), - ignorePatterns: [ - '/docs/' - ] -}; + { + files: ['**/*.js'], + languageOptions: { + ecmaVersion: 3, + sourceType: 'commonjs' + }, + rules: Object.assign( + {}, + google.rules, + DISABLED_ES6_OPTIONS, + SHAREDB_RULES + ) + } +]; diff --git a/package.json b/package.json index 4d00a45..3605188 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "In-memory database adapter with MongoDB API for ShareDB", "main": "index.js", "scripts": { - "lint": "./node_modules/.bin/eslint --ignore-path .gitignore '**/*.js'", + "lint": "./node_modules/.bin/eslint .", "lint:fix": "npm run lint -- --fix", "test": "mocha", "test-cover": "node_modules/nyc/bin/nyc.js --temp-dir=coverage -r text -r lcov node_modules/mocha/bin/_mocha"