diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..73a91e3 --- /dev/null +++ b/biome.json @@ -0,0 +1,52 @@ +{ + "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", + "vcs": { + "enabled": false, + "clientKind": "git", + "useIgnoreFile": false + }, + "files": { + "ignoreUnknown": false, + "includes": [ + "**", + "!node_modules", + "!vendor", + "!composer.lock", + "!package-lock.json" + ] + }, + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 4 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "javascript": { + "formatter": { + "quoteStyle": "double" + } + }, + "json": { + "formatter": { + "enabled": true, + "bracketSpacing": true, + "expand": "always" + }, + "parser": { + "allowComments": true + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + } +} diff --git a/composer.json b/composer.json index 2f26813..7f08b5e 100644 --- a/composer.json +++ b/composer.json @@ -39,6 +39,7 @@ "dragon-code/codestyler": true, "ergebnis/composer-normalize": true, "friendsofphp/php-cs-fixer": true, + "laravel/pint": true, "symfony/thanks": true } } diff --git a/pint.json b/pint.json new file mode 100644 index 0000000..53e7dc9 --- /dev/null +++ b/pint.json @@ -0,0 +1,86 @@ +{ + "preset": "laravel", + "exclude": [ + "tests/Fixtures" + ], + "rules": { + "@PHP71Migration": true, + "@PHP73Migration": true, + "@PHP74Migration": true, + "@PHP80Migration": true, + "@PHP81Migration": true, + "@PHP82Migration": true, + "concat_space": { + "spacing": "one" + }, + "blank_line_before_statement": { + "statements": [ + "declare", + "phpdoc", + "continue", + "return" + ] + }, + "class_attributes_separation": { + "elements": { + "case": "none", + "const": "none", + "method": "one", + "property": "one", + "trait_import": "none" + } + }, + "class_definition": { + "multi_line_extends_each_single_line": true, + "single_item_single_line": true, + "single_line": true, + "space_before_parenthesis": true + }, + "combine_consecutive_issets": true, + "combine_consecutive_unsets": true, + "braces_position": { + "allow_single_line_anonymous_functions": true, + "allow_single_line_empty_anonymous_classes": true, + "anonymous_classes_opening_brace": "same_line" + }, + "escape_implicit_backslashes": { + "double_quoted": true, + "heredoc_syntax": true, + "single_quoted": false + }, + "global_namespace_import": { + "import_classes": true, + "import_constants": true, + "import_functions": true + }, + "multiline_comment_opening_closing": true, + "no_superfluous_elseif": true, + "no_useless_else": true, + "operator_linebreak": { + "only_booleans": false + }, + "ordered_types": { + "null_adjustment": "always_last", + "sort_algorithm": "alpha" + }, + "phpdoc_line_span": { + "const": "single", + "method": "multi", + "property": "single" + }, + "return_assignment": true, + "simplified_if_return": true, + "phpdoc_param_order": true, + "fully_qualified_strict_types": true, + "declare_strict_types": true, + "types_spaces": { + "space_multiple_catch": "none" + }, + "binary_operator_spaces": { + "default": "align_single_space_minimal" + }, + "php_unit_method_casing": { + "case": "camel_case" + } + } +}