Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: 'Install Deps'
run: npm ci
run: yarn install --immutable
- name: 'Build'
run: npm run build
run: yarn build
test:
runs-on: ubuntu-latest

Expand All @@ -35,10 +36,10 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: 'Install Deps'
run: npm ci
run: yarn install --immutable
- name: 'Lint'
run: npm run lint
run: yarn lint
- name: 'Typecheck'
run: npm run typecheck
run: yarn typecheck
- name: 'Test'
run: npm run test
run: yarn test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ node_modules

.envrc
coverage
.kvcache
.kvcache
.yarn/install-state.gz
15 changes: 15 additions & 0 deletions .yarn/patches/@keyvhq-memoize-npm-2.1.11-a8a4b45386.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/index.js b/src/index.js
index 2eb0d8d66994251e492c25a07b49dc4a09ec4256..0c7f0485cfc430af6cf75710b2da566543780150 100644
--- a/src/index.js
+++ b/src/index.js
@@ -88,8 +88,8 @@ function memoize (

if (isStale) {
promise
- .then(() => (pending[key] = undefined))
- .catch(error => (info.staleError = error))
+ .catch((error) => (info.staleError = error))
+ .then(() => (pending[key] = undefined));
return done(data.value)
}

942 changes: 942 additions & 0 deletions .yarn/releases/yarn-4.10.3.cjs

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
enableScripts: false

nodeLinker: node-modules

npmMinimalAgeGate: 10080

npmPreapprovedPackages:
- "@electron/*"

yarnPath: .yarn/releases/yarn-4.10.3.cjs
2 changes: 1 addition & 1 deletion app/data/markdown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('renderMarkdownSafely', () => {

test('renders links correctly', () => {
expect(renderMarkdownSafely('[foo](https://electronjs.org)')).toMatchInlineSnapshot(`
"<p class="mb-2 text-base text-gray-800 dark:text-gray-200"><a class="text-[#0366d6] dark:text-[#58a6ff] hover:underline font-medium" rel="noopener noreferrer" href="https://electronjs.org" target="_blank">foo</a></p>
"<p class="mb-2 text-base text-gray-800 dark:text-gray-200"><a href="https://electronjs.org" rel="noopener noreferrer" class="text-[#0366d6] dark:text-[#58a6ff] hover:underline font-medium" target="_blank">foo</a></p>
"
`);
});
Expand Down
173 changes: 93 additions & 80 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,116 +1,129 @@
import { defineConfig, globalIgnores } from "eslint/config";
import globals from "globals";
import { fixupConfigRules, fixupPluginRules, includeIgnoreFile } from "@eslint/compat";
import react from "eslint-plugin-react";
import { defineConfig, globalIgnores } from 'eslint/config';
import globals from 'globals';
import { fixupConfigRules, fixupPluginRules, includeIgnoreFile } from '@eslint/compat';
import react from 'eslint-plugin-react';
// @ts-expect-error no types
import jsxA11Y from "eslint-plugin-jsx-a11y";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
// @ts-expect-error no types
import _import from "eslint-plugin-import";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import jsxA11Y from 'eslint-plugin-jsx-a11y';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import _import from 'eslint-plugin-import';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const compat = new FlatCompat({
baseDirectory: path.dirname(fileURLToPath(import.meta.url)),
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
baseDirectory: path.dirname(fileURLToPath(import.meta.url)),
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url));
const gitignorePath = fileURLToPath(new URL('.gitignore', import.meta.url));

export default defineConfig([includeIgnoreFile(gitignorePath), globalIgnores(["!**/.server", "!**/.client"]), {
extends: compat.extends("eslint:recommended"),
export default defineConfig([
includeIgnoreFile(gitignorePath),
globalIgnores(['!**/.server', '!**/.client']),
{
extends: compat.extends('eslint:recommended'),

languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
},
globals: {
...globals.browser,
...globals.commonjs,
},

ecmaVersion: "latest",
sourceType: "module",
ecmaVersion: 'latest',
sourceType: 'module',

parserOptions: {
ecmaFeatures: {
jsx: true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
}, {
files: ["**/*.{js,jsx,ts,tsx}"],

extends: fixupConfigRules(compat.extends(
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
)),
},
{
files: ['**/*.{js,jsx,ts,tsx}'],

extends: fixupConfigRules(
compat.extends(
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
),
),

plugins: {
react: fixupPluginRules(react),
"jsx-a11y": fixupPluginRules(jsxA11Y),
react: fixupPluginRules(react),
'jsx-a11y': fixupPluginRules(jsxA11Y),
},

settings: {
react: {
version: "detect",
},

formComponents: ["Form"],
react: {
version: 'detect',
},

linkComponents: [{
name: "Link",
linkAttribute: "to",
}, {
name: "NavLink",
linkAttribute: "to",
}],
formComponents: ['Form'],

"import/resolver": {
typescript: {},
linkComponents: [
{
name: 'Link',
linkAttribute: 'to',
},
},
}, {
files: ["**/*.{ts,tsx}"],
{
name: 'NavLink',
linkAttribute: 'to',
},
],

extends: fixupConfigRules(compat.extends(
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
)),
'import/resolver': {
typescript: {},
},
},
},
{
files: ['**/*.{ts,tsx}'],

extends: fixupConfigRules(
compat.extends(
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
),
),

plugins: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
"@typescript-eslint": fixupPluginRules(typescriptEslint as any),
import: fixupPluginRules(_import),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
'@typescript-eslint': fixupPluginRules(typescriptEslint as any),
import: fixupPluginRules(_import),
},

languageOptions: {
parser: tsParser,
parser: tsParser,
},

settings: {
"import/internal-regex": "^~/",
'import/internal-regex': '^~/',

"import/resolver": {
node: {
extensions: [".ts", ".tsx"],
},
'import/resolver': {
node: {
extensions: ['.ts', '.tsx'],
},

typescript: {
alwaysTryTypes: true,
},
typescript: {
alwaysTryTypes: true,
},
},
},
}, {
files: ["**/.eslintrc.cjs"],
},
{
files: ['**/.eslintrc.cjs'],

languageOptions: {
globals: {
...globals.node,
},
globals: {
...globals.node,
},
},
}]);
},
]);
Loading