{"id":13565638,"url":"https://github.com/julie-ng/lowercase-linter","last_synced_at":"2025-04-11T16:42:35.173Z","repository":{"id":44608898,"uuid":"453046632","full_name":"julie-ng/lowercase-linter","owner":"julie-ng","description":"GitHub Action to ensure files are lower case only. Suggests valid names in kebab-case format.","archived":false,"fork":false,"pushed_at":"2024-02-09T22:23:47.000Z","size":604,"stargazers_count":8,"open_issues_count":5,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-14T21:45:54.737Z","etag":null,"topics":["actions","github-actions","linter"],"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/julie-ng.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2022-01-28T11:44:09.000Z","updated_at":"2023-09-28T14:09:12.000Z","dependencies_parsed_at":"2024-01-16T18:59:39.024Z","dependency_job_id":"26a161e9-1e53-473c-857b-bb1353d13faa","html_url":"https://github.com/julie-ng/lowercase-linter","commit_stats":{"total_commits":63,"total_committers":1,"mean_commits":63.0,"dds":0.0,"last_synced_commit":"1793e4cab0d018ff2781cf32f1193096f0c51d57"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julie-ng%2Flowercase-linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julie-ng%2Flowercase-linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julie-ng%2Flowercase-linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julie-ng%2Flowercase-linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julie-ng","download_url":"https://codeload.github.com/julie-ng/lowercase-linter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248442327,"owners_count":21104158,"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":["actions","github-actions","linter"],"created_at":"2024-08-01T13:01:51.709Z","updated_at":"2025-04-11T16:42:35.152Z","avatar_url":"https://github.com/julie-ng.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# lowercase-linter\n\n[![ci](https://github.com/julie-ng/lowercase-linter/actions/workflows/ci.yaml/badge.svg)](https://github.com/julie-ng/lowercase-linter/actions/workflows/ci.yaml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/e938830e36c0a08beeb1/maintainability)](https://codeclimate.com/github/julie-ng/lowercase-linter/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/e938830e36c0a08beeb1/test_coverage)](https://codeclimate.com/github/julie-ng/lowercase-linter/test_coverage)\n\nA GitHub Action to fail builds whos files have both upper and lower case mixed, i.e. camelCase to prevent filename conflicts and broken deployments.\n\n### Features\n\n- Suggests kebab-case fixes of problem filenames for quicker fixing\n- No dependencies* - to avoid supply chain security issues.\n- Ignores common mixed case files that usually won't \"break\" builds, e.g. `CONTRIBUTING.md`\n\n*Note: [GitHub Actions Toolkit](https://github.com/actions/toolkit) is still required for JavaScript based actions. \n\n### Example Usage\n\n```yaml\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v2\n\n  - name: Lint Filenames\n    uses: julie-ng/lowercase-linter@v1\n    id: lint_filenames\n    continue-on-error: true\n    with:\n      path: '.'\n      pr-comment: true\n      repo-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n### Example Pull Request Comment\n\nUse the `pr-comment` param to toggle whether you want suggested renames added to a pull request.\n\n\u003cimg src=\"./images/comment-preview.png\" alt=\"Example: Errors posted to Pull Request\" width=\"640\"\u003e\n\n## Inputs\n\n- #### `path` (optional)  \n  Path to scan for mixed case filenames. Will search subfolders too.  \n  Default: `.`\n\n- #### `pr-comment`  (optional)\n  If file name errors are found, suggested fixes are posted to the Pull Request.  \n  Default: `false`\n\n- #### `repo-token`  (optional)\n  GitHub Action workflow token needed to add comments to pull requests.  \n  Default: `''`\n  \n## Outputs\n\n- #### `errors`    \n  Array - list of files with mixed case and suggested renames in JSON.\n\n- #### `linted`   \n  Array - list of all files that were checked for mixed case names.\n\n- #### `comment-url`  \n  String - URL of the comment posted to Pull Request (if errors were found).\n\n## Why is Case Sensitivity a Challenge?\n\nIf a system is case sensitive, then `README.md` and `readme.md` can co-exist. \n\nIf a system is not case sensitive, then `Logo.png` can be referenced _both_ as its actual mixed case name _and_ all lowercase `logo.png`. So if you have `\u003cimg src=\"logo.png\"\u003e` but your image is actually named `Logo.png`, it will work *locally* but users will see a broken image when deployed to a Linux based server.\n\n| System | Case Sensistive |\n|:--|:--|\n| Windows | false, but preserves case |\n| Mac (HFS+) | false, but preserves case |\n| Git | true |\n| Linux | true |\n\nNot deploying? Still a problem for colleagues. If you're collaborating and someone checks in a file with mixed case, it can be a nightmare to resolve because you have to do it in 2 places - OS and git. And if people don't keep their branches up to date, the mixed files come back like a recurring nightware 😵‍💫\n\n### kebab-case suggestions\n\nIf you check the output, the action will also make suggestions using the [kebab-case naming convention](https://en.wikipedia.org/wiki/Letter_case#Kebab_case), for example:\n\n| Original name | Suggested Name |\n|:--|:--|\n| `Foo/Bar.md` | `foo/bar.md` |\n| `Foo/UppercaseExtension.MD` | `foo/uppercase-extension.md` |\n| `FooBar/cat.txt` | `foobar/cat.txt` |\n| `Foo` | `foo` |\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulie-ng%2Flowercase-linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulie-ng%2Flowercase-linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulie-ng%2Flowercase-linter/lists"}