oxsecurity / megalinter

🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
https://megalinter.io
GNU Affero General Public License v3.0
1.81k stars 215 forks source link

How to exclude .vue from jscpd? #806

Closed A2-NieR closed 2 years ago

A2-NieR commented 2 years ago

image

I've read through it a couple of times, but can't figure our how to exclude .vue

Is it [".vue", ""], [".vue", "*"] or something completely different? 😅

nvuillam commented 2 years ago

As jscpd is run in project mode, not a list of files, the best way to ignore vue files is to add **/*.vue in .jscpd.json local file, as described in the documentation :)

https://nvuillam.github.io/mega-linter/descriptors/copypaste_jscpd/

A2-NieR commented 2 years ago

Hey thanks for the quick reply ^^ Yeah I got it to work like that, was just wondering if there is a way with the above setting to avoid cluttering the folder with another one of those files (.eslints, .gitlab-ci, .mega-linter, .prettier, .releasesrc, ...) :D

nvuillam commented 2 years ago

You can, by creating a folder , put linter config files in it, and define mega linter variables so they are used :)

A2-NieR commented 2 years ago

Will look into that one, my dude (: But the .yml files need to stay in root, no? Am pretty new to gitlab ci/cd 😅

nvuillam commented 2 years ago

It's very common to have gitlab-ci.yml at the root, but if you prefer another location you can override it in gitlab ci/cd settings :)

A2-NieR commented 2 years ago

For sure, but I can at least put the mega-linter config in a separate folder and include the path in the MEGALINTER_CONFIG variable, right?

nvuillam commented 2 years ago

I've never seen it used like that (only for remote configuration) but it should work yes :)