[{"name":"FunctionalJavascript.NoLooseEquality","comment":"\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Reports uses of loose equality operators `==` and `!=`.\n\n    config =\n        [ FunctionalJavascript.NoLooseEquality.rule\n        ]\n\n\n## Fail\n\n    function compare(a, b) {\n        return a == b;\n        }\n    function compare(a, b) {\n        return a != b;\n        }\n\n\n## Success\n\n    function compare(a, b) {\n        return a === b;\n        }\n    function compare(a, b) {\n        return a !== b;\n        }\n\n\n## Try it out\n\nYou can try this rule out by running the following command:\n\n```bash\nelm-review --template mateusfpleite/elm-review-functional-javascript/example --rules NoLooseEquality\n```\n\n","type":"Review.Rule.Rule"}],"binops":[]},{"name":"FunctionalTypescript.NoUnionReturns","comment":" Report when a function don't return a single type. Allow null and undefined in union types.\n\n@docs rule\n\n","unions":[],"aliases":[],"values":[{"name":"rule","comment":" Reports when a function doesn't return a single type. Allows `null` and `undefined` in union types.\n\n    config =\n        [ FunctionalTypescript.NoUnionReturns.rule\n        ]\n\n\n## Fail\n\n    function getId(user: User): string | number {\n        return user.id;\n    }\n\n    function getId(user: User): string | number | null {\n        return user.id;\n    }\n\n\n## Success\n\n    function getId(user: User): string {\n        return user.id;\n    }\n\n    function maybeGetId(user: User): string | null {\n        return user.id;\n    }\n\n\n## When to enable this rule\n\nThis rule is useful for enforcing a more functional or Elm-like style in your TypeScript files. It allows union types with `null` or `undefined`, which is a common pattern in TypeScript to represent optional values. Custom types defined with union types are also permitted, as complex types often need to be represented as unions.\n\n\n## Try it out\n\nYou can try this rule out by running the following command:\n\n```bash\nelm-review --template mateusfpleite/elm-review-functional-javascript/example --rules FunctionalTypescript.NoUnionReturns\n```\n\n","type":"Review.Rule.Rule"}],"binops":[]}]