Skip to content

Commit

Permalink
Enable jsdoc-format lint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
macklinu committed Jan 31, 2017
1 parent e228776 commit 36c7ae4
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions source/ci_source/ci_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export type Env = any

/** The shape of an object that represents an individual CI */
export interface CISource {
//** The project name, mainly for showing errors */
/** The project name, mainly for showing errors */
readonly name: string

/** Does this validate as being on a particular CI? */
Expand All @@ -20,4 +20,4 @@ export interface CISource {

/** What unique id can be found for the code review platform's PR */
readonly pullRequestID: string
}
}
4 changes: 2 additions & 2 deletions source/ci_source/ci_source_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Env } from "./ci_source"
* @param {Env} env The environment.
* @param {[string]} keys Keys to ensure existence of
* @returns {bool} true if they exist, false if not
*/
*/
export function ensureEnvKeysExist(env: Env, keys: Array<string>): boolean {
/*const hasKeys = keys.map((key: string): boolean => {
return env.hasOwnProperty(key) && env[key] != null && env[key].length > 0
Expand All @@ -21,7 +21,7 @@ export function ensureEnvKeysExist(env: Env, keys: Array<string>): boolean {
* @param {Env} env The environment.
* @param {[string]} keys Keys to ensure existence and number-ness of
* @returns {bool} true if they are all good, false if not
*/
*/
export function ensureEnvKeysAreInt(env: Env, keys: Array<string>): boolean {
/*const hasKeys = keys.map((key: string): boolean => {
return env.hasOwnProperty(key) && !isNaN(parseInt(env[key]))
Expand Down
2 changes: 1 addition & 1 deletion source/ci_source/get_ci_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Env, CISource } from "./ci_source"
* sources if they can be represented in this environment.
* @param {Env} env The environment.
* @returns {?CISource} a CI source if it's OK, otherwise Danger can't run.
*/
*/
export function getCISourceForEnv(env: Env): CISource | undefined {
const availableProviders = [...providers as any]
.map(Provider => new Provider(env))
Expand Down
8 changes: 4 additions & 4 deletions source/dsl/GitHubDSL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ export interface GitHubPRDSL {
merged: boolean

/**
* The nuber of comments on the PR
* @type {number}
*/
* The number of comments on the PR
* @type {number}
*/
comments: number

/**
* The nuber of review-specific comments on the PR
* The number of review-specific comments on the PR
* @type {number}
*/
review_comments: number
Expand Down
2 changes: 1 addition & 1 deletion source/platforms/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export interface Platform {
* @param {Env} env The environment.
* @param {CISource} source The existing source, to ensure they can run against each other
* @returns {Platform} returns a platform if it can be supported
*/
*/
export function getPlatformForEnv(env: Env, source: CISource): Platform {
const token = env["DANGER_GITHUB_API_TOKEN"]
if (!token) {
Expand Down
7 changes: 4 additions & 3 deletions source/runner/Executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ export class Executor {
await this.handleResults(results)
}

/** Sets up all the related objects for running the Dangerfile
* @returns {void} It's a promise, so a void promise
*/
/**
* Sets up all the related objects for running the Dangerfile
* @returns {void} It's a promise, so a void promise
*/
async dslForDanger(): Promise<DangerDSL> {
const git = await this.platform.getReviewDiff()
const platformDSL = await this.platform.getPlatformDSLRepresentation()
Expand Down
2 changes: 1 addition & 1 deletion source/runner/_tests/DangerRunner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const fixtures = resolve(__dirname, "fixtures")
/**
* Sets up an example context
* @returns {Promise<DangerContext>} a context
*/
*/
async function setupDangerfileContext() {
const platform = new FakePlatform()
const exec = new Executor(new FakeCI({}), platform)
Expand Down
3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"align": [true, "parameters"],
"class-name": true,
"indent": [true, "spaces"],
"jsdoc-format": true,
"max-line-length": [true, 150],
"no-consecutive-blank-lines": [true],
"no-trailing-whitespace": true,
Expand Down Expand Up @@ -37,4 +38,4 @@
"check-separator",
"check-type"]
}
}
}

0 comments on commit 36c7ae4

Please sign in to comment.