diff --git a/.eslintrc.js b/.eslintrc.js index e650f4d1..584c3267 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,7 @@ module.exports = { root: true, env: { commonjs: true, - es2021: true, + es2023: true, node: true, }, parserOptions: { @@ -27,7 +27,7 @@ module.exports = { env: { serviceworker: true, browser: true, - es2021: true, + es2023: true, }, parserOptions: { ecmaVersion: 'latest', @@ -50,7 +50,7 @@ module.exports = { env: { mocha: true, browser: true, - es2021: true, + es2023: true, }, parserOptions: { ecmaVersion: 'latest', @@ -72,64 +72,12 @@ module.exports = { env: { mocha: true, commonjs: true, - es2021: true, + es2023: true, }, rules: { 'global-require': ['off'], }, }, - { - files: [ - 'plugins/*/public/**/*.js', - ], - extends: 'preact', - env: { - browser: true, - es2021: true, - }, - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - }, - globals: { - Chat: 'readonly', - Preact: 'readonly', - PreactHooks: 'readonly', - plugins: 'readonly', - }, - rules: { - 'jest/no-deprecated-functions': 'off', - 'import/prefer-default-export': 'off', - 'import/extensions': ['off'], - }, - }, - { - files: [ - 'packages/app/**/*.js', - 'packages/app/**/*.ts', - 'packages/app/**/*.tsx', - 'packages/app/**/*.jsx', - ], - extends: 'preact', - env: { - browser: true, - es2021: true, - }, - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - }, - globals: { - EMOJI: 'writable', - API_URL: 'readonly', - APP_URL: 'readonly', - }, - rules: { - 'jest/no-deprecated-functions': 'off', - 'import/prefer-default-export': 'off', - 'import/extensions': ['off'], - }, - }, { files: [ '**/*.ts', diff --git a/package.json b/package.json index d2e870c5..ee44b257 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "dev:srv": "pnpm run --filter @quack/server dev", "dev": "run-p dev:srv dev:web", "test": "migrate-mongo up && pnpm run --filter @quack/server test", - "lint": "FORCE_COLOR=true eslint --fix .", + "lint": "FORCE_COLOR=true eslint --fix . && pnpm run --filter @quack/app lint", "lint:ci": "eslint .", "test:ci": "pnpm run --filter @quack/server test:ci" }, diff --git a/packages/app/.eslintrc.cjs b/packages/app/.eslintrc.cjs index a90ddc95..89e3f4f0 100644 --- a/packages/app/.eslintrc.cjs +++ b/packages/app/.eslintrc.cjs @@ -1,6 +1,6 @@ module.exports = { root: true, - env: { browser: true, es2020: true }, + env: { browser: true, es2023: true }, extends: [ 'eslint:recommended', 'plugin:react/recommended',