mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
chore: use local prettier
This commit is contained in:
parent
14f208fff9
commit
46db20172c
6 changed files with 19 additions and 15 deletions
2
.prettierignore
Normal file
2
.prettierignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
js/msg_generated.ts
|
||||||
|
js/flatbuffers.js
|
2
js/os.ts
2
js/os.ts
|
@ -48,7 +48,7 @@ export function codeFetch(
|
||||||
moduleName: codeFetchRes.moduleName(),
|
moduleName: codeFetchRes.moduleName(),
|
||||||
filename: codeFetchRes.filename(),
|
filename: codeFetchRes.filename(),
|
||||||
sourceCode: codeFetchRes.sourceCode(),
|
sourceCode: codeFetchRes.sourceCode(),
|
||||||
outputCode: codeFetchRes.outputCode(),
|
outputCode: codeFetchRes.outputCode()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"@types/source-map-support": "^0.4.1",
|
"@types/source-map-support": "^0.4.1",
|
||||||
"flatbuffers": "^1.9.0",
|
"flatbuffers": "^1.9.0",
|
||||||
"parcel-bundler": "^1.8.1",
|
"parcel-bundler": "^1.8.1",
|
||||||
|
"prettier": "^1.13.7",
|
||||||
"tslint": "^5.10.0",
|
"tslint": "^5.10.0",
|
||||||
"tslint-eslint-rules": "^5.3.1",
|
"tslint-eslint-rules": "^5.3.1",
|
||||||
"tslint-no-circular-imports": "^0.5.0",
|
"tslint-no-circular-imports": "^0.5.0",
|
||||||
|
|
|
@ -5,6 +5,9 @@ from glob import glob
|
||||||
from util import run
|
from util import run
|
||||||
|
|
||||||
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
third_party_path = os.path.join(root_path, "third_party")
|
||||||
|
prettier = os.path.join(third_party_path, "node_modules", "prettier",
|
||||||
|
"bin-prettier.js")
|
||||||
|
|
||||||
os.chdir(root_path)
|
os.chdir(root_path)
|
||||||
# TODO(ry) Install clang-format in third_party.
|
# TODO(ry) Install clang-format in third_party.
|
||||||
|
@ -14,12 +17,6 @@ for fn in ["BUILD.gn", ".gn"] + glob("build_extra/**/*.gn*"):
|
||||||
run(["gn", "format", fn])
|
run(["gn", "format", fn])
|
||||||
# TODO(ry) Install yapf in third_party.
|
# TODO(ry) Install yapf in third_party.
|
||||||
run(["yapf", "-i"] + glob("tools/*.py"))
|
run(["yapf", "-i"] + glob("tools/*.py"))
|
||||||
# TODO(ry) Install prettier in third_party.
|
run(["node", prettier, "--write"] + glob("js/*.js") + glob("js/*.ts") +
|
||||||
run([
|
["tsconfig.json"] + ["tslint.json"])
|
||||||
"prettier", "--write", "js/deno.d.ts", "js/main.ts", "js/mock_runtime.js",
|
|
||||||
"tsconfig.json"
|
|
||||||
])
|
|
||||||
# Do not format these.
|
|
||||||
# js/msg_generated.ts
|
|
||||||
# js/flatbuffers.js
|
|
||||||
run(["rustfmt", "-f", "--write-mode", "overwrite"] + glob("src/*.rs"))
|
run(["rustfmt", "-f", "--write-mode", "overwrite"] + glob("src/*.rs"))
|
||||||
|
|
|
@ -2808,6 +2808,10 @@ prepend-http@^1.0.0:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
|
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
|
||||||
|
|
||||||
|
prettier@^1.13.7:
|
||||||
|
version "1.13.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.7.tgz#850f3b8af784a49a6ea2d2eaa7ed1428a34b7281"
|
||||||
|
|
||||||
private@^0.1.6, private@^0.1.8:
|
private@^0.1.6, private@^0.1.8:
|
||||||
version "0.1.8"
|
version "0.1.8"
|
||||||
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
|
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
|
||||||
|
|
Loading…
Reference in a new issue