eslint es6

main
Steffen Rademacker 9 years ago
parent 9dc50f6fad
commit 2a1fae8895

@ -1,44 +1,57 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"ecmaFeatures": {
"modules": true
},
"rules": {
"no-console": 0,
"no-reserved-keys": 2,
"block-scoped-var": 2,
"default-case": 1,
"dot-location": [ 2, "object" ],
"no-div-regex": 2,
"no-else-return": 1,
"no-floating-decimal": 2,
"no-process-env": 1,
"no-self-compare": 2,
"no-void": 2,
"vars-on-top": 2,
"wrap-iife": [ 2, "inside" ],
"indent": [ 2, 2 ],
"array-bracket-spacing": [ 2, "always" ],
"brace-style": [ 2, "1tbs", { "allowSingleLine": false } ],
"comma-style": [ 2, "last" ],
"computed-property-spacing": [ 2, "always" ],
"consistent-this": [ 1, "that" ],
"func-style": [ 2, "expression" ],
"indent": [ 2, 2 ],
"linebreak-style": [ 2, "unix" ],
"max-nested-callbacks": [ 1, 4 ],
"no-nested-ternary": 2,
"newline-after-var": [ 1, "always" ],
"no-lonely-if": 1,
"no-multiple-empty-lines": [ 1, { "max": 2 } ],
"no-nested-ternary": 2,
"object-curly-spacing": [ 2, "always" ],
"one-var": [ 2, "never" ],
"operator-assignment": [ 2, "always" ],
"operator-linebreak": [ 2, "after" ],
"quotes": [ 2, "single", "avoid-escape" ],
"space-after-function-name": [ 2, "never" ],
"space-after-keywords": [ 2, "always", { "checkFunctionKeyword": true } ],
"space-after-keywords": [ 2, "always" ],
"space-before-blocks": [ 2, "always" ],
"space-in-brackets": [ 2, "always" ],
"space-before-function-paren": [ 2, "always" ],
"space-in-parens": [ 2, "never" ],
"spaced-line-comment": [ 2, "always" ],
"spaced-comment": [ 2, "always" ],
"wrap-regex": 2,
"generator-star-spacing": [ 1, "both" ],
"object-shorthand": [ 1, "always" ],
"prefer-const": [ 1 ],
"max-depth": [ 1, 4 ],
"max-len": [ 1, 120 ],
"no-bitwise": 2,

@ -17,7 +17,6 @@ npm install -g gulp
npm install -g jsonlint
npm install -g htmlhint
npm install -g npm-check-updates
npm install -g pageres
npm install -g pure-prompt
npm install -g recursive-blame
npm install -g stylestats

@ -17,21 +17,12 @@ function tmd() {
tmux send-keys -t gitngulp 'gulp' Enter
}
# generate screenshots from url
function screenshot() {
cd ~/Downloads/
pageres $1 320x500 --filename '<%= url %>-mobile' --crop --delay 3
pageres $1 1000x750 --filename '<%= url %>-tablet' --crop --delay 3
pageres $1 1400x1000 --filename '<%= url %>-desktop' --crop --delay 3
}
# convert a video to mp4 + webm in one go for web
function videoconvert() {
ffmpeg -i $1 -acodec libvorbis -aq 7 -ac 2 -vcodec libvpx -b:v 2M -qmax 16 -threads 4 $1.webm
ffmpeg -i $1 -acodec libfdk_aac -cutoff 18000 -vcodec libx264 -b:v 2M -qmax 16 -threads 4 $1.mp4
}
# a small function for finding stuff
function fname() {
find . -iname "*$@*";
@ -55,13 +46,11 @@ function gch () {
vim `git status | grep modified | awk '{print $3}'`
}
# creates an archive from given directory
mktar() { tar cvf "${1%%/}.tar" "${1%%/}"; }
mktgz() { tar cvzf "${1%%/}.tgz" "${1%%/}"; }
mkzip() { zip -r "${1%%/}" "${1%%/}"; }
# easy extract
extract () {
if [ -f $1 ] ; then

Loading…
Cancel
Save