{"id":17749746,"url":"https://github.com/stscoundrel/alliser","last_synced_at":"2026-01-05T16:06:42.524Z","repository":{"id":38819077,"uuid":"445437152","full_name":"stscoundrel/alliser","owner":"stscoundrel","description":"Detect \u0026 list not-allowed file extensions in a project","archived":false,"fork":false,"pushed_at":"2024-05-25T06:33:15.000Z","size":989,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-15T22:21:00.602Z","etag":null,"topics":["alliser","cli","extensions","filetype-validator","typescript","utility"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/stscoundrel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-07T07:35:47.000Z","updated_at":"2024-05-25T06:33:05.000Z","dependencies_parsed_at":"2024-10-26T13:31:41.117Z","dependency_job_id":"952b2864-3220-4c0f-8736-3c74b994d96e","html_url":"https://github.com/stscoundrel/alliser","commit_stats":{"total_commits":144,"total_committers":3,"mean_commits":48.0,"dds":"0.22916666666666663","last_synced_commit":"4b20eed7ee3d5a649ebd8f8b69eec6bfc7271b41"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":"stscoundrel/typescript-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stscoundrel%2Falliser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stscoundrel%2Falliser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stscoundrel%2Falliser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stscoundrel%2Falliser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stscoundrel","download_url":"https://codeload.github.com/stscoundrel/alliser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245170387,"owners_count":20572058,"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":["alliser","cli","extensions","filetype-validator","typescript","utility"],"created_at":"2024-10-26T11:24:44.937Z","updated_at":"2026-01-05T16:06:42.452Z","avatar_url":"https://github.com/stscoundrel.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alliser\n\nDetect \u0026 list not allowed file extensions in a project. Scans project \u0026 compares findings against list of allowed filetypes.\n\nAlso available for your CI as batteries included [Github Action](https://github.com/marketplace/actions/alliser-action).\n\n### Install\n\n`yarn add alliser`\n\n### Motivation\n\nIn some project setups, one can use incorrect file extension without actually breaking the project. An example of this would be a TypeScript project, where one accidentally writes Jest test-files in .js instead of .ts. Jest allows that, and project gets randomly littered with .js files that do work. Or maybe you just want to let team members know, that a particular filetype or programming language is discouraged.\n\nAlliser goes through files, and lets you know if you have non-allowed file types within the project.\n\n#### Wait, can't I do this with gitignore?\n\nDepending on your use case, you might! There are differences though.\n\nGitignore is commonly used for completely blocking something from your repo. Things in there are artifacts you _dont want_ in repo, maybe dist, builds or external deps. Things that Alliser checks are things you _do want_ in your repo, like source code / tests you've written, but they may be of incorrect or discouraged format.\n\n\n### Usage\n\nThere are two main ways to use Alliser: run it yourself in JS/TS code, or run it via command line.\n\n##### Command line usage\n\nCommand line version exits with status 0 if no conflicting files are found. If files are found, exit status is 1 and files are listed to console.\n\nRun in one folder (src), looking for files that dont match one type (.ts)\n\n```bash\nalliser .ts src\n```\n\nOr in multiple folders \u0026 multiple extensions\n\n```bash\nalliser .ts,.tsx src,tests,bin\n```\n\nPossible output for incorrect files:\n\n```bash\nAlliser found errors: following files are not allowed formats (.ts)\ntests/fixtures/index.cs\ntests/fixtures/index.js\ntests/fixtures/index.py\ntests/fixtures/index.rs\ntests/fixtures/subfolder1/submodule2.js\ntests/fixtures/subfolder2/submodule.js\n```\n\n##### Programmatic use\n\nYou can also use Alliser to just fetch list of problematic files, and do your own thing with them.\n\n```javascript\nimport alliser from 'alliser';\n\n// Accepts an array of extensions, and an array of folders.\nconst incorrectFiles = alliser.check(['.ts', '.tsx'], ['src', 'tests'])\n\nconsole.log(incorrectFiles);\n// [\n//   tests/fixtures/index.cs\n//   tests/fixtures/index.js\n//   tests/fixtures/index.py\n//   tests/fixtures/index.rs\n//   tests/fixtures/subfolder1/submodule2.js\n//   tests/fixtures/subfolder2/submodule.js\n// ]\n\n```\n\n#### Default ignores\n\nAlliser is smart enough not to list files from folders like `node_modules` or `.git`. If you feel like some common ignore is missing from defaults, PRs \u0026 issues are welcome.\n\n\n### What's in the name?\n\n\"Alliser\" is picked from GRR Martins \"A Song Of Ice And Fire\". Alliser Thorne is a character who would definitely tell you if you're of \"the wrong type\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstscoundrel%2Falliser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstscoundrel%2Falliser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstscoundrel%2Falliser/lists"}