Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 99 additions & 101 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,102 +1,100 @@
module.exports = {
"env": {
"commonjs": true,
"es6": true,
"node": true
},
"extends": "airbnb-base",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"camelcase": "off",
// "class-methods-use-this": "off",
"comma-dangle": ["error", {
"functions": "ignore",
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
}],
// "consistent-return": "off",
// "dot-notation": "off",
"func-names": "off",
"global-require": "off",
// "guard-for-in": "off",
// "import/newline-after-import": "off",
"import/no-dynamic-require": "off",
// "import/order": "off",
"max-len": [
"warn",
{
"code": 120,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreTrailingComments": false,
"ignoreUrls": true,
"tabWidth": 2
}
],
// "new-cap": "off",
"newline-per-chained-call": "off",
// "no-bitwise": "off",
// "no-buffer-constructor": "off",
// "no-cond-assign": "off",
// "no-confusing-arrow": "off",
"no-console": "off",
// "no-dupe-keys": "off",
// "no-else-return": "off",
// "no-empty": "off",
// "no-empty-function": "off",
// "no-lonely-if": "off",
// "no-loop-func": "off",
// "no-mixed-operators": "off",
// "no-multi-assign": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off",
// "no-restricted-syntax": "off",
// "no-return-assign": "off",
// "no-shadow": "off",
"no-throw-literal": "off",
// "no-unreachable": "off",
"no-unused-vars": ["error", {
"args": "none",
"caughtErrors": "none"
}],
"no-trailing-spaces": ['error',{
"skipBlankLines" : true
}],
"no-use-before-define": "off",
"no-useless-concat": "off",
"no-useless-constructor": "off",
"no-useless-escape": "off",
"no-var": "off",
"no-void": "off",
"object-curly-newline": [
"error",
{
"consistent": true
}
],
"object-shorthand": "off",
"one-var": "off",
"one-var-declaration-per-line": "off",
"operator-assignment": "off",
"prefer-arrow-callback": "off",
"prefer-const": "off",
"prefer-destructuring": "off",
"prefer-template": "off",
"quote-props": "off",
"quotes": "off",
"radix": "off",
"vars-on-top": "off",
"wrap-iife": "off"
}
}
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "airbnb-base",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"arrow-body-style": "off",
"arrow-spacing": "off",
"arrow-parens": "off",
"camelcase": "off",
"class-methods-use-this": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"consistent-return": "off",
"dot-notation": "off",
"function-paren-newline": "off",
"func-names": "off",
"global-require": "off",
"guard-for-in": "off",
"indent": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"import/newline-after-import": "off",
"import/no-dynamic-require": "off",
"import/order": "off",
"max-len": "off",
"new-cap": "off",
"newline-per-chained-call": "off",
"no-unused-expressions": "off",
"no-useless-catch": "off",
"no-underscore-dangle": "off",
"no-bitwise": "off",
"no-buffer-constructor": "off",
"no-cond-assign": "off",
"no-confusing-arrow": "off",
"no-console": "off",
"no-dupe-keys": "off",
"no-else-return": "off",
"no-empty": "off",
"no-empty-function": "off",
"no-lonely-if": "off",
"no-loop-func": "off",
"no-mixed-operators": "off",
"no-multi-assign": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off",
"no-restricted-syntax": "off",
"no-return-assign": "off",
"no-shadow": "off",
"no-throw-literal": "off",
"no-unreachable": "off",
"no-unused-vars": "off",
"no-trailing-spaces": ['error',{
"skipBlankLines" : true
}],
"no-multiple-empty-lines": "off",
"no-use-before-define": "off",
"no-useless-concat": "off",
"no-useless-constructor": "off",
"no-useless-escape": "off",
"no-var": "off",
"no-void": "off",
"object-curly-spacing": "off",
"object-curly-newline": [
"error",
{
"consistent": true
}
],
"object-shorthand": "off",
"one-var": "off",
"one-var-declaration-per-line": "off",
"operator-linebreak": "off",
"operator-assignment": "off",
"prefer-object-spread": "off",
"prefer-arrow-callback": "off",
"prefer-const": "off",
"prefer-destructuring": "off",
"prefer-template": "off",
"quote-props": "off",
"quotes": "off",
"radix": "off",
"semi": "off",
"space-before-function-paren": 'off',
"space-before-blocks": "off",
"space-infix-ops": "off",
"vars-on-top": "off",
"wrap-iife": "off"
}
};
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"babel-runtime": "^6.26.0",
"dotenv": "4.x",
"dtslint": "^0.9.1",
"eslint": "^5.16.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.17.2",
"eslint": "^6.8.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.20.2",
"expect.js": "0.3.x",
"glob": "^7.1.6",
"jsdoc": "^3.5.5",
Expand All @@ -56,7 +56,7 @@
"test": "tools/scripts/test.sh",
"test-with-temp-cloud": "tools/scripts/tests-with-temp-cloud.sh",
"dtslint": "tools/scripts/ditslint.sh",
"lint": "eslint .",
"lint": "tools/scripts/lint.sh",
"compile": "tools/scripts/compile.sh",
"coverage": "tools/scripts/test.es6.sh --coverage",
"test-es6": "tools/scripts/test.es6.sh",
Expand Down
1 change: 1 addition & 0 deletions tools/scripts/compile.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
rimraf ./lib-es5
babel lib --out-dir lib-es5 --verbose
npm run lint
11 changes: 11 additions & 0 deletions tools/scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e;

node_v=$(node --version) ;
if [[ "${node_v%%.*}" == 'v4' || "${node_v%%.*}" == 'v6' ]]
then
echo 'Old node version - Skipping eslint'
else
eslint .
fi

1 change: 0 additions & 1 deletion tools/scripts/test.es6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ else
echo 'Running tests on ES6 Code'
mocha --ui bdd -R spec --recursive test/
fi

3 changes: 2 additions & 1 deletion tools/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
set -e;

node_v=$(node --version) ;

npm run lint
if [[ "${node_v%%.*}" == 'v4' || "${node_v%%.*}" == 'v6' ]]
then
npm run test-es5
else
npm run test-es6
fi
npm run dtslint