Skip to content

Commit 39787c5

Browse files
committed
Improve and run prettier
1 parent 94c2634 commit 39787c5

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

.prettierrc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
{
2-
"semi": false,
3-
"singleQuote": true,
4-
"trailingComma": "none",
5-
"printWidth": 120,
6-
"arrowParens": "avoid"
7-
}
1+
"@yandeu/prettier-config"

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode"]
3+
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"bundle": "webpack --config webpack.bundle.js",
1313
"test": "jest --collectCoverage",
1414
"clean": "rimraf lib",
15-
"format": "prettier --write src/**/*.ts",
15+
"format": "prettier --write src/**/*.ts && prettier --write test/**/*.js",
1616
"prepublishOnly": "npm run build && npm test && npm run bundle"
1717
},
1818
"keywords": [
@@ -37,19 +37,19 @@
3737
},
3838
"homepage": "http://geckos.io",
3939
"dependencies": {
40+
"@yandeu/prettier-config": "^0.0.2",
4041
"lodash": "^4.17.21"
4142
},
4243
"devDependencies": {
4344
"@types/lodash": "^4.14.177",
4445
"jest": "^27.4.0",
4546
"nodemon": "^2.0.15",
4647
"npm-run-all": "^4.1.5",
47-
"prettier": "^2.5.0",
4848
"rimraf": "^3.0.2",
4949
"ts-loader": "^9.2.6",
5050
"typescript": "^4.5.2"
5151
},
5252
"funding": {
5353
"url": "https://github.com/sponsors/yandeu"
5454
}
55-
}
55+
}

test/benchmark.test.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
const {
2-
BufferSchema,
3-
Model,
4-
uint8,
5-
int8,
6-
int16,
7-
uint16
8-
} = require('../lib/index.js')
1+
const { BufferSchema, Model, uint8, int8, int16, uint16 } = require('../lib/index.js')
92

103
describe('simple test', () => {
114
const playerSchema = BufferSchema.schema('player', {

test/schemaId.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ describe('get schema id test', () => {
1212
const buffer = model.toBuffer(state)
1313

1414
test('should get the same ids', () => {
15-
1615
const bufferId = BufferSchema.getIdFromBuffer(buffer)
1716
const schemaId = BufferSchema.getIdFromSchema(schema)
1817
const modelId = BufferSchema.getIdFromModel(model)

0 commit comments

Comments
 (0)