Skip to content

Commit

Permalink
Standarized Directories
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1193 committed Dec 9, 2017
1 parent 76ef1ce commit 2fc3c98
Show file tree
Hide file tree
Showing 41 changed files with 12,120 additions and 4,579 deletions.
5 changes: 3 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"sourceMaps": "both",
"presets": [
"es2015",
"stage-0"
"env",
"flow",
"es2017"
]
}
200 changes: 52 additions & 148 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,153 +1,57 @@
{
env: {
es6: true
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": false,
"codeFrame": false
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
generators: false,
objectLiteralDuplicateProperties: false
}
"extends": "airbnb-base",
"plugins": [
"flowtype"
],
"rules": {
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/define-flow-type": 1,
"flowtype/generic-spacing": [
2,
"never"
],
"flowtype/no-primitive-constructor-types": 2,
"flowtype/no-weak-types": 2,
"flowtype/object-type-delimiter": [
2,
"comma"
],
"flowtype/require-valid-file-annotation": 2,
"flowtype/semi": [
2,
"always"
],
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-generic-bracket": [
2,
"never"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"flowtype/union-intersection-spacing": [
2,
"always"
],
"flowtype/use-flow-type": 1,
"flowtype/valid-syntax": 1
},

rules: {
# enforces no braces where they can be omitted
# http://eslint.org/docs/rules/arrow-body-style
'arrow-body-style': ['error', 'as-needed', {
requireReturnForObjectLiteral: true,
}],

# require parens in arrow function arguments
# http://eslint.org/docs/rules/arrow-parens
'arrow-parens': ['error', 'as-needed', {
requireForBlockBody: true,
}],

# require space before/after arrow function's arrow
# http://eslint.org/docs/rules/arrow-spacing
'arrow-spacing': ['error', { before: true, after: true }],

# verify super() callings in constructors
'constructor-super': 'error',

# enforce the spacing around the * in generator functions
# http://eslint.org/docs/rules/generator-star-spacing
'generator-star-spacing': ['error', { before: false, after: true }],

# disallow modifying variables of class declarations
# http://eslint.org/docs/rules/no-class-assign
'no-class-assign': 'error',

# disallow arrow functions where they could be confused with comparisons
# http://eslint.org/docs/rules/no-confusing-arrow
'no-confusing-arrow': ['error', {
allowParens: true,
}],

# disallow modifying variables that are declared using const
'no-const-assign': 'error',

# disallow duplicate class members
# http://eslint.org/docs/rules/no-dupe-class-members
'no-dupe-class-members': 'error',

# disallow importing from the same path more than once
# http://eslint.org/docs/rules/no-duplicate-imports
'no-duplicate-imports': 'error',

# disallow symbol constructor
# http://eslint.org/docs/rules/no-new-symbol
'no-new-symbol': 'error',

# disallow specific imports
# http://eslint.org/docs/rules/no-restricted-imports
'no-restricted-imports': 'off',

# disallow to use this/super before super() calling in constructors.
# http://eslint.org/docs/rules/no-this-before-super
'no-this-before-super': 'error',

# disallow useless computed property keys
# http://eslint.org/docs/rules/no-useless-computed-key
'no-useless-computed-key': 'error',

# disallow unnecessary constructor
# http://eslint.org/docs/rules/no-useless-constructor
'no-useless-constructor': 'error',

# disallow renaming import, export, and destructured assignments to the same name
# http://eslint.org/docs/rules/no-useless-rename
'no-useless-rename': ['error', {
ignoreDestructuring: false,
ignoreImport: false,
ignoreExport: false,
}],

# require let or const instead of var
'no-var': 'error',

# require method and property shorthand syntax for object literals
# http://eslint.org/docs/rules/object-shorthand
'object-shorthand': ['error', 'always', {
ignoreConstructors: false,
avoidQuotes: true,
}],

# suggest using arrow functions as callbacks
'prefer-arrow-callback': ['error', {
allowNamedFunctions: false,
allowUnboundThis: true,
}],

# suggest using of const declaration for variables that are never modified after declared
'prefer-const': ['error', {
destructuring: 'any',
ignoreReadBeforeAssign: true,
}],

# disallow parseInt() in favor of binary, octal, and hexadecimal literals
# http://eslint.org/docs/rules/prefer-numeric-literals
'prefer-numeric-literals': 'error',

# use rest parameters instead of arguments
# http://eslint.org/docs/rules/prefer-rest-params
'prefer-rest-params': 'error',

# suggest using the spread operator instead of .apply()
# http://eslint.org/docs/rules/prefer-spread
'prefer-spread': 'error',

# suggest using template literals instead of string concatenation
# http://eslint.org/docs/rules/prefer-template
'prefer-template': 'error',

# disallow generator functions that do not have yield
# http://eslint.org/docs/rules/require-yield
'require-yield': 'error',

# enforce spacing between object rest-spread
# http://eslint.org/docs/rules/rest-spread-spacing
'rest-spread-spacing': ['error', 'never'],

# import sorting
# http://eslint.org/docs/rules/sort-imports
'sort-imports': ['off', {
ignoreCase: false,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
}],

# require a Symbol description
# http://eslint.org/docs/rules/symbol-description
'symbol-description': 'error',

# enforce usage of spacing in template strings
# http://eslint.org/docs/rules/template-curly-spacing
'template-curly-spacing': 'error',

# enforce spacing around the * in yield* expressions
# http://eslint.org/docs/rules/yield-star-spacing
'yield-star-spacing': ['error', 'after']
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules/
.tmp/
build
backup
.bkp
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.1.4
8.6.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: required
dist: xenial
language: node_js
node_js:
- "8.1.4"
- "8.6.0"
matrix:
fast_finish: true
before_install:
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions bin/node-vultr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env node

require('../lib/lib');
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const configuration = {
testRegex: 'src/.*\\.spec\\.js$',
collectCoverage: true
}

module.exports = configuration;
118 changes: 0 additions & 118 deletions karma.conf.js

This file was deleted.

File renamed without changes.
18 changes: 18 additions & 0 deletions lib/lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/lib.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading

0 comments on commit 2fc3c98

Please sign in to comment.