Skip to content

Commit

Permalink
yarn biome check --write .
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremywiebe committed Oct 24, 2024
1 parent 363a63c commit 197ed4b
Show file tree
Hide file tree
Showing 40 changed files with 191 additions and 290 deletions.
22 changes: 11 additions & 11 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", {"repo": "Khan/perseus"}],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"updateInternalDependents": "always"
}
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "Khan/perseus" }],
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"updateInternalDependents": "always"
}
}
26 changes: 13 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:16",
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:16",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [6006],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [6006],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn install"
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn install"

// Configure tool-specific properties.
// "customizations": {},
// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
8 changes: 2 additions & 6 deletions .nycrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,5 @@
"packages/*/src/**/*.ts",
"packages/*/src/**/*.tsx"
],
"exclude": [
"**/*.stories.tsx",
"**/*.test.ts",
"**/*.test.tsx"
]
}
"exclude": ["**/*.stories.tsx", "**/*.test.ts", "**/*.test.tsx"]
}
4 changes: 2 additions & 2 deletions config/cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"esModuleInterop": true,
// be explicit about types included
// to avoid clashing with Jest types
"types": ["cypress", "node", "cypress-real-events"]
"types": ["cypress", "node", "cypress-real-events"],
},
"include": ["**/*.ts", "**/*.tsx"]
"include": ["**/*.ts", "**/*.tsx"],
}
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"repository": "[email protected]:Khan/perseus.git",
"license": "MIT",
"private": true,
"workspaces": [
"dev",
"packages/*",
"config/build"
],
"workspaces": ["dev", "packages/*", "config/build"],
"engines": {
"node": ">=20"
},
Expand Down
12 changes: 2 additions & 10 deletions packages/kas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"module": "dist/es/index.js",
"main": "dist/index.js",
"source": "src/index.js",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"gen:parsers": "node src/parser-generator.ts",
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
Expand All @@ -36,11 +34,5 @@
"peerDependencies": {
"underscore": "1.4.4"
},
"keywords": [
"parsing",
"equation",
"expression",
"algebra",
"symbolic"
]
"keywords": ["parsing", "equation", "expression", "algebra", "symbolic"]
}
6 changes: 2 additions & 4 deletions packages/kas/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"extends": "../tsconfig-shared.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "src"
"rootDir": "src",
},
"references": [
{"path": "../perseus-core/tsconfig-build.json"}
]
"references": [{ "path": "../perseus-core/tsconfig-build.json" }],
}
4 changes: 1 addition & 3 deletions packages/keypad-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"module": "dist/es/index.js",
"main": "dist/index.js",
"source": "src/index.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/keypad-context/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
"outDir": "./dist",
"rootDir": "src",
},
"references": [
{"path": "../perseus-core/tsconfig-build.json"}
]
"references": [{ "path": "../perseus-core/tsconfig-build.json" }],
}
4 changes: 1 addition & 3 deletions packages/kmath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
"module": "dist/es/index.js",
"main": "dist/index.js",
"source": "src/index.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
},
Expand Down
28 changes: 11 additions & 17 deletions packages/kmath/src/__tests__/vector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,17 @@ describe("kvector", function () {
expect(result).toBe(false);
});

it(
"vector.collinear should return true on two collinear vectors of " +
"the same magnitude but different direction",
function () {
const result = vector.collinear([3, 3], [-3, -3]);
expect(result).toBe(true);
},
);

it(
"vector.collinear should return true on two collinear vectors of " +
"different magnitudes",
function () {
const result = vector.collinear([2, 1], [6, 3]);
expect(result).toBe(true);
},
);
it("vector.collinear should return true on two collinear vectors of " +
"the same magnitude but different direction", function () {
const result = vector.collinear([3, 3], [-3, -3]);
expect(result).toBe(true);
});

it("vector.collinear should return true on two collinear vectors of " +
"different magnitudes", function () {
const result = vector.collinear([2, 1], [6, 3]);
expect(result).toBe(true);
});

