Skip to content

Commit fdb0a0c

Browse files
authored
chore: update outdated dev dependencies (#577)
Closes #562 Closes #529 Closes #567 Closes #526 Closes #547 Closes #554 Closes #528
1 parent 0c5e314 commit fdb0a0c

12 files changed

+1577
-1780
lines changed

.github/workflows/nodejs.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
run: |
3333
yarn
3434
yarn add --dev eslint@${{matrix.eslint-version }}
35-
- name: run prettylint
36-
run: yarn prettylint
35+
- name: run prettier
36+
run: yarn prettier:check
3737
- name: run typecheck
3838
run: yarn typecheck
3939
- name: run tests
@@ -55,8 +55,8 @@ jobs:
5555
node-version: 12.x
5656
- name: install
5757
run: yarn
58-
- name: run prettylint
59-
run: yarn prettylint
58+
- name: run prettier
59+
run: yarn prettier:check
6060
- name: run typecheck
6161
run: yarn typecheck
6262
- name: run tests

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
node-version: '12.x'
1616
- name: install
1717
run: yarn
18-
- name: run prettylint
19-
run: yarn prettylint
18+
- name: run prettier
19+
run: yarn prettier:check
2020
- name: run typecheck
2121
run: yarn typecheck
2222
- name: run tests

docs/rules/consistent-test-it.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ test.only('foo'); // invalid
5959
/*eslint jest/consistent-test-it: ["error", {"fn": "it", "withinDescribe": "test"}]*/
6060

6161
it('foo'); // valid
62-
describe('foo', function() {
62+
describe('foo', function () {
6363
test('bar'); // valid
6464
});
6565

6666
test('foo'); // invalid
67-
describe('foo', function() {
67+
describe('foo', function () {
6868
it('bar'); // invalid
6969
});
7070
```
@@ -78,12 +78,12 @@ nested within describe to use `it`.
7878
/*eslint jest/consistent-test-it: ["error"]*/
7979

8080
test('foo'); // valid
81-
describe('foo', function() {
81+
describe('foo', function () {
8282
it('bar'); // valid
8383
});
8484

8585
it('foo'); // invalid
86-
describe('foo', function() {
86+
describe('foo', function () {
8787
test('bar'); // invalid
8888
});
8989
```

docs/rules/expect-expect.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,9 @@ const express = require('express');
8989

9090
const app = express();
9191

92-
describe('GET /user', function() {
93-
it('responds with json', function(done) {
94-
request(app)
95-
.get('/user')
96-
.expect('Content-Type', /json/)
97-
.expect(200, done);
92+
describe('GET /user', function () {
93+
it('responds with json', function (done) {
94+
request(app).get('/user').expect('Content-Type', /json/).expect(200, done);
9895
});
9996
});
10097
```

docs/rules/no-export.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Examples of **incorrect** code for this rule:
1616
```js
1717
export function myHelper() {}
1818

19-
module.exports = function() {};
19+
module.exports = function () {};
2020

2121
module.exports = {
2222
something: 'that should be moved to a non-test file',

docs/rules/no-test-callback.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test('myFunction()', done => {
5555
// ...
5656
});
5757

58-
test('myFunction()', function(done) {
58+
test('myFunction()', function (done) {
5959
// ...
6060
});
6161
```

docs/rules/no-test-return-statement.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ body.
1515

1616
// valid:
1717

18-
it('noop', function() {});
18+
it('noop', function () {});
1919

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

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

30-
it('one', function() {
30+
it('one', function () {
3131
expect(1).toBe(1);
3232
});
3333

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

44-
it('returning a promise', function() {
44+
it('returning a promise', function () {
4545
return new Promise(res => setTimeout(res, 100)).then(() => expect(1).toBe(1));
4646
});
4747
```

docs/rules/valid-title.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ it(123, () => {});
5555
describe(String(/.+/), () => {});
5656
describe(myFunction, () => {});
5757
xdescribe(myFunction, () => {});
58-
describe(6, function() {});
58+
describe(6, function () {});
5959
```
6060

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

8888
**duplicatePrefix**

package.json

+17-21
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"scripts": {
2929
"prepare": "yarn build && yarn postbuild",
3030
"lint": "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts",
31-
"prettylint": "prettylint docs/**/*.md README.md package.json",
31+
"prettier:check": "prettier --check docs/**/*.md README.md package.json renovate.json",
32+
"prettier:write": "prettier --write docs/**/*.md README.md package.json renovate.json",
3233
"prepublishOnly": "yarn build",
3334
"pretest": "yarn build",
3435
"test": "jest",
@@ -47,47 +48,42 @@
4748
"@commitlint/cli": "^8.2.0",
4849
"@commitlint/config-conventional": "^8.2.0",
4950
"@schemastore/package": "^0.0.5",
50-
"@semantic-release/changelog": "^3.0.5",
51-
"@semantic-release/git": "^7.0.17",
51+
"@semantic-release/changelog": "^5.0.1",
52+
"@semantic-release/git": "^9.0.0",
5253
"@types/eslint": "^6.1.3",
5354
"@types/jest": "^25.1.0",
54-
"@types/node": "^12.6.6",
55+
"@types/node": "^13.13.5",
5556
"@typescript-eslint/eslint-plugin": "^2.5.0",
5657
"@typescript-eslint/parser": "^2.5.0",
57-
"babel-jest": "^25.2.0",
58+
"babel-jest": "^26.0.1",
5859
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
59-
"eslint": "^5.1.0 || ^6.0.0",
60+
"eslint": "^5.1.0 || ^6.0.0 || ^7.0.0",
6061
"eslint-config-prettier": "^6.5.0",
6162
"eslint-plugin-eslint-comments": "^3.1.2",
6263
"eslint-plugin-eslint-plugin": "^2.0.0",
6364
"eslint-plugin-import": "^2.20.2",
6465
"eslint-plugin-node": "^11.0.0",
6566
"eslint-plugin-prettier": "^3.0.0",
66-
"husky": "^3.0.9",
67-
"jest": "^25.2.0",
68-
"jest-runner-eslint": "^0.7.1",
69-
"lint-staged": "^9.4.2",
70-
"prettier": "^1.19.1",
71-
"prettylint": "^1.0.0",
67+
"husky": "^4.2.5",
68+
"jest": "^26.0.1",
69+
"jest-runner-eslint": "^0.8.0",
70+
"lint-staged": "^10.2.2",
71+
"prettier": "^2.0.5",
7272
"resolve-from": "^5.0.0",
7373
"rimraf": "^3.0.0",
74-
"semantic-release": "^15.13.28",
74+
"semantic-release": "^17.0.7",
7575
"typescript": "^3.5.3"
7676
},
7777
"prettier": {
78+
"arrowParens": "avoid",
79+
"endOfLine": "auto",
7880
"proseWrap": "always",
7981
"singleQuote": true,
8082
"trailingComma": "all"
8183
},
8284
"lint-staged": {
83-
"*.{js,ts}": [
84-
"eslint --fix",
85-
"git add"
86-
],
87-
"*.{md,json}": [
88-
"prettier --write",
89-
"git add"
90-
]
85+
"*.{js,ts}": "eslint --fix",
86+
"*.{md,json}": "prettier --write"
9187
},
9288
"jest": {
9389
"coverageThreshold": {

renovate.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"extends": [
3-
"config:base"
4-
],
2+
"extends": ["config:base"],
53
"lockFileMaintenance": { "enabled": true },
64
"rangeStrategy": "replace",
75
"ignorePresets": ["group:semantic-releaseMonorepo"]

src/rules/prefer-todo.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ function createTodoFixer(
3737
node: JestFunctionCallExpression<TestCaseName>,
3838
fixer: TSESLint.RuleFixer,
3939
) {
40-
const testName = getNodeName(node.callee)
41-
.split('.')
42-
.shift();
40+
const testName = getNodeName(node.callee).split('.').shift();
4341
return fixer.replaceText(node.callee, `${testName}.todo`);
4442
}
4543

0 commit comments

Comments
 (0)