-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
/
blogpost.md.ejs
84 lines (55 loc) · 1.78 KB
/
blogpost.md.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
layout: post
title: ESLint v<%- version %> released
tags:
- release
- <%- type %>
---
# ESLint v<%= version %> released
We just pushed ESLint v<%- version %>, which is a <%- type %> release upgrade of ESLint. This release <% if (type !== "patch") { %>adds some new features and<% } %> fixes several bugs found in the previous release. <% if (type === "major") { %>This release also has some breaking changes, so please read the following closely. <% } %>
<%
const RULE_REGEX = new RegExp(`\`?(${ruleList.join("|")})\`?`, "g");
function linkify(line) {
return line
.replace(/#(\d+)/g, "[#$1](https://github.com/eslint/eslint/issues/$1)")
.replace(/([a-z0-9]+)/, "[$1](https://github.com/eslint/eslint/commit/$1)")
.replace(RULE_REGEX, "[$&](/docs/rules/$1)");
}
function outputList(items) {
items.forEach(function(line) {%>
<%- linkify(line) %><%
});
}
%>
<% if (typeof changelog.breaking !== "undefined") { %>
## Breaking Changes
<% outputList(changelog.breaking); %>
<% } %>
<% if (typeof changelog.new !== "undefined") { %>
## Features
<% outputList(changelog.new); %>
<% } %>
<% if (typeof changelog.update !== "undefined") { %>
## Enhancements
<% outputList(changelog.update); %>
<% } %>
<% if (typeof changelog.fix !== "undefined") { %>
## Bug Fixes
<% outputList(changelog.fix); %>
<% } %>
<% if (typeof changelog.docs !== "undefined") { %>
## Documentation
<% outputList(changelog.docs); %>
<% } %>
<% if (typeof changelog.upgrade !== "undefined") { %>
## Dependency Upgrades
<% outputList(changelog.upgrade); %>
<% } %>
<% if (typeof changelog.build !== "undefined") { %>
## Build Related
<% outputList(changelog.build); %>
<% } %>
<% if (typeof changelog.chore !== "undefined") { %>
## Chores
<% outputList(changelog.chore); %>
<% } %>