Closed duhrer closed 7 months ago
Cheers @duhrer - I had a go with linting Infusion with fluid-lint-all@1.2.10-dev.20231103T135559Z.3b3787c.GH-62 and I got the following 3 errors in ReleaseNotes.md at https://github.com/fluid-project/infusion/blob/main/ReleaseNotes.md -
11:11:17.457: - ReleaseNotes.md: 11:11:17.458: (106:-) MD034:no-bare-urls 11:11:17.458: (151:-) MD034:no-bare-urls 11:11:17.459: (156:-) MD034:no-bare-urls
This is because there is a particular style used to wrap the URL in the long lines involving a hanging open parenthesis - I think this is probably valid, do you have a suggestion for alternative formatting or else for a fix?
I tried the new fluid-lint-all together eslint-config-fluid@2.1.1-dev.20231104T144458Z.5488e1c.GH-17 and got the following error:
11:16:32.131: ====================================================== 11:16:32.132: fluid-lint-all: Running all checks. 11:16:32.135: ====================================================== 11:16:32.135: 11:16:36.646: ERROR: ESLint check failed: Error while loading rule '@stylistic/js/indent': Cannot read property 'tokensAndComments' of undefined Occurred while linting E:\source\gits\infusion-master\buildModules.js 11:16:36.655: undefined
Thanks, @amb26, I will look into both, hopefully I can replicate with a simple branch off of infusion@main.
The markdown lint errors occur with the latest released versions of both packages, and are not unique to the work here (or in the eslint-config-fluid pull). I will still work to suggest a solution, but just wanted to point it out.
Depending on what the fix needs to be, we can discuss folding it into one of the open pulls or handling elsewhere.
I'll move on to testing the dev releases once I finish that.
I'm not sure when the behaviour changed, but the plugin/rule does not offer any configuration options, so we may have to live with it. I wrote up the issue against Infusion, and commented on how to easily fix it.
If that pattern is required or heavily used, I can experiment further, but in the three cases reported, it seems a simple enough fix to just live with keeping the opening paren and URL together.
@amb26, GH-62 is actually a different pull that does not update ESLint or the plugins. I just cut a dev release with the ESLint changes for this pull, it's fluid-lint-all@1.2.10-dev.20231104T184451Z.53e64ec.GH-64
.
Using that and eslint-config-fluid@2.1.1-dev.20231104T144458Z.5488e1c.GH-17
, npm run lint
reports the aforementioned markdown linting problems, but does not throw an error.
11:11:17.457: - ReleaseNotes.md: 11:11:17.458: (106:-) MD034:no-bare-urls 11:11:17.458: (151:-) MD034:no-bare-urls 11:11:17.459: (156:-) MD034:no-bare-urls
This is because there is a particular style used to wrap the URL in the long lines involving a hanging open parenthesis - I think this is probably valid, do you have a suggestion for alternative formatting or else for a fix?
@amb26 The no-bare-urls
rule doesn't have to do with long lines, but rather how URLs that aren't on the Markdown link syntax should be entered. It requires this format <https://something.com>
as opposed to https://example.com
.
As of version
8.53.0
released on 3 Nov. 2023, ESLint no longer supports the formatting rules we rely on. There is an ESLint plugin that provides the missing rules, I put in a pull againsteslint-config-fluid
to use this alternate approach.We need a small pull against this package to confirm that the changes work as expected. With that in mind, I cut a dev release of the work in progress on
eslint-config-fluid
, which iseslint-config-fluid@2.1.1-dev.20231104T144458Z.5488e1c.GH-17
.