aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-10-12 17:06:32 +0200
committerGitHub <[email protected]>2023-10-12 17:06:32 +0200
commit5801c79a2df91395a62955c6481dca64a07065ee (patch)
tree4d0773dab94ecd4a193fe71b09d1e3ecd9923332
parent28d3bad0a30cfc7b82239b43a2b22a69ee355881 (diff)
downloadfaker-5801c79a2df91395a62955c6481dca64a07065ee.tar.xz
faker-5801c79a2df91395a62955c6481dca64a07065ee.zip
infra(unicorn): text-encoding-identifier-case (#2465)
-rw-r--r--.eslintrc.js7
-rw-r--r--scripts/generateLocales.ts2
2 files changed, 7 insertions, 2 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index ecbe2320..aa20f3ce 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -78,7 +78,6 @@ module.exports = defineConfig({
'unicorn/prevent-abbreviations': 'off',
'unicorn/require-array-join-separator': 'off',
'unicorn/switch-case-braces': 'off',
- 'unicorn/text-encoding-identifier-case': 'off',
'@typescript-eslint/array-type': [
'error',
@@ -156,6 +155,12 @@ module.exports = defineConfig({
},
},
{
+ files: ['src/locales/**/*.ts'],
+ rules: {
+ 'unicorn/text-encoding-identifier-case': 'off',
+ },
+ },
+ {
files: ['test/**/*.spec.ts'],
extends: ['plugin:vitest/recommended'],
rules: {
diff --git a/scripts/generateLocales.ts b/scripts/generateLocales.ts
index 67d0f779..70e40157 100644
--- a/scripts/generateLocales.ts
+++ b/scripts/generateLocales.ts
@@ -359,7 +359,7 @@ async function main(): Promise<void> {
localizationLocales = await format(localizationLocales, prettierMdOptions);
- let localizationContent = readFileSync(pathDocsGuideLocalization, 'utf-8');
+ let localizationContent = readFileSync(pathDocsGuideLocalization, 'utf8');
localizationContent = localizationContent.replace(
/(^<!-- LOCALES-AUTO-GENERATED-START -->$).*(^<!-- LOCALES-AUTO-GENERATED-END -->$)/gms,
`$1\n\n<!-- Run '${scriptCommand}' to update. -->\n\n${localizationLocales}\n$2`