Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add text-encoding-identifier-case rule #1718

Merged

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Feb 7, 2022

Fixes #1690

I think suggestion is good enough for this rule, we are checking all string literals, auto fix may break things.

@fisker fisker marked this pull request as ready for review February 9, 2022 06:40
# Conflicts:
#	package.json
#	readme.md
#	test/run-rules-on-codebase/lint.mjs
@@ -0,0 +1,39 @@
# Enforce consistent case style for text encoding identifier
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Enforce consistent case style for text encoding identifier
# Enforce consistent case for text encoding identifiers

@sindresorhus sindresorhus merged commit 4370602 into sindresorhus:main Feb 9, 2022
@fisker fisker deleted the text-encoding-identifier-case branch February 9, 2022 10:38
@alfaproject
Copy link

I've just had to ignore these false positives:

diff --git a/apps/lambda-data/src/utils/entity-schema-utils.ts b/apps/lambda-data/src/utils/entity-schema-utils.ts
index ed782e335..fc7e4d10d 100644
--- a/apps/lambda-data/src/utils/entity-schema-utils.ts
+++ b/apps/lambda-data/src/utils/entity-schema-utils.ts
@@ -199,7 +199,7 @@ export class EntitySchemaUtils {
             },
             string: {
               compression: 'GZIP',
-              type: 'UTF8',
+              type: 'UTF8', // eslint-disable-line unicorn/text-encoding-identifier-case
             },
           };

@@ -249,7 +249,7 @@ export class EntitySchemaUtils {
                   typeConversion[fieldName] = PARQUET_CONVERSIONS.toNumber;
                 }
                 break;
-              case 'UTF8':
+              case 'UTF8': // eslint-disable-line unicorn/text-encoding-identifier-case
                 typeConversion[fieldName] = PARQUET_CONVERSIONS.toJson;
                 break;
               case 'DECIMAL':

Not a big deal but not sure if it's expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule proposal: text-encoding-identifier-case
3 participants