{"id":23908586,"url":"https://github.com/ketrab2004/eslint-plugin-contextual-quotes","last_synced_at":"2026-04-18T12:03:10.204Z","repository":{"id":65694555,"uuid":"597455269","full_name":"ketrab2004/eslint-plugin-contextual-quotes","owner":"ketrab2004","description":"Enforce use of specific quotes based on the content of the string.","archived":false,"fork":false,"pushed_at":"2023-02-05T19:52:33.000Z","size":51,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T07:38:53.149Z","etag":null,"topics":["eslint","eslint-plugin","eslint-rules","quote","quotes"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-plugin-contextual-quotes","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ketrab2004.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-04T15:56:34.000Z","updated_at":"2023-02-04T22:36:05.000Z","dependencies_parsed_at":"2023-02-19T00:55:15.413Z","dependency_job_id":null,"html_url":"https://github.com/ketrab2004/eslint-plugin-contextual-quotes","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"1b533fd43bdb23b923aa19652b44baa1a3b08b02"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ketrab2004/eslint-plugin-contextual-quotes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketrab2004%2Feslint-plugin-contextual-quotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketrab2004%2Feslint-plugin-contextual-quotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketrab2004%2Feslint-plugin-contextual-quotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketrab2004%2Feslint-plugin-contextual-quotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ketrab2004","download_url":"https://codeload.github.com/ketrab2004/eslint-plugin-contextual-quotes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ketrab2004%2Feslint-plugin-contextual-quotes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267785965,"owners_count":24144124,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","eslint-plugin","eslint-rules","quote","quotes"],"created_at":"2025-01-05T04:39:33.549Z","updated_at":"2026-04-18T12:03:10.164Z","avatar_url":"https://github.com/ketrab2004.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contextual Quotes\n[![npm](https://img.shields.io/npm/v/eslint-plugin-contextual-quotes?style=plastic)](https://www.npmjs.com/package/eslint-plugin-contextual-quotes)\n[![Tests](https://github.com/ketrab2004/eslint-plugin-contextual-quotes/actions/workflows/node.js.yml/badge.svg)](https://github.com/ketrab2004/eslint-plugin-contextual-quotes/actions/workflows/node.js.yml)\n\nEnforce the use of specific quotes based on the content of the string.\n\n* `'` for empty strings and strings of only a single character\n* `\"` for regular strings\n* `` ` `` for strings that use string interpolation\n\n## Installation\nYou'll first need to install [ESLint](https://eslint.org/):\n```cmd\n$ npm i eslint --save-dev\n```\n\nNext, install `eslint-plugin-contextual-quotes`:\n```cmd\n$ npm install eslint-plugin-contextual-quotes --save-dev\n```\n**Note**: If you have installed ESLint globally then you must also install this globally.\n\n## Usage\nAdd `contextual-quotes` to the plugins section of your configuration file.\n```json\n// .eslintrc\n{\n    \"plugins\": [\n        \"contextual-quotes\"\n    ],\n    ...\n}\n```\n\nThen setup the actual rule under rules in the same configuration file.\n```json\n// .eslintrc\n{\n    ...\n    \"rules\": {\n        ...\n        \"contextual-quotes/contextual-quotes\": \"error\"\n    }\n}\n```\n\n## Options\n* `\"applyFix\": \"never\"` Whether to apply fixes\n    * `\"never\"` Only give suggestions\n    * `\"always\"` Always give a fix along with the suggestions\n* `\"expressionBlockEscapes\": [\"\\\\\"]` What strings should be allowed to escape `${}` in regular strings. The first string in the list is used for the corresponding suggestion\n* `\"emoijAsSingleCharacter\": \"never\"` Whether to treat emoijs and other special characters as a single character (allow to be wrapped in just `'`)\n    * `\"never\"` Count string length in utf-16 units\n    * `\"always\"` Count string length in visual characters\n\n```json\n// .eslintrc\n{\n    ...\n    \"rules\": {\n        ...\n        \"contextual-quotes/contextual-quotes\": [\"error\", {\n            \"applyFix\": \"always\",\n            \"expressionBlockEscapes\": [\"custom_escape\", \"\\\\\"],\n            \"emoijAsSingleCharacter\": \"always\"\n        }]\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fketrab2004%2Feslint-plugin-contextual-quotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fketrab2004%2Feslint-plugin-contextual-quotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fketrab2004%2Feslint-plugin-contextual-quotes/lists"}