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