diff --git a/examples/write-patterns/.eslintrc.cjs b/examples/write-patterns/.eslintrc.cjs index 7f182f116c..b630f873ab 100644 --- a/examples/write-patterns/.eslintrc.cjs +++ b/examples/write-patterns/.eslintrc.cjs @@ -5,37 +5,37 @@ module.exports = { node: true, }, extends: [ - `eslint:recommended`, - `plugin:@typescript-eslint/recommended`, - `plugin:prettier/recommended`, + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', ], parserOptions: { ecmaVersion: 2022, requireConfigFile: false, - sourceType: `module`, + sourceType: 'module', ecmaFeatures: { jsx: true, }, }, - parser: `@typescript-eslint/parser`, - plugins: [`prettier`], + parser: '@typescript-eslint/parser', + plugins: ['prettier'], rules: { - quotes: [`error`, `backtick`], - "no-unused-vars": `off`, - "@typescript-eslint/no-unused-vars": [ - `error`, + quotes: ['error', 'single'], + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', { - argsIgnorePattern: `^_`, - varsIgnorePattern: `^_`, - caughtErrorsIgnorePattern: `^_`, + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', }, ], }, ignorePatterns: [ - `**/node_modules/**`, - `**/dist/**`, - `tsup.config.ts`, - `vitest.config.ts`, - `.eslintrc.js`, + '**/node_modules/**', + '**/dist/**', + 'tsup.config.ts', + 'vitest.config.ts', + '.eslintrc.js', ], } diff --git a/examples/write-patterns/.prettierrc b/examples/write-patterns/.prettierrc index 31cd55f911..ad4d895523 100644 --- a/examples/write-patterns/.prettierrc +++ b/examples/write-patterns/.prettierrc @@ -1,6 +1,6 @@ { - "trailingComma": "es5", "semi": false, "singleQuote": true, - "tabWidth": 2 + "tabWidth": 2, + "trailingComma": "es5" } diff --git a/examples/write-patterns/package.json b/examples/write-patterns/package.json index 181b241c59..9630b7aca0 100644 --- a/examples/write-patterns/package.json +++ b/examples/write-patterns/package.json @@ -14,6 +14,7 @@ "db:migrate": "dotenv -e ../../.env.dev -- pnpm exec pg-migrations apply --directory ./shared/migrations", "dev": "concurrently \"vite\" \"node shared/backend/api.js\"", "build": "vite build", + "format": "eslint . --ext ts,tsx --fix", "stylecheck": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "typecheck": "tsc --noEmit" diff --git a/examples/write-patterns/patterns/1-online-writes/index.tsx b/examples/write-patterns/patterns/1-online-writes/index.tsx index baeebfd914..b50c60f49d 100644 --- a/examples/write-patterns/patterns/1-online-writes/index.tsx +++ b/examples/write-patterns/patterns/1-online-writes/index.tsx @@ -19,17 +19,13 @@ export default function OnlineWrites() { }) if (isLoading) { - return ( -