Skip to content

Commit

Permalink
chore: update outdated dev dependencies (#577)
Browse files Browse the repository at this point in the history
Closes #562
Closes #529
Closes #567
Closes #526
Closes #547
Closes #554
Closes #528
Closes #602
Closes #609
Closes #647
  • Loading branch information
SimenB committed Sep 4, 2020
1 parent 1755965 commit 0f58aaf
Show file tree
Hide file tree
Showing 11 changed files with 1,634 additions and 1,794 deletions.
8 changes: 4 additions & 4 deletions docs/rules/consistent-test-it.md
Expand Up @@ -59,12 +59,12 @@ test.only('foo'); // invalid
/*eslint jest/consistent-test-it: ["error", {"fn": "it", "withinDescribe": "test"}]*/

it('foo'); // valid
describe('foo', function() {
describe('foo', function () {
test('bar'); // valid
});

test('foo'); // invalid
describe('foo', function() {
describe('foo', function () {
it('bar'); // invalid
});
```
Expand All @@ -78,12 +78,12 @@ nested within `describe` to use `it`.
/*eslint jest/consistent-test-it: ["error"]*/

test('foo'); // valid
describe('foo', function() {
describe('foo', function () {
it('bar'); // valid
});

it('foo'); // invalid
describe('foo', function() {
describe('foo', function () {
test('bar'); // invalid
});
```
17 changes: 5 additions & 12 deletions docs/rules/expect-expect.md
Expand Up @@ -56,9 +56,7 @@ import { expectSaga } from 'redux-saga-test-plan';
import { addSaga } from '../src/sagas';

test('returns sum', () => {
expectSaga(addSaga, 1, 1)
.returns(2)
.run();
expectSaga(addSaga, 1, 1).returns(2).run();
});
```

Expand All @@ -72,9 +70,7 @@ import { expectSaga } from 'redux-saga-test-plan';
import { addSaga } from '../src/sagas';

test('returns sum', () => {
expectSaga(addSaga, 1, 1)
.returns(2)
.run();
expectSaga(addSaga, 1, 1).returns(2).run();
});
```

Expand All @@ -100,12 +96,9 @@ const express = require('express');

const app = express();

describe('GET /user', function() {
it('responds with json', function(done) {
request(app)
.get('/user')
.expect('Content-Type', /json/)
.expect(200, done);
describe('GET /user', function () {
it('responds with json', function (done) {
request(app).get('/user').expect('Content-Type', /json/).expect(200, done);
});
});
```
2 changes: 1 addition & 1 deletion docs/rules/no-export.md
Expand Up @@ -15,7 +15,7 @@ Examples of **incorrect** code for this rule:
```js
export function myHelper() {}

module.exports = function() {};
module.exports = function () {};

module.exports = {
something: 'that should be moved to a non-test file',
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-test-callback.md
Expand Up @@ -55,7 +55,7 @@ test('myFunction()', done => {
// ...
});

test('myFunction()', function(done) {
test('myFunction()', function (done) {
// ...
});
```
Expand Down
6 changes: 3 additions & 3 deletions docs/rules/no-test-return-statement.md
Expand Up @@ -15,7 +15,7 @@ body.

// valid:

it('noop', function() {});
it('noop', function () {});

test('noop', () => {});

Expand All @@ -27,7 +27,7 @@ test('one', () => {
expect(1).toBe(1);
});

it('one', function() {
it('one', function () {
expect(1).toBe(1);
});

Expand All @@ -41,7 +41,7 @@ test('return an expect', () => {
return expect(1).toBe(1);
});

it('returning a promise', function() {
it('returning a promise', function () {
return new Promise(res => setTimeout(res, 100)).then(() => expect(1).toBe(1));
});
```
4 changes: 2 additions & 2 deletions docs/rules/valid-title.md
Expand Up @@ -55,7 +55,7 @@ it(123, () => {});
describe(String(/.+/), () => {});
describe(myFunction, () => {});
xdescribe(myFunction, () => {});
describe(6, function() {});
describe(6, function () {});
```

Examples of **correct** code for this rule:
Expand All @@ -82,7 +82,7 @@ fdescribe('is a string', () => {});
describe(String(/.+/), () => {});
describe(myFunction, () => {});
xdescribe(myFunction, () => {});
describe(6, function() {});
describe(6, function () {});
```

**duplicatePrefix**
Expand Down
40 changes: 17 additions & 23 deletions package.json
Expand Up @@ -42,14 +42,8 @@
]
},
"lint-staged": {
"*.{js,ts}": [
"eslint --fix",
"git add"
],
"*.{md,json}": [
"prettier --write",
"git add"
]
"*.{js,ts}": "eslint --fix",
"*.{md,json}": "prettier --write"
},
"prettier": {
"arrowParens": "avoid",
Expand Down Expand Up @@ -95,37 +89,37 @@
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/preset-typescript": "^7.3.3",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@commitlint/cli": "^9.1.1",
"@commitlint/config-conventional": "^9.1.1",
"@schemastore/package": "^0.0.6",
"@semantic-release/changelog": "^3.0.5",
"@semantic-release/git": "^7.0.17",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/dedent": "^0.7.0",
"@types/jest": "^25.1.0",
"@types/node": "^12.6.6",
"@types/prettier": "^1.19.0",
"@types/jest": "^26.0.0",
"@types/node": "^14.0.0",
"@types/prettier": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"babel-jest": "^25.2.0",
"babel-jest": "^26.0.1",
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"dedent": "^0.7.0",
"eslint": "^5.1.0 || ^6.0.0",
"eslint": "^5.1.0 || ^6.0.0 || ^7.0.0",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-eslint-config": "^1.0.2",
"eslint-plugin-eslint-plugin": "^2.0.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^3.0.9",
"jest": "^25.2.0",
"husky": "^4.2.5",
"jest": "^26.0.1",
"jest-runner-eslint": "^0.10.0",
"lint-staged": "^9.4.2",
"prettier": "^1.19.1",
"lint-staged": "^10.2.2",
"prettier": "^2.0.5",
"resolve-from": "^5.0.0",
"rimraf": "^3.0.0",
"semantic-release": "^15.13.28",
"ts-node": "^8.10.1",
"semantic-release": "^17.0.7",
"ts-node": "^9.0.0",
"typescript": "^3.5.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/__tests__/no-standalone-expect.test.ts
Expand Up @@ -73,7 +73,7 @@ ruleTester.run('no-standalone-expect', rule, {
t('testing', () => expect(true));
});
`,
options: [{ additionalTestBlockFunctions: undefined }],
options: [{ additionalTestBlockFunctions: [] }],
errors: [{ endColumn: 42, column: 30, messageId: 'unexpectedExpect' }],
},
{
Expand Down
4 changes: 1 addition & 3 deletions src/rules/prefer-todo.ts
Expand Up @@ -37,9 +37,7 @@ function createTodoFixer(
node: JestFunctionCallExpression<TestCaseName>,
fixer: TSESLint.RuleFixer,
) {
const testName = getNodeName(node.callee)
.split('.')
.shift();
const testName = getNodeName(node.callee).split('.').shift();

return fixer.replaceText(node.callee, `${testName}.todo`);
}
Expand Down
5 changes: 1 addition & 4 deletions tools/regenerate-docs.ts
Expand Up @@ -118,10 +118,7 @@ const details: RuleDetails[] = Object.keys(config.configs.all.rules)
details.forEach(({ name, description }) => {
const pathToDoc = path.join(pathTo.docs, 'rules', `${name}.md`);

const contents = fs
.readFileSync(pathToDoc)
.toString()
.split('\n');
const contents = fs.readFileSync(pathToDoc).toString().split('\n');

contents[0] = `# ${description} (\`${name}\`)`;

Expand Down

0 comments on commit 0f58aaf

Please sign in to comment.