Skip to content

Commit

Permalink
lint markdown files using markdownlint
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Sep 2, 2021
1 parent 6f0e195 commit 4b1c8bc
Show file tree
Hide file tree
Showing 13 changed files with 261 additions and 42 deletions.
14 changes: 14 additions & 0 deletions .markdownlint-cli2.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"config": {
"line-length": false,
"header-increment": false,
"first-line-heading": false,
"no-inline-html": false,
"ol-prefix": false,
"no-hard-tabs": false
},
"globs": [
"*.md",
"website/docs/*.md"
]
}
15 changes: 8 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
Only breaking changes, deprecations and the like are documented in this change log.

#### 0.11.0

- mwn#queryAuthors() now requires `getSiteInfo()` to have run first. Also, it is deprecated in favour of using the `queryAuthors()` method on a page object.

#### 0.10.0

- `loginGetToken()` is now deprecated in favour of `login()` which will now fetch tokens as well.
- TypeScript source files are dropped from the npm package, per the standard practice followed in TypeScript libraries. This should not actually break anything.
- `loginGetToken()` is now deprecated in favour of `login()` which will now fetch tokens as well.
- TypeScript source files are dropped from the npm package, per the standard practice followed in TypeScript libraries. This should not actually break anything.

#### 0.9.0

BREAKING CHANGES:

- [mwn#rawRequest](https://tools-static.wmflabs.org/mwn/docs/classes/_bot_.mwn.html#rawrequest) now returns the `AxiosResponse` object directly, rather than the `data` part of `AxiosResponse`.
- In cases of error, the shape of the error thrown by [mwn#request](https://tools-static.wmflabs.org/mwn/docs/classes/_bot_.mwn.html#request) is different.
- Earlier: `error.response` was the API response data along with response and request objects, the former making it a cyclic object.
- Now: `error.response` is an object with fields {data, headers, status, statusText}
- [mwn#rawRequest](https://tools-static.wmflabs.org/mwn/docs/classes/_bot_.mwn.html#rawrequest) now returns the `AxiosResponse` object directly, rather than the `data` part of `AxiosResponse`.
- In cases of error, the shape of the error thrown by [mwn#request](https://tools-static.wmflabs.org/mwn/docs/classes/_bot_.mwn.html#request) is different.
- Earlier: `error.response` was the API response data along with response and request objects, the former making it a cyclic object.
- Now: `error.response` is an object with fields {data, headers, status, statusText}

#### 0.8.0

BREAKING CHANGES:

- For imports in JavaScript, use `const {mwn} = require('mwn');` instead of `const mwn = require('mwn');`
- For imports in JavaScript, use `const {mwn} = require('mwn');` instead of `const mwn = require('mwn');`
199 changes: 193 additions & 6 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"format": "prettier --write .",
"build": "tsc || echo",
"quickbuild": "babel src --extensions \".ts\" --out-dir build",
"lint": "eslint src tests",
"lint": "eslint src tests && markdownlint-cli2",
"lint:fix": "eslint --fix src tests && markdownlint-cli2-fix",
"test:testwiki": "cd tests && mocha bot.test.js category.test.js file.test.js login.bot.test.js oauth.test.js page.test.js suppl.bot.test.js user.test.js wikitext.test.js",
"setuplocalwiki": "cd tests/docker && bash main.sh",
"test:localwiki": "cd tests && mocha edit.bot.test.js user.edit.test.js errors.test.js shutoff.test.js core.test.js",
Expand Down Expand Up @@ -66,6 +67,7 @@
"eslint-plugin-chai-expect": "^2.2.0",
"husky": "^4.3.8",
"lint-staged": "^11.0.0",
"markdownlint-cli2": "^0.3.0",
"mocha": "^8.2.1",
"mocha-chai-jest-snapshot": "^1.1.2",
"nock": "^13.1.0",
Expand All @@ -83,6 +85,7 @@
}
},
"lint-staged": {
"*.ts(x)?": "prettier --write"
"*.ts(x)?": "prettier --write",
"*.md": "markdownlint-cli2-fix"
}
}
5 changes: 0 additions & 5 deletions website/docs/1-getting-started.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
sidebar_position: 1
---

# Getting started

Installation: `npm install mwn`


Importing mwn:

In JavaScript:
Expand Down
Loading

0 comments on commit 4b1c8bc

Please sign in to comment.