flaviostutz / monolint

Linter for monorepos. Checks folder structure, module contents, file contents and naming conventions
MIT License
7 stars 4 forks source link

Create configuration bundle mechanism (like "extends" from eslint) #25

Closed flaviostutz closed 1 year ago

flaviostutz commented 1 year ago

External parties should be able to create more complex set of configurations that could be reused.

For example, one could create a set of configurations specialized for Serverless Framework checks, such as checking if the "runtime" attribute of all serverless.yml files are the same in the project etc. It can help organizations share a common set of rules among monorepos also.

Our configuration would be:


{
  "extends": ["monolint:recommended", "monolint:serverless", "plugin:somepluginname"],
  "rules": {
    "packagejson-same-name": true
  },
  "defaults": false -> WOULD BE REMOVED. by default "monolint:recommended" would activated and to deactivate everything one should only do "extends": []
}

(all the default configurations should be declared using the same mechanism also. The difference is that the "defaults" would be "default" activated bundles)

tiagostutz commented 1 year ago

Nice, I think that in fact we don't need the defaults: false. As you pointed, the extends: [] will do the trick when users doesn't want the defaults.