diff --git a/eslint.config.mjs b/eslint.config.mjs index c70a3b88..9863dc78 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,41 +1,37 @@ import { defineConfig } from 'eslint/config'; -import globals from 'globals'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; import js from '@eslint/js'; -import { FlatCompat } from '@eslint/eslintrc'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default defineConfig([{ - extends: compat.extends('eslint:recommended'), +import stylistic from '@stylistic/eslint-plugin'; +import globals from 'globals'; - languageOptions: { - globals: { - ...globals.browser, - ...globals.commonjs, - ...globals.es2015, - ...globals.node, - ...globals.mocha, +export default defineConfig([ + js.configs.recommended, + { + plugins: { + '@stylistic': stylistic, + }, + languageOptions: { + globals: { + ...globals.browser, + ...globals.commonjs, + ...globals.es2017, + ...globals.node, + ...globals.mocha, + }, + ecmaVersion: 2017, + sourceType: 'module', + }, + rules: { + 'no-console': 'off', + 'no-unused-vars': 'off', + '@stylistic/linebreak-style': ['error', 'unix'], + '@stylistic/quotes': ['error', 'single'], + '@stylistic/semi': ['error', 'always'], }, - - ecmaVersion: 8, - sourceType: 'module', - }, - - ignores: ['**/eslint.config.*'], - - rules: { - 'linebreak-style': ['error', 'unix'], - quotes: ['error', 'single'], - semi: ['error', 'always'], - 'no-console': 0, - 'no-unused-vars': 0, }, -}]); \ No newline at end of file + { + files: ['**/eslint.config.*'], + languageOptions: { + ecmaVersion: 2021, // Node 18 + } + } +]); \ No newline at end of file diff --git a/package.json b/package.json index 37f5c1c7..5d70f302 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,10 @@ "lint": "eslint ." }, "devDependencies": { - "@eslint/eslintrc": "^3.3.5", "@eslint/js": "9.39.4", + "@stylistic/eslint-plugin": "^5.10.0", "@types/node": "^24.10.0", "eslint": "^9.39.4", - "eslint-config-google": "^0.14.0", "firebase-tools": "^14.24.0", "globals": "^17.4.0", "pnpm": "^10.20.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6aa58971..e4fb83a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,21 +8,18 @@ importers: .: devDependencies: - '@eslint/eslintrc': - specifier: ^3.3.5 - version: 3.3.5 '@eslint/js': specifier: 9.39.4 version: 9.39.4 + '@stylistic/eslint-plugin': + specifier: ^5.10.0 + version: 5.10.0(eslint@9.39.4) '@types/node': specifier: ^24.10.0 version: 24.12.0 eslint: specifier: ^9.39.4 version: 9.39.4 - eslint-config-google: - specifier: ^0.14.0 - version: 0.14.0(eslint@9.39.4) firebase-tools: specifier: ^14.24.0 version: 14.27.0(@types/node@24.12.0)(typescript@5.9.3) @@ -711,6 +708,12 @@ packages: '@so-ric/colorspace@1.1.6': resolution: {integrity: sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw==} + '@stylistic/eslint-plugin@5.10.0': + resolution: {integrity: sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^9.0.0 || ^10.0.0 + '@tootallnate/once@2.0.0': resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} @@ -818,6 +821,10 @@ packages: '@types/triple-beam@1.3.5': resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} + '@typescript-eslint/types@8.57.0': + resolution: {integrity: sha512-dTLI8PEXhjUC7B9Kre+u0XznO696BhXcTlOn0/6kf1fHaQW8+VjJAVHJ3eTI14ZapTxdkOmc80HblPQLaEeJdg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + abbrev@4.0.0: resolution: {integrity: sha512-a1wflyaL0tHtJSmLSOVybYhy22vRih4eduhhrkcjgrWGnRfrZtovJ2FRjxuTtkkj47O/baf0R86QU5OuYpz8fA==} engines: {node: ^20.17.0 || >=22.9.0} @@ -1602,12 +1609,6 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-config-google@0.14.0: - resolution: {integrity: sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==} - engines: {node: '>=0.10.0'} - peerDependencies: - eslint: '>=5.16.0' - eslint-scope@8.4.0: resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -4017,7 +4018,7 @@ snapshots: '@eslint/config-array@0.21.2': dependencies: '@eslint/object-schema': 2.1.7 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 minimatch: 3.1.5 transitivePeerDependencies: - supports-color @@ -4033,7 +4034,7 @@ snapshots: '@eslint/eslintrc@3.3.5': dependencies: ajv: 6.14.0 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 espree: 10.4.0 globals: 14.0.0 ignore: 5.3.2 @@ -4554,6 +4555,16 @@ snapshots: color: 5.0.3 text-hex: 1.0.0 + '@stylistic/eslint-plugin@5.10.0(eslint@9.39.4)': + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4) + '@typescript-eslint/types': 8.57.0 + eslint: 9.39.4 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + estraverse: 5.3.0 + picomatch: 4.0.3 + '@tootallnate/once@2.0.0': {} '@tootallnate/quickjs-emscripten@0.23.0': {} @@ -4677,6 +4688,8 @@ snapshots: '@types/triple-beam@1.3.5': {} + '@typescript-eslint/types@8.57.0': {} + abbrev@4.0.0: optional: true @@ -4706,7 +4719,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -4966,7 +4979,7 @@ snapshots: dependencies: bytes: 3.1.2 content-type: 1.0.5 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 http-errors: 2.0.1 iconv-lite: 0.7.2 on-finished: 2.4.1 @@ -5321,6 +5334,10 @@ snapshots: dependencies: ms: 2.1.2 + debug@4.4.3: + dependencies: + ms: 2.1.3 + debug@4.4.3(supports-color@8.1.1): dependencies: ms: 2.1.3 @@ -5469,10 +5486,6 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-google@0.14.0(eslint@9.39.4): - dependencies: - eslint: 9.39.4 - eslint-scope@8.4.0: dependencies: esrecurse: 4.3.0 @@ -5499,7 +5512,7 @@ snapshots: ajv: 6.14.0 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 escape-string-regexp: 4.0.0 eslint-scope: 8.4.0 eslint-visitor-keys: 4.2.1 @@ -5652,7 +5665,7 @@ snapshots: content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 @@ -5754,7 +5767,7 @@ snapshots: finalhandler@2.1.1: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 @@ -6147,7 +6160,7 @@ snapshots: dependencies: basic-ftp: 5.2.0 data-uri-to-buffer: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -6425,14 +6438,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -6445,14 +6458,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -7245,7 +7258,7 @@ snapshots: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 get-uri: 6.0.5 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 @@ -7342,8 +7355,7 @@ snapshots: picomatch@2.3.1: {} - picomatch@4.0.3: - optional: true + picomatch@4.0.3: {} pkce-challenge@5.0.1: {} @@ -7352,7 +7364,7 @@ snapshots: portfinder@1.0.38: dependencies: async: 3.2.6 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -7447,7 +7459,7 @@ snapshots: proxy-agent@6.5.0: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 @@ -7660,7 +7672,7 @@ snapshots: router@2.2.0: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 @@ -7718,7 +7730,7 @@ snapshots: send@1.2.1: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 @@ -7809,7 +7821,7 @@ snapshots: socks-proxy-agent@8.0.5: dependencies: agent-base: 7.1.4 - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 socks: 2.8.7 transitivePeerDependencies: - supports-color @@ -8190,7 +8202,7 @@ snapshots: universal-analytics@0.5.3: dependencies: - debug: 4.4.3(supports-color@8.1.1) + debug: 4.4.3 uuid: 8.3.2 transitivePeerDependencies: - supports-color