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

Override npm-package-json-lint flavors #2173

Merged

Conversation

bdovaz
Copy link
Collaborator

@bdovaz bdovaz commented Dec 22, 2022

#2150 (comment)

@nvuillam I have added dotnet to the suggested ones because in our case we develop with Unity (videogame engine in which we program in C#) and since a few years ago it has a package system based on npm.

Context:

https://docs.unity3d.com/Manual/CustomPackages.html

https://docs.unity3d.com/Manual/cus-layout.html

https://docs.unity3d.com/Manual/pack-safe.html

@bdovaz bdovaz requested a review from nvuillam as a code owner December 22, 2022 22:25
@bdovaz bdovaz changed the title Feature/npm package json lint flavors npm package json lint flavors Dec 22, 2022
@bdovaz bdovaz changed the title npm package json lint flavors Override npm-package-json-lint flavors Dec 22, 2022
Copy link
Member

@nvuillam nvuillam left a comment

Choose a reason for hiding this comment

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

Great :)

@nvuillam nvuillam merged commit 87460d6 into oxsecurity:main Dec 22, 2022
@bdovaz bdovaz deleted the feature/npm-package-json-lint-flavors branch December 22, 2022 22:28
@nvuillam
Copy link
Member

nvuillam commented Dec 22, 2022

@bdovaz MegaLinter is quite poor relating dotnet linting capacities ... if you want to make PRs to enhance that ( like @llaville brillantly did with PHP linters ^^ ), you are very welcome ;)

Note: there is currently a PR to upgrade to donetv6 / v7, so soon MegaLinter will be v6 and/or v7 -> #1680

@nvuillam
Copy link
Member

nvuillam commented Dec 22, 2022

@bdovaz
Copy link
Collaborator Author

bdovaz commented Dec 22, 2022

@nvuillam But as far as I know these analyzers (the most currently used is Microsoft.CodeAnalysis.NetAnalyzers) are not a cli tool (Installed with dotnet tool install) but are included with the SDK directly (.NET 5+) when compiling the project or you install it as a NuGet package in each project.

https://www.nuget.org/packages/dotnet-format

image

vs

https://www.nuget.org/packages/Microsoft.CodeAnalysis.NetAnalyzers

image

@nvuillam
Copy link
Member

they must have CLI version :) ( dotnet-format is already in MegaLinter ^^ )

@Kurt-von-Laven
Copy link
Collaborator

@bdovaz MegaLinter is quite poor relating dotnet linting capacities ... if you want to make PRs to enhance that ( like @llaville brillantly did with PHP linters ^^ ), you are very welcome ;)

If you do decide to take this on, I recommend considering CSharpier, which is far faster than dotnet-format and automates considerably more formatting. It is inspired by Prettier, and we have been happy with the output for quite a while. It's available as a NuGet package and dotnet tool.

@bdovaz bdovaz mentioned this pull request Dec 26, 2022
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.

3 participants