Skip to content

Commit 85175d0

Browse files
chore(deps): update eslint and prettier packages (major) (#178)
* chore(deps): update eslint and prettier packages * chore: update eslint to v9 with flat config --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: William Killerud <[email protected]>
1 parent 01fed64 commit 85175d0

File tree

8 files changed

+41
-35
lines changed

8 files changed

+41
-35
lines changed

.eslintrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"tabWidth": 4,
55
"overrides": [
66
{
7-
"files": [".prettierrc", "*.json", "*.yml", ".travis.yml", ".eslintrc"],
7+
"files": [".prettierrc", "*.json", "*.yml", ".travis.yml"],
88
"options": {
99
"tabWidth": 2
1010
}

eslint.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import prettierConfig from 'eslint-config-prettier';
2+
import prettierPlugin from 'eslint-plugin-prettier';
3+
import globals from 'globals';
4+
import js from '@eslint/js';
5+
6+
export default [
7+
js.configs.recommended,
8+
prettierConfig,
9+
{
10+
plugins: {
11+
prettier: prettierPlugin,
12+
},
13+
languageOptions: {
14+
globals: {
15+
...globals.browser,
16+
global: true,
17+
},
18+
},
19+
},
20+
];

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,11 @@
4545
"@rollup/plugin-babel": "6.0.4",
4646
"@rollup/plugin-commonjs": "25.0.7",
4747
"@rollup/plugin-node-resolve": "15.2.3",
48-
"eslint": "7.32.0",
49-
"eslint-config-airbnb-base": "14.2.1",
50-
"eslint-config-prettier": "8.10.0",
51-
"eslint-plugin-import": "2.29.1",
52-
"eslint-plugin-prettier": "4.2.1",
53-
"prettier": "2.8.8",
48+
"eslint": "9.0.0",
49+
"eslint-config-prettier": "9.1.0",
50+
"eslint-plugin-prettier": "5.1.3",
51+
"globals": "15.0.0",
52+
"prettier": "3.2.5",
5453
"rollup": "4.14.3",
5554
"tap": "18.7.2"
5655
}

test/Event.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import tap from 'tap';
22
import Event from '../src/Event.js';
33
import { toKey } from '../src/utils.js';
44

5-
tap.test('toKey() - should return key format', t => {
5+
tap.test('toKey() - should return key format', (t) => {
66
const channel = 'foo';
77
const topic = 'bar';
88
const event = new Event(channel, topic, 'payload');

test/MessageBus.test.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,36 @@ let bus;
55

66
tap.beforeEach(() => {
77
// Need to clear the global between tests for a clean slate
8-
// eslint-disable-next-line no-undef
98
globalThis['@podium'] = null;
109
bus = new MessageBus();
1110
});
1211

13-
tap.test('subscribe() - should be a function', t => {
12+
tap.test('subscribe() - should be a function', (t) => {
1413
t.ok(typeof bus.subscribe === 'function');
1514
t.end();
1615
});
1716

18-
tap.test('publish() - should be a function', t => {
17+
tap.test('publish() - should be a function', (t) => {
1918
t.ok(typeof bus.publish === 'function');
2019
t.end();
2120
});
2221

23-
tap.test('publish() - should invoke subscribed listener', t => {
22+
tap.test('publish() - should invoke subscribed listener', (t) => {
2423
const payload = { a: 'b' };
25-
bus.subscribe('foo', 'bar', event => {
24+
bus.subscribe('foo', 'bar', (event) => {
2625
t.equal(event.payload, payload);
2726
t.end();
2827
});
2928
bus.publish('foo', 'bar', payload);
3029
});
3130

32-
tap.test('unsubscribe() - should remove subscribed listener', t => {
31+
tap.test('unsubscribe() - should remove subscribed listener', (t) => {
3332
const channel = 'channel';
3433
const topic = 'topic';
3534

3635
let cbCount = 0;
3736

38-
const callback = event => {
37+
const callback = (event) => {
3938
t.equal(event.channel, channel);
4039
t.equal(event.topic, topic);
4140
cbCount += 1;
@@ -61,12 +60,12 @@ tap.test('unsubscribe() - should remove subscribed listener', t => {
6160
t.end();
6261
});
6362

64-
tap.test('peek() - should initially be undefined', t => {
63+
tap.test('peek() - should initially be undefined', (t) => {
6564
t.ok(bus.peek('channel', 'topic') === undefined);
6665
t.end();
6766
});
6867

69-
tap.test('peek() - should return latest event', t => {
68+
tap.test('peek() - should return latest event', (t) => {
7069
const channel = 'channel';
7170
const topic = 'topic';
7271

@@ -78,12 +77,12 @@ tap.test('peek() - should return latest event', t => {
7877
t.end();
7978
});
8079

81-
tap.test('log() - should initially be empty', t => {
80+
tap.test('log() - should initially be empty', (t) => {
8281
t.same(bus.log('channel', 'topic'), []);
8382
t.end();
8483
});
8584

86-
tap.test('log() - should retrieve earlier events, newest first', t => {
85+
tap.test('log() - should retrieve earlier events, newest first', (t) => {
8786
const channel = 'channel';
8887
const topic = 'topic';
8988

test/Sink.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ tap.beforeEach(() => {
77
sink = new Sink();
88
});
99

10-
tap.test('log() - should be a function', t => {
10+
tap.test('log() - should be a function', (t) => {
1111
t.ok(typeof sink.log === 'function');
1212
t.end();
1313
});
1414

15-
tap.test('log() - should initially return an empty array', t => {
15+
tap.test('log() - should initially return an empty array', (t) => {
1616
t.same(sink.log('foo', 'bar'), []);
1717
t.end();
1818
});
1919

20-
tap.test('push() - should be a function', t => {
20+
tap.test('push() - should be a function', (t) => {
2121
t.ok(typeof sink.push === 'function');
2222
t.end();
2323
});

test/utils.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import tap from 'tap';
22
import { toKey } from '../src/utils.js';
33

4-
tap.test('toKey() - should return key format', t => {
4+
tap.test('toKey() - should return key format', (t) => {
55
const channel = 'foo';
66
const topic = 'bar';
77
t.ok(toKey(channel, topic) === `${channel}:${topic}`);

0 commit comments

Comments
 (0)