Skip to content

Commit

Permalink
style: move prettier config to root and format codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
alvrs committed May 13, 2022
1 parent 9a29452 commit ca72d45
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 45 deletions.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
"devDependencies": {
"commitizen": "^4.2.4",
"cz-conventional-changelog": "3.3.0",
"lerna": "^4.0.0"
"lerna": "^4.0.0",
"prettier": "^2.6.2"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"scripts": {
"commit": "cz"
"commit": "cz",
"prettier:check": "prettier --check 'packages/**/*.ts'",
"prettier": "prettier --write 'packages/**/*.ts'"
}
}
14 changes: 6 additions & 8 deletions packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"devDependencies": {
"@ethersproject/abi": "^5.6.0",
"@ethersproject/providers": "^5.6.1",
"@mud/recs": "0.0.1",
"@mud/utils": "0.0.1",
"@rollup/plugin-commonjs": "^21.0.2",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.1",
Expand All @@ -23,26 +25,22 @@
"ethers": "^5.5.4",
"jest": "^27.5.1",
"mobx": "^6.5.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.2",
"rollup": "^2.70.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rxjs": "^7.5.5",
"ts-jest": "^27.1.3",
"ts-node": "^10.7.0",
"tslib": "^2.3.1",
"typescript": "^4.6.2",
"@mud/recs": "0.0.1",
"@mud/utils": "0.0.1"
"typescript": "^4.6.2"
},
"peerDependencies": {
"@mud/recs": "0.0.1",
"@mud/utils": "0.0.1",
"async-mutex": "^0.3.2",
"ethers": "^5.5.4",
"mobx": "^6.5.0",
"rxjs": "^7.5.5",
"@mud/recs": "0.0.1",
"@mud/utils": "0.0.1"

"rxjs": "^7.5.5"
},
"dependencies": {}
}
1 change: 0 additions & 1 deletion packages/phaserx/.prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions packages/phaserx/.prettierrc

This file was deleted.

9 changes: 4 additions & 5 deletions packages/phaserx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test": "jest"
},
"devDependencies": {
"@mud/utils": "0.0.1",
"@rollup/plugin-commonjs": "^21.0.2",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^8.3.1",
Expand All @@ -19,21 +20,19 @@
"jest": "^27.5.1",
"mobx": "^6.4.2",
"phaser": "3.60.0-beta.4",
"prettier": "^2.6.0",
"rimraf": "^3.0.2",
"rollup": "^2.70.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rxjs": "^7.5.5",
"ts-jest": "^27.1.3",
"tslib": "^2.3.1",
"typescript": "^4.6.2",
"@mud/utils": "0.0.1"
"typescript": "^4.6.2"
},
"peerDependencies": {
"@mud/utils": "0.0.1",
"mobx": "^6.5.0",
"phaser": "3.60.0-beta.4",
"rxjs": "^7.5.5",
"@mud/utils": "0.0.1"
"rxjs": "^7.5.5"
},
"dependencies": {
"@use-gesture/vanilla": "^10.2.9"
Expand Down
6 changes: 0 additions & 6 deletions packages/recs/.prettierrc

This file was deleted.

1 change: 0 additions & 1 deletion packages/recs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"eslint": "^8.9.0",
"jest": "^27.5.1",
"mobx": "^6.4.2",
"prettier": "^2.6.0",
"rimraf": "^3.0.2",
"rollup": "^2.69.0",
"rollup-plugin-commonjs": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/recs/src/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function createEntity<Cs extends Schema[]>(

export function removeEntity(world: World, entity: Entity) {
const components = getEntityComponents(world, entity);
for(const component of components) {
for (const component of components) {
removeComponent(component, entity);
}
}
2 changes: 1 addition & 1 deletion packages/recs/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export enum Type {
Entity,
OptionalEntity,
EntityArray,
OptionalEntityArray
OptionalEntityArray,
}
11 changes: 10 additions & 1 deletion packages/recs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ export {
overridableComponent,
} from "./Component";
export { defineSystem, defineAutorunSystem, defineReactionSystem, defineSyncSystem, defineRxSystem } from "./System";
export { defineQuery, getQueryResult, defineEnterQuery, defineExitQuery, defineUpdateQuery, Has, Not, HasValue } from "./Query";
export {
defineQuery,
getQueryResult,
defineEnterQuery,
defineExitQuery,
defineUpdateQuery,
Has,
Not,
HasValue,
} from "./Query";
export { Type } from "./constants";
export type {
Component,
Expand Down
6 changes: 0 additions & 6 deletions packages/utils/.prettierrc

This file was deleted.

3 changes: 1 addition & 2 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"eslint": "^8.9.0",
"jest": "^27.5.1",
"mobx": "^6.5.0",
"prettier": "^2.6.0",
"proxy-deep": "^3.1.1",
"rimraf": "^3.0.2",
"rollup": "^2.69.0",
Expand All @@ -33,4 +32,4 @@
"proxy-deep": "^3.1.1",
"rxjs": "^7.5.5"
}
}
}
8 changes: 4 additions & 4 deletions packages/utils/src/area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export function areaContains(area: Area, coord: Coord) {

export function coordsOf(area: Area) {
const coords: Coord[] = [];
for(let dx = 0; dx < area.width; dx++) {
for(let dy = 0; dy < area.height; dy++) {
coords.push({x: area.x + dx, y: area.y + dy})
for (let dx = 0; dx < area.width; dx++) {
for (let dy = 0; dy < area.height; dy++) {
coords.push({ x: area.x + dx, y: area.y + dy });
}
}
return coords;
}
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6246,7 +6246,7 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

prettier@^2.5.1, prettier@^2.6.0:
prettier@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032"
integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==
Expand Down

0 comments on commit ca72d45

Please sign in to comment.