Skip to content

Commit

Permalink
Enable unicorn/text-encoding-identifier-case rule (#12526)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Mar 25, 2022
1 parent 0e6c1d5 commit 1164927
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -154,6 +154,7 @@ module.exports = {
"unicorn/prefer-switch": "error",
"unicorn/prefer-type-error": "error",
"unicorn/template-indent": "error",
"unicorn/text-encoding-identifier-case": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-changelog.mjs
Expand Up @@ -100,7 +100,7 @@ async function createChangelog(title, user, prNumber, category) {
__dirname,
"../changelog_unreleased/TEMPLATE.md"
);
const changelogTemplate = await fs.readFile(changelogTemplatePath, "utf-8");
const changelogTemplate = await fs.readFile(changelogTemplatePath, "utf8");

const titlePart = "Title";
const prNumberPart = "#XXXX";
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/steps/update-changelog.js
Expand Up @@ -14,7 +14,7 @@ import {
const outdentString = outdent.string;

function writeChangelog(params) {
const changelog = fs.readFileSync("CHANGELOG.md", "utf-8");
const changelog = fs.readFileSync("CHANGELOG.md", "utf8");
const newEntry = `# ${params.version}\n\n` + getChangelogContent(params);
fs.writeFileSync("CHANGELOG.md", newEntry + "\n\n" + changelog);
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/utils.js
Expand Up @@ -83,7 +83,7 @@ function writeJson(filename, content) {
}

function processFile(filename, fn) {
const content = fs.readFileSync(filename, "utf-8");
const content = fs.readFileSync(filename, "utf8");
fs.writeFileSync(filename, fn(content));
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/vendors/bundle-vendors.mjs
Expand Up @@ -43,7 +43,7 @@ async function generateDts(vendor) {
]
.filter((line) => line !== null)
.join("\n"),
"utf-8"
"utf8"
);
}

Expand Down

0 comments on commit 1164927

Please sign in to comment.