diff --git a/eslint.config.js b/eslint.config.js index 7fce60d..6105e27 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -11,7 +11,6 @@ export default antfu( { rules: { ...eslintRulesDefaults(), - 'unicorn/consistent-function-scoping': 'off', }, }, ) diff --git a/package.json b/package.json index 2b6c11e..647bde3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed", "type": "module", - "version": "0.24.16", + "version": "0.24.17", "description": "🌱 Simple foundation library", "author": { "name": "Dirk Holtwick", diff --git a/src/common/eslint-defaults.js b/src/common/eslint-defaults.js index 22c4934..8a3bc5e 100644 --- a/src/common/eslint-defaults.js +++ b/src/common/eslint-defaults.js @@ -24,7 +24,7 @@ export function eslintIgnoreDefaults() { ] } -// https://eslint.org/docs/latest/rules/ +/// Very much opiniated ESLint setting! Details to rules see https://eslint.org/docs/latest/rules/ export function eslintRulesDefaults() { return { 'unused-imports/no-unused-vars': 'off', @@ -44,6 +44,8 @@ export function eslintRulesDefaults() { ImportDeclaration: 'never', // ExportDeclaration: 'always' }], + + 'unicorn/consistent-function-scoping': 'off', } } diff --git a/src/node/open-browser.spec.ts b/src/node/open-browser.spec.ts index da86143..8f8c6f9 100644 --- a/src/node/open-browser.spec.ts +++ b/src/node/open-browser.spec.ts @@ -15,7 +15,7 @@ describe('openBrowser', () => { it('should open URL on macOS', () => { vi.mocked(platform).mockReturnValue('darwin') openBrowser('http://example.com') - expect(exec).toHaveBeenCalledWith('open http://example.com') + expect(exec).toHaveBeenCalledWith('open -u http://example.com') }) it('should open URL on Windows', () => { diff --git a/src/node/open-browser.ts b/src/node/open-browser.ts index 67fb7ef..182c48c 100644 --- a/src/node/open-browser.ts +++ b/src/node/open-browser.ts @@ -5,7 +5,7 @@ import { platform } from 'node:os' export function openBrowser(url: string) { switch (platform()) { case 'darwin': - exec(`open ${url}`) + exec(`open -u ${url}`) break case 'win32': exec(`start ${url}`)