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

module-required-files: Add advanced configurations #20

Open
flaviostutz opened this issue Oct 22, 2022 · 0 comments
Open

module-required-files: Add advanced configurations #20

flaviostutz opened this issue Oct 22, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@flaviostutz
Copy link
Owner

We already have a basic configuration like this (see #4):

{
  "rules": {
    "module-required-files": {
      "strict": false,
      "files": ["README.md", "Makefile"]
     }
  }

Let's add a more advanced configuration option for when you want to configure conditional rules for file requirements (the basic config stays the same):

{
   "rules":{
      "module-required-files":{
         "files":[
            {
               "all":[
                  "README.md",
                  "Makefile"
               ],
               "strict": false
            },
            {
               "package.json":[
                  "tsconfig.json",
                  "jest.config.js",
                  ".eslintrc.js"
               ],
               "strict": false
            },
            {
               "go.mod":[
                  "go.sum"
               ],
               "strict": true
            }
         ]
      }
   }
}
@flaviostutz flaviostutz added enhancement New feature or request help wanted Extra attention is needed hacktoberfest labels Oct 22, 2022
@flaviostutz flaviostutz changed the title Rule "module-required-files": Add advanced configurations module-required-files: Add advanced configurations Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants