]> git.proxmox.com Git - pve-eslint.git/blob - eslint/templates/blogpost.md.ejs
a812a79d94d87839aa87beb81e24ee63182bc68c
[pve-eslint.git] / eslint / templates / blogpost.md.ejs
1 ---
2 layout: post
3 title: ESLint v<%- version %> released
4 tags:
5 - release
6 - <%- type %>
7 ---
8 # ESLint v<%= version %> released
9
10 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.<% } %>
11
12 <%
13 const RULE_REGEX = new RegExp(`\`?\\b(${ruleList.join("|")})\\b\`?`, "g");
14
15 function linkify(line) {
16 return line
17 .replace(/([^\s/]+[/][^\s/]+)?#(\d+)/g, (_, repo, num) => `[${repo || ""}#${num}](https://github.com/${repo || "eslint/eslint"}/issues/${num})`)
18 .replace(RULE_REGEX, "[$&](/docs/rules/$1)");
19 }
20
21 function outputList(items) {
22 items.forEach(function(line) {%>
23 <%- linkify(line) %><%
24 });
25 }
26
27 %>
28
29 <% if (prereleaseMajorVersion) { %>
30 ## Highlights
31
32 This is a summary of the major changes you need to know about for this version of ESLint.
33
34 ### Installing
35
36 Since this is a pre-release version, you will not automatically be upgraded by npm. You must specify the `next` tag when installing:
37
38 ```
39 npm i eslint@next --save-dev
40 ```
41
42 You can also specify the version directly:
43
44 ```
45 npm i eslint@<%- version %> --save-dev
46 ```
47
48 ### Migration Guide
49
50 As there are a lot of changes, we've created a [migration guide](/docs/<%- prereleaseMajorVersion %>/user-guide/migrating-to-<%- prereleaseMajorVersion %>) describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.
51
52 <% } %>
53
54 <% if (typeof changelog.breaking !== "undefined") { %>
55 ## Breaking Changes
56
57 <% outputList(changelog.breaking); %>
58
59 <% } %>
60
61 <% if (typeof changelog.new !== "undefined") { %>
62 ## Features
63
64 <% outputList(changelog.new); %>
65
66 <% } %>
67
68 <% if (typeof changelog.update !== "undefined") { %>
69 ## Enhancements
70
71 <% outputList(changelog.update); %>
72
73 <% } %>
74
75 <% if (typeof changelog.fix !== "undefined") { %>
76 ## Bug Fixes
77
78 <% outputList(changelog.fix); %>
79
80 <% } %>
81
82 <% if (typeof changelog.docs !== "undefined") { %>
83 ## Documentation
84
85 <% outputList(changelog.docs); %>
86
87 <% } %>
88
89 <% if (typeof changelog.upgrade !== "undefined") { %>
90 ## Dependency Upgrades
91
92 <% outputList(changelog.upgrade); %>
93
94 <% } %>
95
96 <% if (typeof changelog.build !== "undefined") { %>
97 ## Build Related
98
99 <% outputList(changelog.build); %>
100
101 <% } %>
102
103 <% if (typeof changelog.chore !== "undefined") { %>
104 ## Chores
105
106 <% outputList(changelog.chore); %>
107
108 <% } %>