Skip to content

Commit

Permalink
chore: use shared lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Sep 27, 2024
1 parent 9311a2d commit b6a018e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 30 deletions.
21 changes: 2 additions & 19 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
import prettierConfig from 'eslint-config-prettier';
import prettierPlugin from 'eslint-plugin-prettier';
import globals from 'globals';
import js from '@eslint/js';
import config from '@podium/eslint-config';

export default [
js.configs.recommended,
prettierConfig,
{
plugins: {
prettier: prettierPlugin,
},
languageOptions: {
globals: {
...globals.browser,
global: true,
},
},
},
];
export default config;
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"build": "rollup -c",
"lint": "eslint . --ignore-pattern '/dist/'",
"lint:fix": "eslint --fix . --ignore-pattern '/dist/'",
"test": "tap --disable-coverage --allow-empty-coverage test/*.js && tsc --project tsconfig.test.json",
"types": "tsc --declaration --emitDeclarationOnly"
"test": "tap --disable-coverage --allow-empty-coverage test/*.js",
"types": "tsc --declaration --emitDeclarationOnly && tsc --project tsconfig.test.json"
},
"dependencies": {
"@podium/bridge": "^1.2.2",
Expand All @@ -45,6 +45,7 @@
"devDependencies": {
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.3",
"@podium/eslint-config": "1.0.0",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-commonjs": "25.0.8",
"@rollup/plugin-node-resolve": "15.2.3",
Expand All @@ -55,9 +56,6 @@
"@semantic-release/npm": "12.0.1",
"@semantic-release/release-notes-generator": "13.0.0",
"eslint": "9.4.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"globals": "15.9.0",
"jsdom": "24.1.1",
"prettier": "3.2.5",
"rollup": "4.22.4",
Expand Down
12 changes: 8 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ import resolve from '@rollup/plugin-node-resolve';

export default {
input: 'src/index.js',
plugins: [resolve(), commonjs(), getBabelOutputPlugin({
presets: ['@babel/preset-env']
})],
plugins: [
resolve(),
commonjs(),
getBabelOutputPlugin({
presets: ['@babel/preset-env'],
}),
],
output: [
{
exports: 'auto',
format: 'cjs',
dir: 'dist/',
preserveModules: true,
}
},
],
};
4 changes: 2 additions & 2 deletions src/MessageBus.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export default class MessageBus {
const bridgeListener = (message) => {
const request =
/** @type {import("@podium/bridge").RpcRequest<T>} */ (
message
);
message
);

const event = new Event(channel, topic, request.params);
this.sink.push(event);
Expand Down
2 changes: 2 additions & 0 deletions test/Bridge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ tap.beforeEach(() => {
bridge.destroy();
}

// @ts-ignore
globalThis.window['@podium'] = {};
// @ts-ignore
globalThis.window['@podium'].bridge = new PodiumBridge();
bus = new MessageBus();
});
Expand Down

0 comments on commit b6a018e

Please sign in to comment.