Skip to content

Commit

Permalink
chore: respond to code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north committed Jan 15, 2019
1 parent c6e6fd5 commit 7cb0218
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
node_js: 10
- name: Type information Tests
node_js: 10
script: lerna run test:types
script: lerna run test-types

deploy:
provider: releases
Expand Down
5 changes: 3 additions & 2 deletions packages/remark-stringify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
],
"files": [
"index.js",
"lib"
"lib",
"types/index.d.ts"
],
"types": "types/index.d.ts",
"dependencies": {
Expand Down Expand Up @@ -50,7 +51,7 @@
},
"scripts": {
"test": "tape test.js",
"test:types": "dtslint types"
"test-types": "dtslint types"
},
"xo": false
}
24 changes: 24 additions & 0 deletions packages/remark-stringify/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
// TypeScript Version: 3.0

declare module 'remark-stringify/types' {
interface RemarkStringifyOptions {
gfm: boolean
commonmark: boolean
entities: boolean | 'numbers' | 'escape'
setext: boolean
closeAtx: boolean
looseTable: boolean
spacedTable: boolean
paddedTable: boolean
stringLength: (s: string) => number
fence: '~' | '`'
fences: boolean
bullet: '-' | '*' | '+'
listItemIndent: 'tab' | '1' | 'mixed'
incrementListMarker: boolean
rule: '-' | '_' | '*'
ruleRepetition: number
ruleSpaces: boolean
strong: '_' | '*'
emphasis: '_' | '*'
}
}

declare module 'remark-stringify' {
import {RemarkStringifyOptions} from 'remark-stringify/types'
import {Attacher, Compiler, Processor} from 'unified'
Expand Down
8 changes: 3 additions & 5 deletions packages/remark-stringify/types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"lib": ["es2015"],
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noEmit": true,
"baseUrl": ".",
"paths": {
"remark-stringify": ["."],
"remark-stringify/*": ["./*"]
"remark-stringify": ["index.d.ts"]
}
}
}
13 changes: 9 additions & 4 deletions packages/remark-stringify/types/tslint.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"extends": "dtslint/dtslint.json", // Or "dtslint/dt.json" if on DefinitelyTyped
{
"extends": "dtslint/dtslint.json",
"rules": {
"callable-types": false,
"max-line-length": false,
"no-redundant-jsdoc": false,
"no-void-expression": false,
"only-arrow-functions": false,
"semicolon": false,
"indent": false,
"unified-signatures": false,
"whitespace": false,
"no-single-declare-module": false
"interface-over-type-literal": false
}
}
21 changes: 0 additions & 21 deletions packages/remark-stringify/types/types.d.ts

This file was deleted.

0 comments on commit 7cb0218

Please sign in to comment.