Skip to content

Commit 7a1f66c

Browse files
SimenBG-Rath
authored andcommitted
chore: update outdated dev dependencies (#577)
Closes #562 Closes #529 Closes #567 Closes #526 Closes #547 Closes #554 Closes #528
1 parent f139fd7 commit 7a1f66c

11 files changed

+1081
-1406
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
@@ -58,8 +58,8 @@ jobs:
5858
node-version: 12.x
5959
- name: install
6060
run: yarn
61-
- name: run prettylint
62-
run: yarn prettylint
61+
- name: run prettier
62+
run: yarn prettier:check
6363
- name: run typecheck
6464
run: yarn typecheck
6565
- 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
@@ -100,12 +100,9 @@ const express = require('express');
100100

101101
const app = express();
102102

103-
describe('GET /user', function() {
104-
it('responds with json', function(done) {
105-
request(app)
106-
.get('/user')
107-
.expect('Content-Type', /json/)
108-
.expect(200, done);
103+
describe('GET /user', function () {
104+
it('responds with json', function (done) {
105+
request(app).get('/user').expect('Content-Type', /json/).expect(200, done);
109106
});
110107
});
111108
```

docs/rules/no-export.md

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

18-
module.exports = function() {};
18+
module.exports = function () {};
1919

2020
module.exports = {
2121
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

+16-22
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"postbuild": "rimraf lib/__tests__ lib/**/__tests__",
2525
"lint": "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts",
2626
"prepack": "yarn build",
27-
"prettylint": "prettylint docs/**/*.md README.md package.json",
27+
"prettier:check": "prettier --check docs/**/*.md README.md package.json renovate.json",
28+
"prettier:write": "prettier --write docs/**/*.md README.md package.json renovate.json",
2829
"test": "jest",
2930
"tools:regenerate-docs": "ts-node -T tools/regenerate-docs",
3031
"typecheck": "tsc -p ."
@@ -41,14 +42,8 @@
4142
]
4243
},
4344
"lint-staged": {
44-
"*.{js,ts}": [
45-
"eslint --fix",
46-
"git add"
47-
],
48-
"*.{md,json}": [
49-
"prettier --write",
50-
"git add"
51-
]
45+
"*.{js,ts}": "eslint --fix",
46+
"*.{md,json}": "prettier --write"
5247
},
5348
"prettier": {
5449
"arrowParens": "avoid",
@@ -97,34 +92,33 @@
9792
"@commitlint/cli": "^8.2.0",
9893
"@commitlint/config-conventional": "^8.2.0",
9994
"@schemastore/package": "^0.0.6",
100-
"@semantic-release/changelog": "^3.0.5",
101-
"@semantic-release/git": "^7.0.17",
95+
"@semantic-release/changelog": "^5.0.1",
96+
"@semantic-release/git": "^9.0.0",
10297
"@types/dedent": "^0.7.0",
103-
"@types/jest": "^25.1.0",
104-
"@types/node": "^12.6.6",
105-
"@types/prettier": "^1.19.0",
98+
"@types/jest": "^26.0.0",
99+
"@types/node": "^14.0.0",
100+
"@types/prettier": "^2.0.0",
106101
"@typescript-eslint/eslint-plugin": "^2.5.0",
107102
"@typescript-eslint/parser": "^2.5.0",
108-
"babel-jest": "^25.2.0",
103+
"babel-jest": "^26.0.1",
109104
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
110105
"dedent": "^0.7.0",
111-
"eslint": "^5.1.0 || ^6.0.0",
106+
"eslint": "^5.1.0 || ^6.0.0 || ^7.0.0",
112107
"eslint-config-prettier": "^6.5.0",
113108
"eslint-plugin-eslint-comments": "^3.1.2",
114109
"eslint-plugin-eslint-config": "^1.0.2",
115110
"eslint-plugin-eslint-plugin": "^2.0.0",
116111
"eslint-plugin-import": "^2.20.2",
117112
"eslint-plugin-node": "^11.0.0",
118113
"eslint-plugin-prettier": "^3.0.0",
119-
"husky": "^3.0.9",
120-
"jest": "^25.2.0",
114+
"husky": "^4.2.5",
115+
"jest": "^26.0.1",
121116
"jest-runner-eslint": "^0.10.0",
122-
"lint-staged": "^9.4.2",
123-
"prettier": "^1.19.1",
124-
"prettylint": "^1.0.0",
117+
"lint-staged": "^10.2.2",
118+
"prettier": "^2.0.5",
125119
"resolve-from": "^5.0.0",
126120
"rimraf": "^3.0.0",
127-
"semantic-release": "^15.13.28",
121+
"semantic-release": "^17.0.7",
128122
"ts-node": "^8.10.1",
129123
"typescript": "^3.5.3"
130124
},

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

4442
return fixer.replaceText(node.callee, `${testName}.todo`);
4543
}

0 commit comments

Comments
 (0)