nodejs.dev icon indicating copy to clipboard operation
nodejs.dev copied to clipboard

Git actions linting failed while local linting is success.

Open clean99 opened this issue 2 years ago • 5 comments

Summary

I use npm run lint and there is no error but the git actions CI shows there are format problems, this makes me unable to use npm run lint --fix to auto fix the problems.

Also, looks like linting in code examples now requires semicolons but most of the original examples don't use semicolons, would this makes the tutorials inconsistent?

git actions CI linting errors local development linting shows success

clean99 avatar May 04 '22 10:05 clean99

Hi @clean99, could you please provide link to repo with failed CI?

rodion-arr avatar May 04 '22 14:05 rodion-arr

Hi @clean99, could you please provide link to repo with failed CI?

Hi @rodion-arr, thanks for replying to me, you can check this git actions and commit(and previously commits) correspondingly.

clean99 avatar May 04 '22 15:05 clean99

I assume it's related to #2092 - linter checks JS code blocks in markdown that was changed in your branch, not sure why they wasn't listed in original PR

rodion-arr avatar May 04 '22 15:05 rodion-arr

I assume it's related to #2092 - linter checks JS code blocks in markdown that was changed in your branch, not sure why they wasn't listed in original PR

OK, I see~ but would it be better to keep the format in markdown the same? Now if I add new examples in docs, the docs will somewhere use semicolons and some don't.

clean99 avatar May 05 '22 01:05 clean99

OK, I see~ but would it be better to keep the format in markdown the same? Now if I add new examples in docs, the docs will somewhere use semicolons and some don't.

Yup, but I believe this was addressed already. By running eslint . --fix it would apply the same ESLint configuration across the charter. Or do you still have examples of inconsistencies?

ovflowd avatar Aug 02 '22 21:08 ovflowd

I discovered that in some OSs the lack of "(quotes) around some lining commands would result in unexpected behaviours.

For example, the glob command was not recognised equally on Windows and macOS for the stylelint and eslint commands. I fixed this.

Closing this issue as it seems fixed, but Author is free to reopen it if necessary.

ovflowd avatar Aug 14 '22 21:08 ovflowd