it("vector.collinear should return false on non-collinear vectors", function () {
const result = vector.collinear([1, 2], [-1, 2]);
Expand Down
4 changes: 1 addition & 3 deletions packages/kmath/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
"outDir": "./dist",
"rootDir": "src",
},
"references": [
{"path": "../perseus-core/tsconfig-build.json"}
]
"references": [{ "path": "../perseus-core/tsconfig-build.json" }],
}
4 changes: 1 addition & 3 deletions packages/math-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
},
"./styles.css": "./dist/index.css"
},
"files": [
"dist"
],
"files": ["dist"],
"scripts": {},
"dependencies": {
"@khanacademy/keypad-context": "^1.0.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/math-input/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"rootDir": "src",
},
"references": [
{"path": "../perseus-core/tsconfig-build.json"},
{"path": "../keypad-context/tsconfig-build.json"},
]
{ "path": "../perseus-core/tsconfig-build.json" },
{ "path": "../keypad-context/tsconfig-build.json" },
],
}
4 changes: 1 addition & 3 deletions packages/perseus-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"module": "dist/es/index.js",
"main": "dist/index.js",
"source": "src/index.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
},
Expand Down
8 changes: 3 additions & 5 deletions packages/perseus-core/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
"paths": {
// NOTE(kevinb): We have to repeat this here because TS doesn't do
// intelligent merge of tsconfig.json files when using `extends`.
"@khanacademy/*": [
"../*/src"
]
}
"@khanacademy/*": ["../*/src"],
},
},
"references": [
/* Add in-repo pacakge references here, like this:
{"path": "../path/to/package/tsconfig-build.json"}
*/
]
],
}
4 changes: 1 addition & 3 deletions packages/perseus-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
},
"./styles.css": "./dist/index.css"
},
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/perseus-editor/src/__tests__/traversal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ describe("Traversal", () => {
content: `${options.content}\n\nnew content!`,
});
});
expect(newOptions.content).toBe(
"[[☃ input-number 1]]\n\nnew content!",
);
expect(newOptions.content).toBe("[[☃ input-number 1]]\n\nnew content!");
expect(newOptions.widgets).toEqual(sampleOptions.widgets);
assertNonMutative();
});
Expand Down
2 changes: 0 additions & 2 deletions packages/perseus-editor/src/multirenderer-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import type {
APIOptions,
ChangeHandler,
EditorMode,

// Multi-item item types
Item,
// ItemTree is used below, the linter is confused.
Expand All @@ -37,7 +36,6 @@ import type {
ContentNode,
HintNode,
TagsNode,

// Multi-item shape types
Shape,
ArrayShape,
Expand Down
16 changes: 7 additions & 9 deletions packages/perseus-editor/tsconfig-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
"hubble": ["../../vendor/hubble/hubble.js"],
// NOTE(kevinb): We have to repeat this here because TS doesn't do
// intelligent merge of tsconfig.json files when using `extends`.
"@khanacademy/*": [
"../*/src"
]
}
"@khanacademy/*": ["../*/src"],
},
},
"references": [
{"path": "../kas/tsconfig-build.json"},
{"path": "../kmath/tsconfig-build.json"},
{"path": "../perseus/tsconfig-build.json"},
{"path": "../perseus-core/tsconfig-build.json"},
]
{ "path": "../kas/tsconfig-build.json" },
{ "path": "../kmath/tsconfig-build.json" },
{ "path": "../perseus/tsconfig-build.json" },
{ "path": "../perseus-core/tsconfig-build.json" },
],
}
4 changes: 1 addition & 3 deletions packages/perseus-linter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
"module": "dist/es/index.js",
"main": "dist/index.js",
"source": "src/index.ts",
"files": [
"dist"
],
"files": ["dist"],
"scripts": {
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
},
Expand Down
Loading

0 comments on commit 197ed4b

Please sign in to comment.