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

Add eslint cache #1114

Merged
merged 4 commits into from
Feb 6, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ tests/index.js
app.yaml
yarn-error.log

.eslintcache

# IntelliJ
.idea/

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"build:jsdocs": "node ./build/scripts/docs/index.js",
"test": "node ./build/scripts/test.js",
"coverage": "node ./build/scripts/test.js --coverage",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint": "eslint . --cache",
"lint:fix": "eslint . --fix --cache",
"postinstall": "tsc --project ./scripts/tsconfig.json && copyfiles ./scripts/utils/browser/openChrome.applescript ./build"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions src/app/core/tools/WiringTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {Port, Wire} from "core/models";


export const WiringTool = (() => {
enum StateType {
CLICKED,
DRAGGED,
const enum StateType {
Clicked,
Dragged,
}

let port: Port;
Expand Down Expand Up @@ -84,8 +84,8 @@ export const WiringTool = (() => {
// 2) if the port was initial dragged on,
// then letting go of the mouse will deactivate this
// 3) the user cancels using Escape, Backspace or RMB
return (stateType === StateType.CLICKED && event.type === "click") ||
(stateType === StateType.DRAGGED && event.type === "mouseup") ||
return (stateType === StateType.Clicked && event.type === "click") ||
(stateType === StateType.Dragged && event.type === "mouseup") ||
(event.type === "keydown" && event.key === "Escape") ||
(event.type === "keydown" && event.key === "Backspace") ||
(event.type === "mousedown" && event.button === RIGHT_MOUSE_BUTTON);
Expand All @@ -100,7 +100,7 @@ export const WiringTool = (() => {
wire = info.designer.createWire(port, undefined);
setWirePoint(port.getWorldTargetPos());

stateType = (event.type === "click" ? StateType.CLICKED : StateType.DRAGGED);
stateType = (event.type === "click" ? StateType.Clicked : StateType.Dragged);
},
onDeactivate({}: Event, info: CircuitInfo): void {
const { history, designer } = info;
Expand Down
2 changes: 1 addition & 1 deletion src/site/pages/digital/src/utils/DigitalCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function DigitalCreateN(pos: Vector, itemId: string, designer: DigitalCir
}


export enum SmartPlaceOptions {
export const enum SmartPlaceOptions {
Off = 0,
Inputs = 1 << 0,
Outputs = 1 << 1,
Expand Down