From 78685ce062e8cb9711d5efdff08d2cec247b6e7d Mon Sep 17 00:00:00 2001 From: Wesley Finck Date: Fri, 5 Sep 2025 14:37:20 -0700 Subject: [PATCH] format fix --- eslint.config.mjs | 247 +++++++++--------- src/webapp/.storybook/vitest.setup.ts | 4 +- .../components/AddToCollectionModal.tsx | 2 +- .../Skeleton.CollectionSelector.tsx | 2 +- src/webapp/vitest.shims.d.ts | 2 +- 5 files changed, 132 insertions(+), 125 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 34e321dd..4a9b1c57 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,133 +1,140 @@ // For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format -import storybook from "eslint-plugin-storybook"; +import storybook from 'eslint-plugin-storybook'; import js from '@eslint/js'; import prettierPlugin from 'eslint-plugin-prettier'; import tseslint from '@typescript-eslint/eslint-plugin'; import tsparser from '@typescript-eslint/parser'; -export default [js.configs.recommended, { - ignores: [ - 'src/webapp/**', - 'dist/**', - 'node_modules/**', - 'src/modules/atproto/infrastructure/lexicon/**', - ], -}, { - files: ['**/*.js'], - languageOptions: { - ecmaVersion: 2022, - sourceType: 'script', - globals: { - console: 'readonly', - process: 'readonly', - Buffer: 'readonly', - __dirname: 'readonly', - __filename: 'readonly', - module: 'readonly', - require: 'readonly', - exports: 'readonly', - global: 'readonly', - setTimeout: 'readonly', - }, - }, - plugins: { - prettier: prettierPlugin, - }, - rules: { - 'prettier/prettier': 'error', - 'no-unused-vars': 'warn', - 'no-console': 'warn', - }, -}, { - files: ['**/*.ts'], - plugins: { - '@typescript-eslint': tseslint, - prettier: prettierPlugin, +export default [ + js.configs.recommended, + { + ignores: [ + 'src/webapp/**', + 'dist/**', + 'node_modules/**', + 'src/modules/atproto/infrastructure/lexicon/**', + ], }, - languageOptions: { - parser: tsparser, - ecmaVersion: 2022, - sourceType: 'module', - globals: { - console: 'readonly', - process: 'readonly', - Buffer: 'readonly', - __dirname: 'readonly', - __filename: 'readonly', - module: 'readonly', - require: 'readonly', - exports: 'readonly', - global: 'readonly', - fetch: 'readonly', - // Jest globals - describe: 'readonly', - test: 'readonly', - it: 'readonly', - expect: 'readonly', - beforeAll: 'readonly', - beforeEach: 'readonly', - afterAll: 'readonly', - afterEach: 'readonly', - jest: 'readonly', - URLSearchParams: 'readonly', - setTimeout: 'readonly', - NodeJS: 'readonly', - clearTimeout: 'readonly', - setImmediate: 'readonly', + { + files: ['**/*.js'], + languageOptions: { + ecmaVersion: 2022, + sourceType: 'script', + globals: { + console: 'readonly', + process: 'readonly', + Buffer: 'readonly', + __dirname: 'readonly', + __filename: 'readonly', + module: 'readonly', + require: 'readonly', + exports: 'readonly', + global: 'readonly', + setTimeout: 'readonly', + }, }, - }, - rules: { - 'prettier/prettier': 'error', - 'no-unused-vars': 'off', // Turn off base rule - '@typescript-eslint/no-unused-vars': 'warn', - 'no-console': 'warn', - }, -}, { - files: ['**/*.test.ts', '**/*.spec.ts'], - languageOptions: { - parser: tsparser, - ecmaVersion: 2022, - sourceType: 'module', - globals: { - console: 'readonly', - process: 'readonly', - Buffer: 'readonly', - __dirname: 'readonly', - __filename: 'readonly', - module: 'readonly', - require: 'readonly', - exports: 'readonly', - global: 'readonly', - fetch: 'readonly', - // Jest globals - describe: 'readonly', - test: 'readonly', - it: 'readonly', - expect: 'readonly', - beforeAll: 'readonly', - beforeEach: 'readonly', - afterAll: 'readonly', - afterEach: 'readonly', - jest: 'readonly', - // Browser globals for e2e tests using Playwright - document: 'readonly', - window: 'readonly', - navigator: 'readonly', - location: 'readonly', - setTimeout: 'readonly', - NodeJS: 'readonly', - clearTimeout: 'readonly', + plugins: { + prettier: prettierPlugin, + }, + rules: { + 'prettier/prettier': 'error', + 'no-unused-vars': 'warn', + 'no-console': 'warn', }, }, - plugins: { - '@typescript-eslint': tseslint, - prettier: prettierPlugin, + { + files: ['**/*.ts'], + plugins: { + '@typescript-eslint': tseslint, + prettier: prettierPlugin, + }, + languageOptions: { + parser: tsparser, + ecmaVersion: 2022, + sourceType: 'module', + globals: { + console: 'readonly', + process: 'readonly', + Buffer: 'readonly', + __dirname: 'readonly', + __filename: 'readonly', + module: 'readonly', + require: 'readonly', + exports: 'readonly', + global: 'readonly', + fetch: 'readonly', + // Jest globals + describe: 'readonly', + test: 'readonly', + it: 'readonly', + expect: 'readonly', + beforeAll: 'readonly', + beforeEach: 'readonly', + afterAll: 'readonly', + afterEach: 'readonly', + jest: 'readonly', + URLSearchParams: 'readonly', + setTimeout: 'readonly', + NodeJS: 'readonly', + clearTimeout: 'readonly', + setImmediate: 'readonly', + }, + }, + rules: { + 'prettier/prettier': 'error', + 'no-unused-vars': 'off', // Turn off base rule + '@typescript-eslint/no-unused-vars': 'warn', + 'no-console': 'warn', + }, }, - rules: { - 'prettier/prettier': 'error', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'warn', - 'no-console': 'warn', + { + files: ['**/*.test.ts', '**/*.spec.ts'], + languageOptions: { + parser: tsparser, + ecmaVersion: 2022, + sourceType: 'module', + globals: { + console: 'readonly', + process: 'readonly', + Buffer: 'readonly', + __dirname: 'readonly', + __filename: 'readonly', + module: 'readonly', + require: 'readonly', + exports: 'readonly', + global: 'readonly', + fetch: 'readonly', + // Jest globals + describe: 'readonly', + test: 'readonly', + it: 'readonly', + expect: 'readonly', + beforeAll: 'readonly', + beforeEach: 'readonly', + afterAll: 'readonly', + afterEach: 'readonly', + jest: 'readonly', + // Browser globals for e2e tests using Playwright + document: 'readonly', + window: 'readonly', + navigator: 'readonly', + location: 'readonly', + setTimeout: 'readonly', + NodeJS: 'readonly', + clearTimeout: 'readonly', + }, + }, + plugins: { + '@typescript-eslint': tseslint, + prettier: prettierPlugin, + }, + rules: { + 'prettier/prettier': 'error', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': 'warn', + 'no-console': 'warn', + }, }, -}, ...storybook.configs["flat/recommended"]]; + ...storybook.configs['flat/recommended'], +]; diff --git a/src/webapp/.storybook/vitest.setup.ts b/src/webapp/.storybook/vitest.setup.ts index c5ed05fa..e8c7ed3a 100644 --- a/src/webapp/.storybook/vitest.setup.ts +++ b/src/webapp/.storybook/vitest.setup.ts @@ -1,7 +1,7 @@ -import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview"; +import * as a11yAddonAnnotations from '@storybook/addon-a11y/preview'; import { setProjectAnnotations } from '@storybook/nextjs-vite'; import * as projectAnnotations from './preview'; // This is an important step to apply the right configuration when testing your stories. // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations -setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]); \ No newline at end of file +setProjectAnnotations([a11yAddonAnnotations, projectAnnotations]); diff --git a/src/webapp/components/AddToCollectionModal.tsx b/src/webapp/components/AddToCollectionModal.tsx index 52296583..48fab24e 100644 --- a/src/webapp/components/AddToCollectionModal.tsx +++ b/src/webapp/components/AddToCollectionModal.tsx @@ -143,7 +143,7 @@ export function AddToCollectionModal({ )} - +