Skip to content

Commit

Permalink
Fix #91 - code format with prettier, integrate with eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
dnil committed Oct 25, 2024
1 parent 06bb87f commit 0e820cf
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ env:
es2021: true
extends:
- standard
- eslint:recommended
- "prettier"
parserOptions:
ecmaVersion: 12
sourceType: module
Expand Down
2 changes: 2 additions & 0 deletions assets/js/interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ export class InteractiveCanvas extends BaseScatterTrack {
})
// when user asks for Y zoom
this.staticCanvas.addEventListener('zoomY', event => {
// clear with old coord context
this.clearStaticContent()
// also needs to clear for track draw
if (event.detail.direction === 'out') {
this.log2.yStart += 1
this.log2.yEnd -= 1
Expand Down
35 changes: 35 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"scripts": {
"build": "gulp build",
"lint": "eslint assets",
"lint:fix": "npm run lint -- --fix",
"prettier": "npx prettier assets --check",
"prettier:fix": "npm run prettier -- --write",
"format": "npm run prettier:fix && npm run lint:fix",
"watch": "gulp watch",
"test": "jest"
},
Expand Down Expand Up @@ -47,6 +51,7 @@
"@babel/preset-env": "^7.13.10",
"css-loader": "^5.2.7",
"eslint": "^7.22.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
Expand All @@ -58,6 +63,7 @@
"gulp-sourcemaps": "^3.0.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"prettier": "3.3.3",
"process": "^0.11.10",
"regenerator-runtime": "^0.13.7",
"sass": "^1.32.8",
Expand Down

0 comments on commit 0e820cf

Please sign in to comment.