Skip to content

Commit 4f6fe3c

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 fa1130f commit 4f6fe3c

12 files changed

+1065
-1337
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
@@ -57,8 +57,8 @@ jobs:
5757
node-version: 12.x
5858
- name: install
5959
run: yarn
60-
- name: run prettylint
61-
run: yarn prettylint
60+
- name: run prettier
61+
run: yarn prettier:check
6262
- name: run typecheck
6363
run: yarn typecheck
6464
- 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

+16-20
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"lint": "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts",
2626
"prepare": "yarn build && yarn postbuild",
2727
"prepublishOnly": "yarn build",
28-
"prettylint": "prettylint docs/**/*.md README.md package.json",
28+
"prettier:check": "prettier --check docs/**/*.md README.md package.json renovate.json",
29+
"prettier:write": "prettier --write docs/**/*.md README.md package.json renovate.json",
2930
"pretest": "yarn build",
3031
"test": "jest",
3132
"tools:generate-rules-table": "ts-node -T tools/generate-rules-table",
@@ -43,16 +44,12 @@
4344
]
4445
},
4546
"lint-staged": {
46-
"*.{js,ts}": [
47-
"eslint --fix",
48-
"git add"
49-
],
50-
"*.{md,json}": [
51-
"prettier --write",
52-
"git add"
53-
]
47+
"*.{js,ts}": "eslint --fix",
48+
"*.{md,json}": "prettier --write"
5449
},
5550
"prettier": {
51+
"arrowParens": "avoid",
52+
"endOfLine": "auto",
5653
"proseWrap": "always",
5754
"singleQuote": true,
5855
"trailingComma": "all"
@@ -97,31 +94,30 @@
9794
"@commitlint/cli": "^8.2.0",
9895
"@commitlint/config-conventional": "^8.2.0",
9996
"@schemastore/package": "^0.0.5",
100-
"@semantic-release/changelog": "^3.0.5",
101-
"@semantic-release/git": "^7.0.17",
97+
"@semantic-release/changelog": "^5.0.1",
98+
"@semantic-release/git": "^9.0.0",
10299
"@types/eslint": "^6.1.3",
103100
"@types/jest": "^25.1.0",
104-
"@types/node": "^12.6.6",
101+
"@types/node": "^13.13.5",
105102
"@typescript-eslint/eslint-plugin": "^2.5.0",
106103
"@typescript-eslint/parser": "^2.5.0",
107-
"babel-jest": "^25.2.0",
104+
"babel-jest": "^26.0.1",
108105
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
109-
"eslint": "^5.1.0 || ^6.0.0",
106+
"eslint": "^5.1.0 || ^6.0.0 || ^7.0.0",
110107
"eslint-config-prettier": "^6.5.0",
111108
"eslint-plugin-eslint-comments": "^3.1.2",
112109
"eslint-plugin-eslint-plugin": "^2.0.0",
113110
"eslint-plugin-import": "^2.20.2",
114111
"eslint-plugin-node": "^11.0.0",
115112
"eslint-plugin-prettier": "^3.0.0",
116-
"husky": "^3.0.9",
117-
"jest": "^25.2.0",
113+
"husky": "^4.2.5",
114+
"jest": "^26.0.1",
118115
"jest-runner-eslint": "^0.8.0",
119-
"lint-staged": "^9.4.2",
120-
"prettier": "^1.19.1",
121-
"prettylint": "^1.0.0",
116+
"lint-staged": "^10.2.2",
117+
"prettier": "^2.0.5",
122118
"resolve-from": "^5.0.0",
123119
"rimraf": "^3.0.0",
124-
"semantic-release": "^15.13.28",
120+
"semantic-release": "^17.0.7",
125121
"ts-node": "^8.10.1",
126122
"typescript": "^3.5.3"
127123
},

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)