{"id":21387635,"url":"https://github.com/nju33/eslint-plugin-tailwindcss-jit-restrict","last_synced_at":"2025-03-16T12:33:09.664Z","repository":{"id":43532786,"uuid":"419347336","full_name":"nju33/eslint-plugin-tailwindcss-jit-restrict","owner":"nju33","description":"To be restricted from using all of or partially arbitrary values in jit mode.","archived":false,"fork":false,"pushed_at":"2023-03-06T09:29:45.000Z","size":47115,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-23T00:14:46.628Z","etag":null,"topics":["gitpod-workspace"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-plugin-tailwindcss-jit-restrict","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/nju33.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}},"created_at":"2021-10-20T13:43:41.000Z","updated_at":"2021-12-15T08:44:25.000Z","dependencies_parsed_at":"2022-09-12T00:00:33.246Z","dependency_job_id":null,"html_url":"https://github.com/nju33/eslint-plugin-tailwindcss-jit-restrict","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"nju33/gitpod-workspace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Feslint-plugin-tailwindcss-jit-restrict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Feslint-plugin-tailwindcss-jit-restrict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Feslint-plugin-tailwindcss-jit-restrict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nju33%2Feslint-plugin-tailwindcss-jit-restrict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nju33","download_url":"https://codeload.github.com/nju33/eslint-plugin-tailwindcss-jit-restrict/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243869219,"owners_count":20360976,"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":["gitpod-workspace"],"created_at":"2024-11-22T12:13:59.290Z","updated_at":"2025-03-16T12:33:09.627Z","avatar_url":"https://github.com/nju33.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-tailwindcss-jit-restrict\n\nTo be restricted from using all of or partially arbitrary values in jit mode.\n\n## Install\n\n```bash\nyarn add --dev eslint-plugin-tailwindcss-jit-restrict\n// or\nnpm install --save-dev eslint-plugin-tailwindcss-jit-restrict\n```\n\n## How to use\n\nFirstly, you'll set `tailwindcss-jit-restrict` to `plugins`. Then, its `restrict` rule is also set.\n\n```json\n{\n  \"plugins\": [\"tailwindcss-jit-restrict\"],\n  \"rules\": {\n    \"tailwindcss-jit-restrict/restrict\": \"error\"\n  }\n}\n```\n\nNow, all of arbitrary values—such as `w-[500px]`—becomes eslint error.\n\n### Advanced\n\nIf you want to allow some arbitrary values to be useed, you can specify white list by setting the rule option.\n\nFor instance, you think that you want only to use `w-[500px]` mentioned earlier, you do that set in the following.\n\n```json\n{\n  \"plugins\": [\"tailwindcss-jit-restrict\"],\n  \"rules\": {\n    \"tailwindcss-jit-restrict/restrict\": [\n      \"error\",\n      { \"whiteList\": [\"w-[500px]\"] }\n    ]\n  }\n}\n```\n\nHere, you can set values of the `whiteList` as array of strings. In other words, you think that you want to add more the whiteList—for instance `h-[350px]`—, then you just add it.\n\n```json\n{\n  \"plugins\": [\"tailwindcss-jit-restrict\"],\n  \"rules\": {\n    \"tailwindcss-jit-restrict/restrict\": [\n      \"error\",\n      { \"whiteList\": [\"w-[500px]\", \"h-[350px]\"] }\n    ]\n  }\n}\n```\n\nHowever, if you have a lots of white list, This is awful. So, this plugin lets you write by glob.\n\nFor instance, you want to allow all of arbitrary values for the `width` to be used, you should do in the following.\n\n```json\n{\n  \"plugins\": [\"tailwindcss-jit-restrict\"],\n  \"rules\": {\n    \"tailwindcss-jit-restrict/restrict\": [\"error\", { \"whiteList\": [\"w-*\"] }]\n  }\n}\n```\n\nFor instance, you want only to allow not all but some, you can also be in the following. (You only allow `w-[350px]`, `w-[500px]` and `w-[750px]` to be used.)\n\n```json\n{\n  \"plugins\": [\"tailwindcss-jit-restrict\"],\n  \"rules\": {\n    \"tailwindcss-jit-restrict/restrict\": [\n      \"error\",\n      { \"whiteList\": [\"w-\\\\[@(350|500|750)px\\\\]\"] }\n    ]\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Feslint-plugin-tailwindcss-jit-restrict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnju33%2Feslint-plugin-tailwindcss-jit-restrict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnju33%2Feslint-plugin-tailwindcss-jit-restrict/lists"}