Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ extends:
- 'wikimedia/server'

plugins:
- json
- jsdoc

rules:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ config.yaml
node_modules
npm-debug.log
package-lock.json
.eslintcache

# WebStorm IDE files
.idea/*
Expand Down
2 changes: 0 additions & 2 deletions lib/mwUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,8 @@ mwUtil.createRelativeTitleRedirect = (path, req, options) => {
mwUtil.getQueryString(req);
} else if (/#/.test(newReqParams.title)) {
const titleFragments = encodeURIComponent(newReqParams.title).split(/%23/);
/* eslint-disable prefer-template */
location = backString + titleFragments.shift() + mwUtil.getQueryString(req) +
'#' + titleFragments.join('%23');
/* eslint-enable prefer-template */
} else {
location = backString + encodeURIComponent(newReqParams.title) + mwUtil.getQueryString(req);
}
Expand Down
2 changes: 0 additions & 2 deletions maintenance/generate-wikimedia-domain-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ preq.get({
});

Object.keys(projects).forEach((name) => {
// eslint-disable-next-line no-console
console.log(`\n # ${name}`);
projects[name].forEach((domain) => {
// eslint-disable-next-line no-console
console.log(` /{domain:${domain}}: *wp/default/1.0.0`);
});
});
Expand Down
4 changes: 0 additions & 4 deletions maintenance/generate_random_load.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,23 @@ function makeCheck() {
return preq.get(`${testRestBASEUri}/page/html/${encodeURIComponent(title)}/${revision}`)
.then((res) => {
const tid = res.headers.etag.match(/\/(.+)"$/)[1];
// eslint-disable-next-line no-console
console.log(`Testing for ${title}/${revision}/${tid}`);
P.delay(Math.floor(Math.random() * 86400000))
.then(() => {
return P.all([
preq.get(`${testRestBASEUri}/page/html/${encodeURIComponent(title)}/${revision}/${tid}`)
.catch((err) => {
// eslint-disable-next-line no-console
console.log(`${new Date()} Failed to fetch HTML ${title}/${revision}/${tid} from test RB: ${err}`);
}),
preq.get(`${testRestBASEUri}/page/html/${encodeURIComponent(title)}/${revision}/${tid}`)
.catch((err) => {
// eslint-disable-next-line no-console
console.log(`${new Date()} Failed to fetch Data-Parsoid ${title}/${revision}/${tid} from test RB: ${err}`);
})
]);
});

return P.delay(500).then(makeCheck);
}, (e) => {
// eslint-disable-next-line no-console
console.log(`${new Date()} Failed to fetch HTML ${title}/${revision} from test RB: ${e}`);
});
});
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"postpublish": "git tag -a \"v${npm_package_version}\" -m \"${npm_package_name}@${npm_package_version} release\" && git push upstream \"v${npm_package_version}\"",
"start": "service-runner",
"test": "npm run lint && sh test/utils/run_tests.sh test",
"lint": "eslint --max-warnings 0 --ext .js --ext .json .",
"lint": "eslint --cache --max-warnings 0 --ext .js,.json .",
"coverage": "sh test/utils/run_tests.sh coverage",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},
Expand Down Expand Up @@ -51,10 +51,9 @@
"ajv": "^6.10.2",
"bunyan": "^1.8.12",
"coveralls": "^3.0.5",
"eslint": "^5.16.0",
"eslint-config-wikimedia": "^0.13.1",
"eslint-plugin-jsdoc": "^15.8.0",
"eslint-plugin-json": "^1.4.0",
"eslint": "^6.8.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we can't do that yet. We still need to be able to run this on node6

"eslint-config-wikimedia": "^0.15.1",
"eslint-plugin-jsdoc": "^22.1.0",
"js-yaml": "^3.13.1",
"mocha": "^6.2.0",
"mocha-lcov-reporter": "^1.3.0",
Expand Down