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 b6b70b8
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 49 deletions.
20 changes: 5 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
language: node_js
node_js:
- lts/boron
- node
sudo: false

jobs:
fail_fast: true
include:
- stage: Tests
name: 'Node LTS/Boron'
node_js: lts/boron
- name: 'Node Stable'
node_js: 10
- name: Type information Tests
node_js: 10
script: lerna run test:types

deploy:
provider: releases
skip_cleanup: true
api_key:
secure: GCfTZxoqpp1tMmslM5MTI13BLv+bvFhZUuhX+dQFbcVYODQKUjnUj9EBF10PJSTpYqm3GnGpxEoQ6RAUVxlH7rBQUFm4czaZPPgCDSZT3B8pszmQkl1aRyvdmXFoKfyNhFUwBUSsoBpM92wp/UrgIZ/CI0jLoIZbCwn4KH02rf8=
file:
- 'remark.js'
- 'remark.min.js'
- "remark.js"
- "remark.min.js"
on:
tags: true
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
},
"scripts": {
"postinstall": "lerna bootstrap --no-ci",
"format": "packages/remark-cli/cli.js . -qfo && prettier --write '**/*.js' && xo --fix",
"format": "packages/remark-cli/cli.js . -qfo && prettier --write '**/*.{js,ts}' && xo --fix",
"build-bundle": "browserify packages/remark -s remark > remark.js",
"build-mangle": "browserify packages/remark -s remark -p tinyify > remark.min.js",
"build": "npm run build-bundle && npm run build-mangle",
"test-api": "tape packages/*/test.js test/index.js",
"test-api-extensive": "TEST_EXTENDED=true npm run test-api",
"test-coverage": "nyc --reporter lcov tape \"test/index.js\" \"packages/*/test.js\"",
"test": "npm run format && npm run build && npm run test-coverage"
"test-types": "lerna run test-types --parallel",
"test": "npm run format && npm run build && npm run test-coverage && npm run test-types"
},
"nyc": {
"check-coverage": true,
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 b6b70b8

Please sign in to comment.