{"id":23284955,"url":"https://github.com/divyagnan/eslint-plugin-ternaries","last_synced_at":"2025-04-06T15:23:32.090Z","repository":{"id":57159079,"uuid":"95605733","full_name":"divyagnan/eslint-plugin-ternaries","owner":"divyagnan","description":"Eslint rules concerning ternaries","archived":false,"fork":false,"pushed_at":"2017-07-08T22:33:14.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T19:18:19.378Z","etag":null,"topics":["eslint-plugin","eslint-rules","null","ternary"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divyagnan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-27T22:20:38.000Z","updated_at":"2017-06-28T23:30:43.000Z","dependencies_parsed_at":"2022-09-08T09:02:23.682Z","dependency_job_id":null,"html_url":"https://github.com/divyagnan/eslint-plugin-ternaries","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Feslint-plugin-ternaries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Feslint-plugin-ternaries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Feslint-plugin-ternaries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divyagnan%2Feslint-plugin-ternaries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divyagnan","download_url":"https://codeload.github.com/divyagnan/eslint-plugin-ternaries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247501442,"owners_count":20949069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint-plugin","eslint-rules","null","ternary"],"created_at":"2024-12-20T01:51:10.986Z","updated_at":"2025-04-06T15:23:32.035Z","avatar_url":"https://github.com/divyagnan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-ternaries [![Build Status](https://travis-ci.org/divyagnan/eslint-plugin-ternaries.svg?branch=master)](https://travis-ci.org/divyagnan/eslint-plugin-ternaries) [![npm version](https://badge.fury.io/js/eslint-plugin-ternaries.svg)](https://badge.fury.io/js/eslint-plugin-ternaries)\n\nEslint rules concerning ternaries\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm i eslint --save-dev\n```\n\nNext, install `eslint-plugin-ternaries`:\n\n```\n$ npm install eslint-plugin-ternaries --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-ternaries` globally.\n\n## Usage\n\nAdd `ternaries` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```diff\n{\n    \"plugins\": [\n+        \"ternaries\"\n    ]\n}\n```\n\n\nThen configure the rules you want to use under the rules section.\n\n```diff\n{\n    \"rules\": {\n+        \"ternaries/no-null-ternary\": 2,\n+        \"ternaries/no-empty-ternary\": 2\n    }\n}\n```\n\n## Supported Rules\n\n* [no-null-ternary](docs/rules/no-null-ternary.md) - Disallows ternaries with null as either the consequent or alternate condition.\n* [no-empty-ternary](docs/rules/no-empty-ternary.md) - Disallows ternaries that have \u0026#39;\u0026#39; or \u0026#34;\u0026#34; as either condition.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivyagnan%2Feslint-plugin-ternaries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivyagnan%2Feslint-plugin-ternaries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivyagnan%2Feslint-plugin-ternaries/lists"}