Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Lo and behold!
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrossmann committed Sep 26, 2015
0 parents commit 156214c
Show file tree
Hide file tree
Showing 15 changed files with 1,068 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# editorconfig.org

# This is the project's root directory
root = true

[*]
# Use spaces for indentation
indent_style = space
# Each indent should contain 2 spaces
indent_size = 2
# Use Unix line endings
end_of_line = lf
# The files are utf-8 encoded
charset = utf-8
# No whitespace at the end of line
trim_trailing_whitespace = true
# A file must end with an empty line - this is good for version control systems
insert_final_newline = true
# A line should not have more than this amount of chars (not supported by all plugins)
max_line_length = 100

[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab
245 changes: 245 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
---
env:
node: true
es6: true

globals:
sails: true

rules:
# Recommended rules
comma-dangle: 2
no-cond-assign:
- 2
- except-parens
no-console: 1
no-constant-condition: 2
no-control-regex: 2
no-debugger: 2
# Strict mode takes care of what this rule tries to avoid, but I am including it here anyway...
no-dupe-args: 2
no-dupe-keys: 2
no-duplicate-case: 2
no-empty-character-class: 1
no-empty: 2
no-ex-assign: 2
no-extra-boolean-cast: 2
no-extra-parens: 1
no-extra-semi: 2
no-func-assign: 2
no-inner-declarations: 2
no-invalid-regexp: 1
no-irregular-whitespace: 2
no-negated-in-lhs: 2
no-obj-calls: 2
no-regex-spaces: 1
no-sparse-arrays: 2
no-unreachable: 2
no-useless-concat: 2
use-isnan: 2
valid-jsdoc:
- 1
- requireReturn: true
requireReturnDescription: false
require-jsdoc: 1
valid-typeof: 2
no-unexpected-multiline: 2
constructor-super: 2
no-const-assign: 2

# Best practices rules

# If there is a setter, there must be a getter (but not required vice-versa)
accessor-pairs: 2
callback-return:
- 1
-
- cb
- callback
- next
- done
# If there are more than this number of linear code paths, issue a warning
complexity:
- 1
- 8
consistent-return: 2
default-case: 2
dot-notation: 2
# Dots for object property accessors should be on the same line as the property names
dot-location:
- 2
- property
# Require strict comparison operators everywhere
eqeqeq: 2
global-require: 2
handle-callback-err:
- 2
- "^.*(e|E)rr(or)?"
no-caller: 2
no-delete-var: 2
no-div-regex: 1
no-else-return: 2
no-empty-label: 2
# Eval in Node.js makes no sense...
no-eval: 2
no-implied-eval: 2
no-extend-native: 2
no-extra-bind: 2
no-fallthrough: 2
no-floating-decimal: 2
no-invalid-this: 1
no-iterator: 2
no-labels: 2
no-lone-blocks: 2
no-loop-func: 2
no-multi-str: 2
no-native-reassign: 2
no-new-func: 2
no-new-require: 2
no-new-wrappers: 2
# Do not allow new to be used only for side-effects
# I.e. if you do not store the result of new: new User();
no-new: 2
no-octal-escape: 2
no-octal: 2
no-path-concat: 1
no-process-exit: 1
# Use Object.getPrototypeOf()
no-proto: 2
no-redeclare:
- 2
- builtinGlobals: true
no-return-assign: 2
no-self-compare: 2
no-sequences: 2
no-shadow:
- 2
- builtinGlobals: true
hoist: all
no-shadow-restricted-names: 2
no-sync: 1
# Always throw an instance of Error
no-throw-literal: 2
no-undef: 2
no-undef-init: 2
no-unused-expressions: 2
no-unused-vars: 2
no-use-before-define:
- 2
- nofunc
no-useless-call: 2
no-with: 2
# I know this sucks, be you should really use the radix operator for Number.parseInt()
radix: 1
# Require strict mode in the module level
strict:
- 2
- global
yoda: 2
no-class-assign: 2
no-this-before-super: 2
no-var: 2
prefer-const: 2
require-yield: 2

# Personal coding style preferences
arrow-parens:
- 2
- as-needed
arrow-spacing: 2
curly:
- 1
- multi
no-multi-spaces: 1
no-warning-comments: 1
# Disabled - for me, handling errors in callbacks takes precedence before var statements
# vars-on-top: 1
no-undefined: 1
array-bracket-spacing:
- 1
- always
brace-style: 1
camelcase: 1
comma-spacing: 1
comma-style:
- 2
- first
consistent-this:
- 2
- that
eol-last: 2
func-style:
- 2
- declaration
id-length:
- 1
- min: 2
max: 25
exceptions:
- i
- _
key-spacing: 1
linebreak-style:
- 2
- unix
max-nested-callbacks:
- 1
- 4
new-cap: 1
new-parens: 2
newline-after-var: 1
no-array-constructor: 2
no-dupe-class-members: 2
no-lonely-if: 1
no-mixed-spaces-and-tabs: 2
no-multiple-empty-lines:
- 1
- max: 2
no-nested-ternary: 2
no-new-object: 2
no-spaced-func: 2
no-trailing-spaces: 2
no-underscore-dangle: 1
no-unneeded-ternary: 2
object-curly-spacing:
- 2
- always
object-shorthand:
- 1
- methods
one-var: 1
operator-assignment:
- 1
- always
prefer-template: 1
prefer-arrow-callback: 2
quote-props:
- 2
- as-needed
quotes:
- 2
- single
- avoid-escape
semi:
- 2
- never
space-after-keywords: 2
space-before-keywords: 2
space-before-blocks: 2
space-before-function-paren: 2
space-in-parens: 2
space-infix-ops: 2
space-return-throw-case: 2
spaced-comment: 1
wrap-regex: 1
# Put the asterisk together with the function keyword: function* generator () {}
generator-star-spacing:
- 2
- after
max-len:
- 2
- 100
- 2
max-params:
- 1
- 4
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules
docs

*.log
npm-debug.log

*~
*#
.DS_STORE
.netbeans
nbproject
.idea
.node_history
*.sublime-*

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "targets"]
path = targets
url = https://github.com/Dreamscapes/makefiles.git
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright (c) 2015, Robert Rossmann
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name skipper-better-s3 nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# skipper-better-s3
#
# @author Robert Rossmann <[email protected]>
# @copyright 2015 STRV
# @license http://choosealicense.com/licenses/bsd-3-clause BSD-3-Clause License

# Default - Run it all! (except for coveralls - that should be run only from Travis)
all: install lint docs

include targets/nodejs/base.mk
include targets/nodejs/install.mk
include targets/nodejs/lint.mk
include targets/nodejs/docs.mk

# Project-specific information
lintfiles = lib
Loading

0 comments on commit 156214c

Please sign in to comment.