Skip to content

style: forbid { ns: literal } for t calls via ESLint#752

Closed
oeninghe-dataport wants to merge 1 commit into
vue3/improve-import-lintfrom
vue3/lint-i18next-namespace
Closed

style: forbid { ns: literal } for t calls via ESLint#752
oeninghe-dataport wants to merge 1 commit into
vue3/improve-import-lintfrom
vue3/lint-i18next-namespace

Conversation

@oeninghe-dataport

Copy link
Copy Markdown
Collaborator

Summary

Forbid { ns: literal } for t calls via ESLint

Relevant tickets, issues, et cetera

Fixes #508

Blocked by #750

@oeninghe-dataport oeninghe-dataport added this to the POLAR@3 milestone Jun 1, 2026
@oeninghe-dataport oeninghe-dataport self-assigned this Jun 1, 2026
@oeninghe-dataport oeninghe-dataport added the testing Pertaining to tests label Jun 1, 2026
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-16 17:39 UTC

@oeninghe-dataport oeninghe-dataport linked an issue Jun 1, 2026 that may be closed by this pull request

@dopenguin dopenguin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this be made auto-fixable? I'm sure @warm-coolguy would really enjoy that!

Also, if I add a literal in a template, this rule does not raise an issue.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

While I would really enjoy that, I don't think it's plausible to invest that amount of time. Also confirming it doesn't work in templates and there's a lot of templates with the issue present.

Suggestion: We drop the extra rule and just search for ns: ' and replace it in every file and call it a day.

Pro: Saves time and we have another nice thing to nag about in future PRs.
Con: There is none and it won't stop anybody from just declaring the string locally anyway. I'll just find creative ways to annoy you if you proceed.

@warm-coolguy warm-coolguy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I request the change "Close pull request".

@dopenguin

Copy link
Copy Markdown
Member

Superseded by #804

@dopenguin dopenguin closed this Jun 16, 2026
@dopenguin dopenguin deleted the vue3/lint-i18next-namespace branch June 16, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Pertaining to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POLAR@3: Using PluginId as the namespace in plugins

3 participants