You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of #99, we removed the validation that all configured rules exist, but this is very useful, specially when using plugins. The removal was needed because the rules validation was executed before the plugins were loaded, and there wasn't an easy way to move it after that.
This will need some thought and possibly some restructuring. There are two things that are needed here:
Validate that every configured rule exists.
Validate that the options for each rule are correct. This would only be done if the rule specifies a schema for its options.
2 is not needed right now, but it would be a nice-to-have.
With respect to 1, there are some alternatives on how to do it. The way ESLint does it is like this: when a rule doesn't exist, a stub rule is created that reports an error at the "Program" level (in Solhint's case it would be at the "SourceUnit" level, I think). This error indicates that that rule doesn't exist. This may be useful because the other rules are executed anyway. Also, consistency with ESLint is always a plus.
An alternative is to iterate over every rule and check that it's available, and fail early if it's not.
The text was updated successfully, but these errors were encountered:
As part of #99, we removed the validation that all configured rules exist, but this is very useful, specially when using plugins. The removal was needed because the rules validation was executed before the plugins were loaded, and there wasn't an easy way to move it after that.
This will need some thought and possibly some restructuring. There are two things that are needed here:
2 is not needed right now, but it would be a nice-to-have.
With respect to 1, there are some alternatives on how to do it. The way ESLint does it is like this: when a rule doesn't exist, a stub rule is created that reports an error at the "Program" level (in Solhint's case it would be at the "SourceUnit" level, I think). This error indicates that that rule doesn't exist. This may be useful because the other rules are executed anyway. Also, consistency with ESLint is always a plus.
An alternative is to iterate over every rule and check that it's available, and fail early if it's not.
The text was updated successfully, but these errors were encountered: