Skip to content

Commit

Permalink
Merge pull request #121 from runk/tslint
Browse files Browse the repository at this point in the history
Add tslinter for typings file
  • Loading branch information
runk authored Nov 1, 2018
2 parents 27e4c4f + f8bfaae commit 271acbc
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 34 deletions.
33 changes: 16 additions & 17 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface IBaseCountry {
names: INames;
}

export interface ICountry extends IBaseCountry{
export interface ICountry extends IBaseCountry {
confidence: number;
}

Expand Down Expand Up @@ -82,20 +82,20 @@ export interface ITraits {
isp: string;
organization: string;
user_type: 'business'
| 'cafe'
| 'cellular'
| 'college'
| 'content_delivery_network'
| 'dialup'
| 'government'
| 'hosting'
| 'library'
| 'military'
| 'residential'
| 'router'
| 'school'
| 'search_engine_spider'
| 'traveler'
| 'cafe'
| 'cellular'
| 'college'
| 'content_delivery_network'
| 'dialup'
| 'government'
| 'hosting'
| 'library'
| 'military'
| 'residential'
| 'router'
| 'school'
| 'search_engine_spider'
| 'traveler';
}

export interface IFields {
Expand All @@ -116,9 +116,8 @@ export interface IReader {

export type openCb = (err: Error, cb: IReader) => void;

export function open(filepath: string, opts?: IOpenOpts | openCb, cb?: openCb) : void;
export function open(filepath: string, opts?: IOpenOpts | openCb, cb?: openCb): void;

export function openSync(filepath: string, opts?: IOpenOpts): IReader;

export function validate(ipAddress: string): boolean;

146 changes: 130 additions & 16 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"istanbul": "0.4.5",
"mocha": "5.2.0",
"nyc": "13.1.0",
"sinon": "7.1.1"
"sinon": "7.1.1",
"tslint": "^5.11.0",
"typescript": "^3.1.1"
},
"repository": {
"type": "git",
Expand Down
2 changes: 2 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ if [ -n "$npm_config_fix" ]; then
fi

if [ "$LIST" ]; then eslint $FIX --config .eslintrc $LIST; fi

tslint index.d.ts
9 changes: 9 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "tslint:recommended",
"rules": {
"quotemark": [
true,
"single"
]
}
}

0 comments on commit 271acbc

Please sign in to comment.