Skip to content

Commit

Permalink
📑 Typescript mods (#144)
Browse files Browse the repository at this point in the history
* no emitting shittit code 💩

* bring in better typings
  • Loading branch information
GantMan authored Dec 14, 2017
1 parent 387ed65 commit cf9e500
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 3 deletions.
33 changes: 33 additions & 0 deletions package-lock.json

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

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@
"ramda": "0.25.0"
},
"devDependencies": {
"@types/callsite": "^1.0.30",
"@types/execa": "^0.8.0",
"@types/jest": "21.1.8",
"@types/minimist": "^1.2.0",
"@types/node": "8.0.58",
"@types/ramda": "^0.25.8",
"@types/tempy": "^0.1.0",
"ajv": "5.5.1",
"all-contributors-cli": "4.10.0",
"babel-eslint": "8.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
}

// break all rules into requirements
const reportCalls = await map(
const reportCalls = map(
async requirement => reviewRule(requirement, results, context),
toPairs(solidaritySettings.requirements)
)
Expand Down
3 changes: 2 additions & 1 deletion src/extensions/functions/reviewRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ module.exports = async (requirement: SolidarityRequirementChunk, report: Solidar
const { print, system, solidarity } = context
const { color, checkmark, xmark } = print
const prettyBool = (bl: boolean) => bl ? checkmark + color.green(' YES') : xmark + color.red(' NO')
// @ts-ignore - flatten will never get a string bc tail is called first
const rules: SolidarityRequirement = pipe(tail, flatten)(requirement)
// check each rule for report
const ruleChecks = await map(async (rule: SolidarityRule) => {
const ruleChecks = map(async (rule: SolidarityRule) => {
// Make sure this rule is active
if (skipRule(rule.platform)) return false

Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

// Don't let sneaky null/undefined through
"strictNullChecks": true,
"sourceMap": true
// Yes plz
"sourceMap": true,
// Don't update JS dist with failing TS src
"noEmitOnError": true
},
"include": [
"src"
Expand Down
26 changes: 26 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,40 @@
lodash "^4.2.0"
to-fast-properties "^2.0.0"

"@types/callsite@^1.0.30":
version "1.0.30"
resolved "https://registry.yarnpkg.com/@types/callsite/-/callsite-1.0.30.tgz#0854343ffc2141a48bf541a3afbb67cfe07562aa"

"@types/execa@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@types/execa/-/execa-0.8.0.tgz#2c717dbcb4a593e31c3b1d40180a0926f77f5355"
dependencies:
"@types/node" "*"

"@types/jest@21.1.8":
version "21.1.8"
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-21.1.8.tgz#d497213725684f1e5a37900b17a47c9c018f1a97"

"@types/minimist@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.0.tgz#69a23a3ad29caf0097f06eda59b361ee2f0639f6"

"@types/node@*":
version "8.5.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.1.tgz#4ec3020bcdfe2abffeef9ba3fbf26fca097514b5"

"@types/node@8.0.58":
version "8.0.58"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90"

"@types/ramda@^0.25.8":
version "0.25.8"
resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.25.8.tgz#d95e7e9a47ed4a0fcb1b4bbb7f6ffac71276c619"

"@types/tempy@^0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@types/tempy/-/tempy-0.1.0.tgz#8ba0339dcd5abb554f301683dc3396d153ec5bfd"

abab@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e"
Expand Down

0 comments on commit cf9e500

Please sign in to comment.