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

Turn on max-len ESLint rule #815

Open
matthew-white opened this issue May 26, 2023 · 0 comments
Open

Turn on max-len ESLint rule #815

matthew-white opened this issue May 26, 2023 · 0 comments
Labels
dx Developer workflow, automated checks

Comments

@matthew-white
Copy link
Member

@sadiqkhoja suggested that we turn on the max-len ESLint rule. (We would turn on both max-len and vue/max-len, which are currently both turned off.) The max would be maybe 100 or 110 characters. I'm in favor of that rule change as well.

In the past, we've sometimes needed long lines in the template in order to ensure that text is trimmed. For example:

<a href="https://support.microsoft.com/en-us/office/about-power-query-in-excel-7104fbee-9e62-4cb9-a02e-5bfb1a6c536a" target="_blank" rel="noopener">{{ $t('help.microsoft.pageForExcel') }}</a>

Previously, putting {{ $t('help.microsoft.pageForExcel') }} on its own line would result in white space on either side of the text. That's an issue in particular for Japanese, where text typically doesn't include space characters. However, I've been noticing that that no longer seems to be the case: the white space is trimmed, at least when the {{ ... }} is the only content of the element. (Maybe there was a related change in Vue 3 or Vue CLI?) That means that there's little reason to have long lines like these, so we could turn on max-len without having to regularly disable the rule.

We already have a number of long lines, so turning on max-len would require changing those lines or disabling the rule for those lines.

@matthew-white matthew-white added the dx Developer workflow, automated checks label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx Developer workflow, automated checks
Projects
None yet
Development

No branches or pull requests

1 participant