VOOZH about

URL: https://deepwiki.com/invokable/laravel-boost-phpstorm-copilot/7.5-code-quality-configuration

⇱ Code Quality Configuration | invokable/laravel-boost-phpstorm-copilot | DeepWiki


Loading...
Last indexed: 28 February 2026 (57ef88)
Menu

Code Quality Configuration

This page is a reference for the three configuration files that govern code style enforcement, editor behavior, and repository distribution in this package: pint.json, .editorconfig, and .gitattributes. These files apply uniformly to all source files in the repository.

For information on how linting is exercised in automated pipelines, see CI/CD Pipeline. For the testing configuration that complements the quality tooling, see Testing Configuration. For contribution expectations that depend on these rules, see Contributing Guidelines.


Laravel Pint (pint.json)

pint.json configures Laravel Pint, the opinionated PHP code style fixer built on top of PHP-CS-Fixer.

Source: pint.json1-8

FieldValueEffect
preset"laravel"Applies all rules from the official Laravel coding standard
no_unused_importsfalseDisables auto-removal of unused use statements
strict_comparisontrueEnforces === and !== instead of == and !=
declare_strict_typestrueRequires declare(strict_types=1); at the top of every PHP file

The no_unused_imports rule is explicitly turned off. This is common in packages that pre-import types for IDE support or that use imports conditionally through traits.

The two enabled rules (strict_comparison and declare_strict_types) raise the type safety floor beyond the base Laravel preset. Every .php file in src/ is expected to carry a strict types declaration.

Running the linter locally:

Composer scriptBehavior
composer lintRuns Pint and auto-fixes violations
composer test:lintRuns Pint in --test mode (read-only, exits non-zero on violations)

These scripts are defined in composer.json and are also exercised by the lint.yml GitHub Actions workflow on pushes to main.

Diagram: Pint Rule Inheritance


Sources: pint.json1-8


EditorConfig (.editorconfig)

.editorconfig provides editor-agnostic formatting rules that apply automatically in any compatible editor (PhpStorm, VS Code, Neovim, etc.). It does not require a separate tool installation.

Source: .editorconfig1-13

Global rules ([*])

PropertyValueMeaning
charsetutf-8All files use UTF-8 encoding
end_of_linelfUnix-style line endings (LF, not CRLF)
indent_size4Four spaces per indent level
indent_stylespaceSpaces, not tabs
insert_final_newlinetrueEvery file ends with a newline character
trim_trailing_whitespacetrueNo trailing spaces on any line

File-type overrides

PatternOverrideReason
[*.md]trim_trailing_whitespace = falseMarkdown uses two trailing spaces for line breaks
[*.{yml,yaml}]indent_size = 2YAML convention uses 2-space indentation

The 2-space YAML override applies to files such as testbench.yaml and the GitHub Actions workflow files under .github/workflows/.

Diagram: EditorConfig Rule Applicability


Sources: .editorconfig1-13


Git Attributes (.gitattributes)

.gitattributes serves two purposes: it assigns diff drivers to specific file types for more readable git diff output, and it controls which files are excluded from composer install distribution archives via export-ignore.

Source: .gitattributes1-17

Line ending normalization

* text=auto

Instructs Git to auto-detect and normalize line endings on checkout. This pairs with the .editorconfig LF setting.

Diff strategy assignments

PatternDiff driverEffect
*.blade.phphtmlHTML-aware diff output for Blade templates
*.mdmarkdownMarkdown-aware diff output
*.phpphpPHP-aware diff output

These assignments make git diff and pull request diffs more semantically accurate for each file type.

Export-ignore list

Files and directories marked export-ignore are excluded when composer creates a distribution archive (e.g., from a git archive or a Packagist release). Only the production runtime files are included in the installed package.

EntryTypeRationale
/.githubDirectoryCI workflows, MCP config — dev-only
/testsDirectoryTest suite — not needed by consumers
.editorconfigFileEditor settings — not needed by consumers
.gitattributesFileGit metadata — not needed by consumers
.gitignoreFileGit metadata — not needed by consumers
phpunit.xmlFileTest configuration — not needed by consumers
pint.jsonFileLinter configuration — not needed by consumers
boost.jsonFileDevelopment boost config — not needed by consumers
testbench.yamlFileTestbench configuration — not needed by consumers
/workbenchDirectoryLocal dev workbench app — not needed by consumers

Diagram: Distribution Archive Contents


Sources: .gitattributes1-17


Summary

FileTool/SpecPrimary function
pint.jsonLaravel Pint (PHP-CS-Fixer)PHP code style rules; enforces strict types and strict comparison
.editorconfigEditorConfig specCross-editor whitespace, encoding, and newline consistency
.gitattributesGitDiff strategies per file type; excludes dev files from distribution

All three files operate at the repository level and apply to contributors and tooling alike. They are themselves excluded from distribution releases via the export-ignore directives in .gitattributes.