Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed May 15, 2022
0 parents commit a0d3759
Show file tree
Hide file tree
Showing 115 changed files with 53,970 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# 4 space indentation
[*.php]
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

# Rest
[*.{js,ts,jsx,tsx,scss,vue,yml,json,html,py,sh,css,pcss}]
charset = utf-8
indent_style = space
indent_size = 2
43 changes: 43 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = {
root: true,
env: {
browser: true,
},
plugins: ['vue'], // enable vue plugin
extends: ["plugin:vue/recommended", "prettier"], // activate vue related rules
parserOptions: {
"parser": "@babel/eslint-parser",
"ecmaVersion": 7,
"sourceType": "module",
"ecmaFeatures": {
"globalReturn": false,
"impliedStrict": false,
"jsx": false,
"experimentalObjectRestSpread": false,
"allowImportExportEverywhere": false
}
},
rules: {
// allow paren-less arrow functions
"arrow-parens": 0,
// allow async-await
"generator-star-spacing": 0,
// allow debugger during development
"no-debugger": process.env.NODE_ENV === 'production' ? 2 : 0,
"semi": [2, "never"],
"quotes": [2, "single"],
"vue/no-multiple-template-root": 0,
"vue/require-default-prop": 0,
"vue/require-prop-types": 0,
"vue/no-v-html": 0,
"vue/html-indent": 0,
"vue/no-use-v-if-with-v-for": 0,
"vue/no-mutating-props": 0,
"vue/component-name-in-template-casing": ['error', 'kebab-case'],
"vue/v-slot-style": ["error", {
"atComponent": "v-slot",
"default": "v-slot",
"named": "longform",
}]
}
};
51 changes: 51 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored

.docker/** export-ignore
.git/** export-ignore
assets/** export-ignore
bin/** export-ignore
node_modules/** export-ignore
tests/** export-ignore
src/** export-ignore
public/*.html export-ignore

.DS_Store export-ignore
.env export-ignore
.babelrc export-ignore
.editorconfig export-ignore
.eslintignore export-ignore
.eslintrc.js export-ignore
.gitignore export-ignore
.gitkeep export-ignore
.gitattributes export-ignore
.*.cache export-ignore
.python-version export-ignore
.scrutinizer.yml export-ignore
.stylelintrc export-ignore
.travis.yml export-ignore
.vuebeautifyrc export-ignore
*.config.js export-ignore
*.gif export-ignore
*.js export-ignore
*.json export-ignore
*.lock export-ignore
*.sh export-ignore
*.zip export-ignore
index.html export-ignore
LICENSE.md export-ignore
package-lock.json export-ignore
phpcs.xml export-ignore
phpcs.xml.dist export-ignore
phpunit.xml export-ignore
phpunit.xml.dist export-ignore
CHANGELOG.md export-ignore
README.md export-ignore
webpack.mix.js export-ignore
yarn.lock export-ignore
vue-wp-plugin-starter.php export-ignore

**/*(.gitkeep) export-ignore
**/*(.DS_Store) export-ignore
71 changes: 71 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
plugin-deploy.sh
export.sh
nbproject
node_modules
build
secret.json
log.txt

# Compiled output #
###################
/dist
/tmp
/build

# Dependencies #
###################
/node_modules
/bower_components
/vendor

# Misc #
###################
.idea
config.codekit
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Logs and databases #
######################
*.log
*.sql
*.sqlite

.*.cache

2 changes: 2 additions & 0 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# disable folder listing
Options -Indexes
166 changes: 166 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<?php

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$rules = [
'array_syntax' => ['syntax' => 'short'],

'no_unused_imports' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'braces' => true,
'cast_spaces' => true,
'concat_space' => [
'spacing' => 'none',
],
'declare_equal_normalize' => true,
'elseif' => true,
'encoding' => true,
'full_opening_tag' => true,
'fully_qualified_strict_types' => true, // added by Shift
'function_declaration' => true,
'function_typehint_space' => true,
'heredoc_to_nowdoc' => true,
'include' => true,
'increment_style' => ['style' => 'post'],
'indentation_type' => true,
'linebreak_after_opening_tag' => true,
'line_ending' => true,
'lowercase_cast' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true, // added from Symfony
'magic_method_casing' => true, // added from Symfony
'magic_constant_casing' => true,
'method_argument_space' => true,
'native_function_casing' => true,
'no_alias_functions' => true,
'no_extra_blank_lines' => [
'tokens' => [
'extra',
'throw',
'use',
],
],
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_closing_tag' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_mixed_echo_print' => [
'use' => 'echo',
],
'no_multiline_whitespace_around_double_arrow' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_inside_parenthesis' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'normalize_index_brace' => true,
'not_operator_with_successor_space' => true,
'object_operator_without_whitespace' => true,
'phpdoc_indent' => true,
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_scalar' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_summary' => true,
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'self_accessor' => true,
'short_scalar_cast' => true,
'simplified_null_return' => false, // disabled by Shift
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_line_comment_style' => [
'comment_types' => ['hash'],
],
'single_quote' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'switch_case_semicolon_to_colon' => true,
'switch_case_space' => true,
'ternary_operator_spaces' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,

// php-cs-fixer 3: Renamed rules
'constant_case' => ['case' => 'lower'],
'general_phpdoc_tag_rename' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_tag_type' => true,
'psr_autoloading' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],

// php-cs-fixer 3: Changed options
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null],
],
'blank_line_before_statement' => [
'statements' => ['return'],
],
'class_attributes_separation' => [
'elements' => [
'const' => 'one',
'method' => 'one',
'property' => 'one',
'trait_import' => 'one'
],
],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
'single_item_single_line' => true,
'single_line' => true,
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
],

// php-cs-fixer 3: Removed rootless options (*)
'no_unneeded_control_parentheses' => [
'statements' => ['break', 'clone', 'continue', 'echo_print', 'return', 'switch_case', 'yield'],
],
'no_spaces_around_offset' => [
'positions' => ['inside', 'outside'],
],
'visibility_required' => [
'elements' => ['property', 'method', 'const'],
],

];

$finder = Finder::create()
->in([
__DIR__.'/includes',
__DIR__.'/tests/phpunit',
__DIR__.'/config',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new Config())
->setFinder($finder)
->setRules($rules)
->setRiskyAllowed(true)
->setUsingCache(true);
Loading

0 comments on commit a0d3759

Please sign in to comment.