No missing feature-types
The "no-missing-feature-types" ensures, that feature-types are known.
#
ReasoningThere are usecases, where you want to ensure, that no "dead" folders exist, which are not managed by feature-lint. Therefore a rule `no-missing-feature-types exists. This rule makes feature-lint fail, if it encounters feature-type folders, which it does not know about.
#
ImplementationThis rule is applicable to the root of the project.
{ "$schema": "https://raw.githubusercontent.com/feature-lint/feature-lint/pages/schema/feature-lint-v0.0.15.schema.json" "rootDir": "./src", "rules": [ { "name": "no-missing-feature-types", "enabled": true } ]}
This rule is enabled=true by default.
#
ExampleGiven the following config:
{ "$schema": "https://raw.githubusercontent.com/feature-lint/feature-lint/pages/schema/feature-lint-v0.0.15.schema.json" "rootDir": "./src", "featureTypes": { "react": { "featureNameMatcher": "react-.*" // ... } }}
And the following tree:
src/ this-is-not-known/ // feature-type not defined react-dialog/ // known feature-type: react
Feature-lint would fail, if it encounters this-is-not-known
.