Add eslint and styleci files

This commit is contained in:
Nabeel Shahzad 2018-09-10 09:25:45 -05:00
parent d04565919b
commit e878168d4c
4 changed files with 69 additions and 3 deletions

7
.eslintignore Normal file
View File

@ -0,0 +1,7 @@
.travis/*
.idea/*
.vscode/*
node_modules/*
public/*
gulpfile.js
webpack.mix.js

25
.eslintrc Normal file
View File

@ -0,0 +1,25 @@
{
"extends": "airbnb",
"env": {
"es6": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 8
},
"rules": {
"camelcase": 0,
"no-param-reassign": [
2,
{
"props": false
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
]
}
}

31
.styleci.yml Normal file
View File

@ -0,0 +1,31 @@
preset: recommended
risky: true
enabled:
- align_double_arrow_minimal
# - align_equals_minimal
# - date_time_immutable
- ereg_to_preg
- function_to_constant
# - mb_str_functions
- modernize_types_casting
# - native_function_invocation
- no_blank_lines_after_return
- no_homoglyph_names
- no_php4_constructor
- no_useless_else
- phpdoc_add_missing_param_annotation
disabled:
- align_double_arrow
- blank_line_before_return
# - hash_to_slash_comment
- phpdoc_summary
- phpdoc_var_without_name
# - unalign_equals
finder:
exclude:
- modules
- node_modules
- storage
- vendor
name: "*.php"
not-name: "*.blade.php"

View File

@ -54,10 +54,13 @@ if [ "$TRAVIS" = "true" ]; then
.sass-cache .sass-cache
.idea .idea
.travis .travis
.dpl
.phpstorm.meta.php
_ide_helper.php
tests tests
_ide_helper.php
.dpl
.eslintignore
.eslintrc
.phpstorm.meta.php
.styleci.yml
env.php env.php
config.php config.php
Makefile Makefile