Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev dependencies to latest and require node 14+ #43

Merged
merged 1 commit into from
Jun 3, 2021
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
76 changes: 39 additions & 37 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,122 +1,124 @@
'use strict';

module.exports = {
"env": {
"es6": true,
"node": true,
'env': {
'es6': true,
'node': true,
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script",
'extends': 'eslint:recommended',
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'script',
},
"globals": {
"it": true,
"describe": true,
"beforeEach": true,
"afterEach": true,
'globals': {
'it': true,
'describe': true,
'beforeEach': true,
'afterEach': true,
},
"rules": {
'rules': {
// tabs over spaces
"indent": [
"error",
"tab",
'indent': [
'error',
'tab',
{
"SwitchCase": 1,
'SwitchCase': 1,
},
],
// \n instead of \r\n
"linebreak-style": ["error", "unix"],
'linebreak-style': ['error', 'unix'],
// semicolons must be used any place where they are valid.
"semi": ["error", "always" ],
'semi': ['error', 'always' ],
/**
* Opening brace of a block is placed on the same line as its corresponding
* statement or declaration but allow the opening and closing braces for
* a block to be on the same line (allowSingleLine).
*/
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
'brace-style': ['error', '1tbs', { 'allowSingleLine': true }],
/**
* The no-mixed-spaces-and-tabs rule is aimed at flagging any lines of code
* that are indented with a mixture of tabs and spaces. This option suppresses
* warnings about mixed tabs and spaces when the latter are used for alignment
* only.
*/
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],

// We want single quotes but allow backticks
"quotes": ["error", "single", {
"avoidEscape": true,
"allowTemplateLiterals": true,
'quotes': ['error', 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true,
}],

/**
* Disallow unnecessary concatenation of strings. e.g, 'a' + 'b' should just
* be 'ab'
*/
"no-useless-concat": ["error"],
'no-useless-concat': ['error'],

/**
* As we use ES6 we prefer you use template strings for templates instead
* of concatenation.
*/
"prefer-template": ["error"],
'prefer-template': ['error'],

/**
* Typing mistakes and misunderstandings about where semicolons are required
* can lead to semicolons that are unnecessary. While not technically an
* error, extra semicolons can cause confusion when reading code.
*/
"no-extra-semi": ["error"],
'no-extra-semi': ['error'],

/**
* This usually occurs when a variable was used before, but no longer necessary.
* While not technically an error, these are areas for cleaning up
* to make the code clean.
*/
"no-unused-vars": ["error"],
'no-unused-vars': ['error'],


/**
* A strict mode directive at the beginning of a script or function body
* enables strict mode semantics. Safe = require "use strict" in function
* enables strict mode semantics. Safe = require 'use strict' in function
* scopes only.
*/
"strict": ["error", "global"],
'strict': ['error', 'global'],

/**
* In JavaScript that is designed to be executed in the browser, it’s considered
* a best practice to avoid using methods on console. Such messages are
* considered to be for debugging purposes and therefore not suitable to
* ship to the client. In general, calls using console should be stripped
* before being pushed to production. "allow" has an array of strings
* before being pushed to production. 'allow' has an array of strings
* which are allowed methods of the console object
*/
"no-console": ["error", { "allow": ["warn", "error", "log"] }],
'no-console': ['error', { 'allow': ['warn', 'error', 'log'] }],

/**
* Sparse arrays contain empty slots, most frequently due to multiple commas
* being used in an array literal
*/
"no-sparse-arrays": ["error"],
'no-sparse-arrays': ['error'],

/**
* The with statement is potentially problematic because it adds members
* of an object to the current scope, making it impossible to tell what
* a variable inside the block actually refers to.
*/
"no-with": ["error"],
'no-with': ['error'],

/**
* Shadowing is the process by which a local variable shares the same name
* as a variable in its containing scope. It creates confusion.
*/
"no-shadow": ["error"],
'no-shadow': ['error'],

// enforce space between key words, such as if and else.
"keyword-spacing": ["error"],
'keyword-spacing': ['error'],

/**
* Multiple properties with the same key in object literals can cause
* unexpected behavior in your application.
*/
"no-dupe-keys": ["error"],
'no-dupe-keys': ['error'],
}
};
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
language: node_js
node_js:
- "6"
- "8"
- "14"
after_success:
- "yarn run coveralls"
2 changes: 0 additions & 2 deletions lib/bitbucket/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ class BitbucketBackend {
backend._nextIntQueue();
}
}
} catch (e) {
throw e;
} finally {
--backend._inProcessing;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/bitbucket/pull-request.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('GIVEN a pull request', () => {
password: 'my-password',
});

sinon.spy(request, 'post');
sinon.replace(request, 'post', sinon.fake.returns());

pullRequest = new BitbucketRepository({
repoSlug: 'my-repo',
Expand All @@ -28,7 +28,7 @@ describe('GIVEN a pull request', () => {
});

afterEach(() => {
request.post.restore();
sinon.restore();
});

describe('WHEN calling addComment with unchanged', () => {
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"precommit": "lint-staged"
},
"engines": {
"node": ">=6.0.0"
"node": ">=14.0.0"
},
"nyc": {
"exclude": [
Expand All @@ -32,21 +32,21 @@
"android-lint"
],
"devDependencies": {
"chai": "3.5.0",
"coveralls": "2.11.16",
"eslint": "4.18.2",
"husky": "0.14.3",
"chai": "4.3.4",
"coveralls": "3.1.0",
"eslint": "7.27.0",
"husky": "6.0.0",
"istanbul": "0.4.5",
"lint-staged": "4.3.0",
"mocha": "3.2.0",
"lint-staged": "11.0.0",
"mocha": "8.4.0",
"mocha-lcov-reporter": "1.3.0",
"mock-fs": "4.14.0",
"nock": "9.0.6",
"nyc": "10.1.2",
"prettier": "1.7.4",
"prettier-eslint": "8.2.1",
"prettier-eslint-cli": "4.4.0",
"sinon": "2.0.0"
"mock-fs": "5.0.0",
"nock": "13.1.0",
"nyc": "15.1.0",
"prettier": "2.3.0",
"prettier-eslint": "12.0.0",
"prettier-eslint-cli": "5.0.1",
"sinon": "11.1.1"
},
"dependencies": {
"chalk": "2.3.0",
Expand Down
Loading