Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tlint Laravel Package

tightenco/tlint

Tighten’s opinionated linter for Laravel and PHP projects. Enforces consistent conventions and catches style issues using preset and custom rules, runnable via CLI or CI. Built on PHP_CodeSniffer with sensible Laravel-focused defaults.

View on GitHub
Deep Wiki
Context7

Tighten linter for Laravel conventions.

Frequently asked questions about Tlint
How do I install and run tlint in a Laravel project?
Install via Composer with `composer require tightenco/tlint`. Run checks with `php artisan tlint:check` or auto-fix issues using `php artisan tlint:fix`. For dry runs, use `--fix-dry-run` to preview changes before applying them.
Does tlint work with Laravel 10 or 11? What about older versions?
Tlint officially supports Laravel 8+ and is tested up to Laravel 13.x. However, versions before 7.0.0 supported PHP 7.3/7.4 and older Laravel releases, so check your project’s compatibility if using pre-7.0.0.
Can tlint auto-fix Laravel-specific issues like Blade directives or Facade imports?
Yes, tlint includes formatters like `SpaceAfterBladeDirectives` and linters like `FullyQualifiedFacades` to auto-fix common Laravel patterns. Configure these in `tlint.json` under the `formatters` or `linters` sections.
How do I exclude certain files or directories from linting?
Use the `exclude` key in your `tlint.json` config to specify paths or file patterns. For example, `"exclude": ["tests/*", "vendor/*"]` skips test and vendor files during linting.
Will tlint conflict with PHPStan or Psalm in my CI pipeline?
Tlint focuses on style and convention enforcement (e.g., Facade usage, Blade formatting), while PHPStan/Psalm handle static analysis. Overlaps like `NoDump` (for `dd()`) may require prioritization—run tlint first if you want to gate style issues separately.
How can I customize tlint to match my team’s coding standards?
Extend the default `tighten` preset by adding custom linters/formatters in `tlint.json`. For example, include `"linters": ["NoJsonDirective", "CustomLaravelRule"]` to enforce project-specific rules.
Does tlint integrate with Git hooks or CI/CD tools like GitHub Actions?
Yes, tlint supports Git hooks (e.g., pre-commit) via `php artisan tlint:check --fix`. For CI/CD, use exit codes (0 = no issues, 1 = errors) in GitHub Actions or GitLab CI. Example: `run: php artisan tlint:check` in your workflow.
How do I handle false positives or suppress specific warnings?
Use the `ignore` key in `tlint.json` to suppress warnings for specific files or rules. For example, `"ignore": ["app/Helpers/old_code.php", "NoDump"]` skips linting for that file or rule entirely.
What’s the performance impact of running tlint in a large Laravel codebase?
Tlint can be resource-intensive for large projects. Mitigate this by linting specific paths (e.g., `"paths": ["app", "routes"]`) or running it in parallel with tools like `php-parallel-lint`. Cache results in CI if repeat runs are common.
Are there alternatives to tlint for Laravel-specific linting?
Alternatives include `laravel-pint` (for formatting) or custom PHP_CodeSniffer rules. However, tlint is uniquely tailored for Laravel conventions (e.g., Facades, Blade) and offers auto-fixing, making it a more comprehensive solution for teams adopting Tighten’s standards.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai