Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra Chores #53

Merged
merged 6 commits into from
Jul 13, 2023
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
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tab_width 1
32 changes: 31 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,34 @@ public/data/*
public/data/
*.es.js

sites/docs/public/README.md
sites/docs/public/README.md

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?


sites/docs/public/QuietModeCodeMirror.tsx
sites/docs/public/QuietModeCompare.tsx
sites/docs/public/QuietModeUs.tsx
7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

20 changes: 0 additions & 20 deletions package.json

This file was deleted.

1 change: 1 addition & 0 deletions packages/prong-editor/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
"warn",
{ allowConstantExport: true },
],
"@typescript-eslint/no-redundant-type-constituents": 0,
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/ban-ts-comment": 0,
Expand Down
24 changes: 0 additions & 24 deletions packages/prong-editor/.gitignore

This file was deleted.

9 changes: 8 additions & 1 deletion packages/prong-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,17 @@
"@types/node": "^20.4.0",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^1.1.4",
"acorn-jsx": "^5.3.2",
"babel-loader": "^8.2.3",
"eslint": "^8.44.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"jest": "^29.6.1",
"json-schema": "^0.4.0",
"prettier": "^3.0.0",
"ts-jest": "^29.1.1",
"typescript": "^4.5.5",
"vite": "^2.7.13",
Expand All @@ -67,4 +74,4 @@
"require": "./dist/style.css"
}
}
}
}
1 change: 1 addition & 0 deletions packages/prong-editor/src/lib/ComputeMenuContents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { vegaCode } from "../../../../sites/docs/src/examples/example-data";
import { materializeAnyOfOption } from "./menu-content/schema-based";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const VegaSchema = require("../../../../sites/docs/src/constants/vega-schema.json");

const schema = {
$id: "https://example.com/arrays.schema.json",
$schema: "https://json-schema.org/draft/2020-12/schema",
Expand Down
6 changes: 2 additions & 4 deletions packages/prong-editor/src/lib/compute-menu-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ export const literalTypes: Record<string, string> = {
};

export const liminalNodeTypes = new Set(["⚠", "{", "}", "[", "]"]);
export function retargetToAppropriateNode(
node: SyntaxNode | SyntaxNode
): SyntaxNode | SyntaxNode {
export function retargetToAppropriateNode(node: SyntaxNode): SyntaxNode {
let targetNode = node;
if (liminalNodeTypes.has(node.type.name)) {
targetNode = node.parent!;
Expand Down Expand Up @@ -163,7 +161,7 @@ export function simpleMerge(content: MenuRow[]): MenuRow[] {

return Object.entries(groups).map(
([label, elements]) =>
({ label, elements: deduplicate(elements).filter((x) => x) } as MenuRow)
({ label, elements: deduplicate(elements).filter((x) => x) }) as MenuRow
);
}

Expand Down
7 changes: 7 additions & 0 deletions packages/prong-editor/src/stylesheets/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
:root {
/* --blue: #1e90ff;
--white: #ffffff; */
--menu-background: #f5f5f5;
--menu-accent: #009979;
}

/* UTILS */

.prong-flex {
Expand Down
Loading