[chore] remove Danger for now
This commit is contained in:
parent
58b06d4aad
commit
4922912bbb
5 changed files with 3 additions and 2259 deletions
3
.babelrc
3
.babelrc
|
|
@ -1,3 +0,0 @@
|
|||
// This is solely to avoid https://github.com/danger/danger-js/issues/261
|
||||
// and should be fine to remove before much longer
|
||||
{}
|
||||
|
|
@ -16,9 +16,8 @@ install:
|
|||
# This is to prevent lint-staged/prettier from running on the bundles
|
||||
- npm rm husky
|
||||
|
||||
# Run danger, build bundles (so they're always up to date)
|
||||
# Build bundles (so they're always up to date)
|
||||
before_script:
|
||||
- npx danger run
|
||||
- npm run build-browser
|
||||
# Pass -save so it'll update the readme as well
|
||||
- npm run build-min -- -save
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
/* global danger warn fail */
|
||||
"use strict";
|
||||
|
||||
var fs = require("fs"),
|
||||
path = require("path"),
|
||||
|
||||
locater = require("locater"),
|
||||
pinpoint = require("pinpoint"),
|
||||
dedent = require("dedent");
|
||||
|
||||
// Various views of changed/added files
|
||||
var jsfiles = danger.git.created_files
|
||||
.concat(danger.git.modified_files)
|
||||
.filter((file) => path.extname(file) === ".js"),
|
||||
|
||||
changelog = danger.git.modified_files.find((file) =>
|
||||
file === "docs/change-log.md"
|
||||
),
|
||||
|
||||
appfiles = jsfiles.filter((file) =>
|
||||
file.indexOf("tests/") === -1
|
||||
);
|
||||
|
||||
function link(file, anchor, text) {
|
||||
var repo = danger.github.pr.head.repo.html_url,
|
||||
ref = danger.github.pr.head.ref;
|
||||
|
||||
return danger.utils.href(`${repo}/blob/${ref}/${file}${anchor || ""}`, file || text);
|
||||
}
|
||||
|
||||
// All PRs should be targeted against `next`
|
||||
if(danger.github.pr.base.ref !== "next") {
|
||||
warn("PRs should be based on `next`, rebase before submitting please");
|
||||
}
|
||||
|
||||
// Any non-test JS changes should probably have a change-log entry
|
||||
if(appfiles.length && !changelog) {
|
||||
warn(dedent(`
|
||||
Please add an entry to ${link("docs/change-log.md")}.
|
||||
`))
|
||||
}
|
||||
|
||||
// Call out if `o.only(...)` was left in
|
||||
jsfiles
|
||||
.filter((file) => file.indexOf("tests/") > -1)
|
||||
// Have to exclude test-ospec.js because it specifically has a purposeful "o.only" in it
|
||||
.filter((file) => file.indexOf("test-ospec") === -1)
|
||||
.forEach((file) => {
|
||||
var code = fs.readFileSync(file, "utf8"),
|
||||
locs = locater.find("o.only", code);
|
||||
|
||||
locs.forEach((loc) =>
|
||||
fail(dedent(`
|
||||
Please remove the \`o.only\` from ${link(file, `#L${loc.line}`)}.
|
||||
<pre lang="javascript">
|
||||
${pinpoint(code, {line: loc.line, column : loc.cursor})}
|
||||
</pre>
|
||||
`))
|
||||
)
|
||||
});
|
||||
2195
package-lock.json
generated
2195
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -28,7 +28,6 @@
|
|||
"devDependencies": {
|
||||
"@alrra/travis-scripts": "^3.0.1",
|
||||
"benchmark": "^2.1.4",
|
||||
"danger": "^1.2.0",
|
||||
"dedent": "^0.7.0",
|
||||
"eslint": "^3.19.0",
|
||||
"gh-pages": "^0.12.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue