mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 23:28:11 +08:00
Add auto-formatting to client and server modules
One thing that can make linting faster is auto-formatting. This commit adds the yapf auto-formatting tool to the server module and uses eslint's "fix" functionality to speed up the linting/formatting process.
This commit is contained in:
@@ -54,6 +54,13 @@ build-for-server-dev: clean-server build-client
|
|||||||
cp client/build/service-worker.js server/app/web/static/js/
|
cp client/build/service-worker.js server/app/web/static/js/
|
||||||
|
|
||||||
|
|
||||||
|
# FORMATTING CODE
|
||||||
|
|
||||||
|
.PHOHY: fmt
|
||||||
|
fmt: fmt-client fmt-server
|
||||||
|
|
||||||
|
fmt-%:
|
||||||
|
cd $(*) && $(MAKE) fmt
|
||||||
|
|
||||||
|
|
||||||
# CREATING DISTRIBUTION RELEASE
|
# CREATING DISTRIBUTION RELEASE
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ install:
|
|||||||
build: install
|
build: install
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
|
.PHONY: fmt
|
||||||
|
fmt:
|
||||||
|
npm run fmt
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
"clean": "rimraf build",
|
"clean": "rimraf build",
|
||||||
"dev": "npm run clean && webpack --config configuration/webpack/webpack.config.dev.js",
|
"dev": "npm run clean && webpack --config configuration/webpack/webpack.config.dev.js",
|
||||||
"e2e": "node node_modules/jest/bin/jest.js --verbose false --config __tests__/e2e/e2eJestConfig.json e2e/e2e.test.js",
|
"e2e": "node node_modules/jest/bin/jest.js --verbose false --config __tests__/e2e/e2eJestConfig.json e2e/e2e.test.js",
|
||||||
|
"fmt": "eslint --fix src",
|
||||||
"lint": "eslint src",
|
"lint": "eslint src",
|
||||||
"smoke-test": "start-server-and-test start-server-for-test :5000 e2e",
|
"smoke-test": "start-server-and-test start-server-for-test :5000 e2e",
|
||||||
"start": "node server/development.js",
|
"start": "node server/development.js",
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[style]
|
||||||
|
based_on_style = google
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
.PHONY: fmt
|
||||||
|
fmt:
|
||||||
|
yapf -ir .
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -f app/web/templates/index.html
|
rm -f app/web/templates/index.html
|
||||||
|
|||||||
Reference in New Issue
Block a user