microsoft/tslint-microsoft-contrib

function-name rule has mismatches in options schema/meta, readme description, and actually accepted rules

IllusionMH opened this issue · 1 comments

Feature request

Is your feature request that we implement a new rule?
No

Is your feature request related to a problem? Please describe.

  1. README description of function-name has only description of object with regular expression, but no mention of string flag.

  2. function-name rule meta has only description, schema, and examples of string flags.

  3. function-name rule schema and examples expect string flags right after true that enables rule, but implementation will parse these flags only as second option.

Describe the solution you'd like

  1. Update README.md, rules metadata (options description, schema, and examples) to represent both object and string flags.

  2. Update rule options parsing so that string flags can be in first position, if configuration object is not provided (when defaults are OK, but need to control over static private validation)

Describe alternatives you've considered

  1. Update only README.md - this will provide info for end user, but will require some effort and may be missed during implementation of #575 or similar

  2. Restrict string flags to second position - is doesn't look great set flag as [true, {}, "validate-private-statics-as-private"]

Additional context
Noticed in scope of #665

☠️ It's time! ☠️

Per #876, this repository is no longer accepting feature pull requests. TSLint is being deprecated and we recommend you switch to https://typescript-eslint.io.

Thanks for open sourcing with us, everyone!