Skip to content

Commit 1164927

Browse files
authored
Enable unicorn/text-encoding-identifier-case rule (#12526)
1 parent 0e6c1d5 commit 1164927

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ module.exports = {
154154
"unicorn/prefer-switch": "error",
155155
"unicorn/prefer-type-error": "error",
156156
"unicorn/template-indent": "error",
157+
"unicorn/text-encoding-identifier-case": "error",
157158
},
158159
overrides: [
159160
{

scripts/generate-changelog.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async function createChangelog(title, user, prNumber, category) {
100100
__dirname,
101101
"../changelog_unreleased/TEMPLATE.md"
102102
);
103-
const changelogTemplate = await fs.readFile(changelogTemplatePath, "utf-8");
103+
const changelogTemplate = await fs.readFile(changelogTemplatePath, "utf8");
104104

105105
const titlePart = "Title";
106106
const prNumberPart = "#XXXX";

scripts/release/steps/update-changelog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
const outdentString = outdent.string;
1515

1616
function writeChangelog(params) {
17-
const changelog = fs.readFileSync("CHANGELOG.md", "utf-8");
17+
const changelog = fs.readFileSync("CHANGELOG.md", "utf8");
1818
const newEntry = `# ${params.version}\n\n` + getChangelogContent(params);
1919
fs.writeFileSync("CHANGELOG.md", newEntry + "\n\n" + changelog);
2020
}

scripts/release/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function writeJson(filename, content) {
8383
}
8484

8585
function processFile(filename, fn) {
86-
const content = fs.readFileSync(filename, "utf-8");
86+
const content = fs.readFileSync(filename, "utf8");
8787
fs.writeFileSync(filename, fn(content));
8888
}
8989

scripts/vendors/bundle-vendors.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function generateDts(vendor) {
4343
]
4444
.filter((line) => line !== null)
4545
.join("\n"),
46-
"utf-8"
46+
"utf8"
4747
);
4848
}
4949

0 commit comments

Comments
 (0)