Skip to content
Merged
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ node_modules
package-lock.json
jspm_packages

# TypeScript output
lib/

# Don't commit generated JS bundles
examples/**/static/dist/bundle.js
examples/**/dist
11 changes: 10 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const js = require("@eslint/js");
const jsEslint = require("@eslint/js");
const {
defineConfig,
globalIgnores,
} = require("eslint/config");
const eslintConfigGoogle = require('eslint-config-google');
const tsEslint = require('typescript-eslint');

// 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
Expand Down Expand Up @@ -54,6 +55,7 @@ var SHAREDB_RULES = {
module.exports = defineConfig([
{
extends: [eslintConfigGoogle],
files: ["**/*.js"],
ignores: ['eslint.config.js'],

languageOptions: {
Expand All @@ -67,6 +69,13 @@ module.exports = defineConfig([

rules: Object.assign({}, DISABLED_ES6_OPTIONS, SHAREDB_RULES),
},
{
extends: [
jsEslint.configs.recommended,
tsEslint.configs.recommended,
],
files: ["**/*.ts"],
},
globalIgnores(["docs/"]),
{
files: ["examples/counter-json1-vite/*.js"],
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^24.12.0",
"chai": "^6.2.2",
"eslint": "^10.1.0",
"eslint-config-google": "^0.14.0",
Expand All @@ -22,7 +23,9 @@
"rich-text": "^4.1.0",
"sharedb-legacy": "npm:sharedb@1.1.0",
"sinon": "^21.0.3",
"sinon-chai": "^4.0.1"
"sinon-chai": "^4.0.1",
"typescript": "~6.0.2",
"typescript-eslint": "^8.58.0"
},
"files": [
"lib/",
Expand Down
File renamed without changes.
File renamed without changes.
Loading