Skip to content

Commit

Permalink
feat: add code formatters
Browse files Browse the repository at this point in the history
  • Loading branch information
luangjokaj committed Apr 11, 2024
1 parent 087f035 commit a8cef24
Show file tree
Hide file tree
Showing 36 changed files with 13,624 additions and 13,497 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ npm-debug.log
xdebug

.env

.php-cs-fixer.cache

34 changes: 34 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
$config = new PhpCsFixer\Config();
return $config
->setIndent(' ')
->setRules([
'single_quote' => true,
'indentation_type' => true,
'array_indentation' => true,
'array_syntax' => true,
'braces' => true,
'doctrine_annotation_indentation' => true,
'heredoc_indentation' => true,
'indentation_type' => true,
'method_argument_space' => true,
'method_chaining_indentation' => true,
'phpdoc_indent' => true,
'single_quote' => true,
'statement_indentation' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => true,
'cast_spaces' => true,
'spaces_inside_parentheses' => true,
'trim_array_spaces' => true,
'single_line_empty_body' => true,
'function_declaration' => false,
'braces_position' => [
'classes_opening_brace' => 'same_line',
'functions_opening_brace' => 'same_line',
],
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
);
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 100,
"useTabs": false,
"tabWidth": 2,
"endOfLine": "crlf",
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always"
}

75 changes: 27 additions & 48 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,50 +1,29 @@
{
"rules": {
"block-no-empty": true,
"color-no-invalid-hex": true,
"comment-empty-line-before": [
"always",
{
"ignore": [
"stylelint-commands",
"after-comment"
]
}
],
"declaration-colon-space-after": "always",
"indentation": [
"tab",
{
"except": [
"value"
]
}
],
"max-empty-lines": 2,
"rule-empty-line-before": [
"always",
{
"except": [
"first-nested"
],
"ignore": [
"after-comment"
]
}
],
"unit-allowed-list": [
"px",
"em",
"rem",
"vw",
"vh",
"deg",
"ms",
"%",
"s",
"dpi",
"pt",
"fr"
]
}
"rules": {
"block-no-empty": true,
"color-no-invalid-hex": true,
"comment-empty-line-before": [
"always",
{
"ignore": ["stylelint-commands", "after-comment"]
}
],
"declaration-colon-space-after": "always",
"indentation": [
"tab",
{
"except": ["value"]
}
],
"max-empty-lines": 2,
"rule-empty-line-before": [
"always",
{
"except": ["first-nested"],
"ignore": ["after-comment"]
}
],
"unit-allowed-list": ["px", "em", "rem", "vw", "vh", "deg", "ms", "%", "s", "dpi", "pt", "fr"]
}
}

0 comments on commit a8cef24

Please sign in to comment.