diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..dfafba7 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,10 @@ +import nyxb from '@nyxb/eslint-config' + +export default nyxb({ + formatters: true, + react: true, + + rules: { + 'no-console': 0, + }, +}) diff --git a/test/nyxu/npm.spec.ts b/test/nyxu/npm.spec.ts index 534e3b8..ac3e8fe 100644 --- a/test/nyxu/npm.spec.ts +++ b/test/nyxu/npm.spec.ts @@ -1,15 +1,15 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxu } from '../../src/commands' const agent = 'npm' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxu(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxu(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('empty', _('', 'npm update')) +it('empty', _('', 'npm update')) diff --git a/test/nyxu/pnpm.spec.ts b/test/nyxu/pnpm.spec.ts index 60fc20a..8f9f750 100644 --- a/test/nyxu/pnpm.spec.ts +++ b/test/nyxu/pnpm.spec.ts @@ -1,19 +1,19 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxu } from '../../src/commands' const agent = 'pnpm' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxu(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxu(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('empty', _('', 'pnpm update')) +it('empty', _('', 'pnpm update')) -test('interactive', _('-i', 'pnpm update -i')) +it('interactive', _('-i', 'pnpm update -i')) -test('interactive latest', _('-i --latest', 'pnpm update -i --latest')) +it('interactive latest', _('-i --latest', 'pnpm update -i --latest')) diff --git a/test/nyxu/yarn.spec.ts b/test/nyxu/yarn.spec.ts index 7156c4e..0d49cc6 100644 --- a/test/nyxu/yarn.spec.ts +++ b/test/nyxu/yarn.spec.ts @@ -1,19 +1,19 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxu } from '../../src/commands' const agent = 'yarn' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxu(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxu(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('empty', _('', 'yarn upgrade')) +it('empty', _('', 'yarn upgrade')) -test('interactive', _('-i', 'yarn upgrade-interactive')) +it('interactive', _('-i', 'yarn upgrade-interactive')) -test('interactive latest', _('-i --latest', 'yarn upgrade-interactive --latest')) +it('interactive latest', _('-i --latest', 'yarn upgrade-interactive --latest')) diff --git a/test/nyxu/yarn@berry.spec.ts b/test/nyxu/yarn@berry.spec.ts index bc7e64b..b507654 100644 --- a/test/nyxu/yarn@berry.spec.ts +++ b/test/nyxu/yarn@berry.spec.ts @@ -1,17 +1,17 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxu } from '../../src/commands' const agent = 'yarn@berry' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxu(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxu(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('empty', _('', 'yarn up')) +it('empty', _('', 'yarn up')) -test('interactive', _('-i', 'yarn up -i')) +it('interactive', _('-i', 'yarn up -i')) diff --git a/test/nyxun/bun.spec.ts b/test/nyxun/bun.spec.ts index 2dbd3e8..0040a93 100644 --- a/test/nyxun/bun.spec.ts +++ b/test/nyxun/bun.spec.ts @@ -1,19 +1,19 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxun } from '../../src/commands' const agent = 'bun' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxun(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxun(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('single uninstall', _('axios', 'bun remove axios')) +it('single uninstall', _('axios', 'bun remove axios')) -test('multiple', _('eslint @types/node', 'bun remove eslint @types/node')) +it('multiple', _('eslint @types/node', 'bun remove eslint @types/node')) -test('global', _('eslint nyxi -g', 'bun remove -g eslint nyxi')) +it('global', _('eslint nyxi -g', 'bun remove -g eslint nyxi')) diff --git a/test/nyxun/npm.spec.ts b/test/nyxun/npm.spec.ts index d6eb7d1..7d54fc7 100644 --- a/test/nyxun/npm.spec.ts +++ b/test/nyxun/npm.spec.ts @@ -1,21 +1,21 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxun } from '../../src/commands' const agent = 'npm' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxun(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxun(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('single uninstall', _('axios', 'npm uninstall axios')) +it('single uninstall', _('axios', 'npm uninstall axios')) -test('multiple', _('eslint @types/node', 'npm uninstall eslint @types/node')) +it('multiple', _('eslint @types/node', 'npm uninstall eslint @types/node')) -test('-D', _('eslint @types/node -D', 'npm uninstall eslint @types/node -D')) +it('-D', _('eslint @types/node -D', 'npm uninstall eslint @types/node -D')) -test('global', _('eslint -g', 'npm uninstall -g eslint')) +it('global', _('eslint -g', 'npm uninstall -g eslint')) diff --git a/test/nyxun/pnpm.spec.ts b/test/nyxun/pnpm.spec.ts index 5ab137b..0c3a43f 100644 --- a/test/nyxun/pnpm.spec.ts +++ b/test/nyxun/pnpm.spec.ts @@ -1,21 +1,21 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxun } from '../../src/commands' const agent = 'pnpm' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxun(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxun(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('single add', _('axios', 'pnpm remove axios')) +it('single add', _('axios', 'pnpm remove axios')) -test('multiple', _('eslint @types/node', 'pnpm remove eslint @types/node')) +it('multiple', _('eslint @types/node', 'pnpm remove eslint @types/node')) -test('-D', _('-D eslint @types/node', 'pnpm remove -D eslint @types/node')) +it('-D', _('-D eslint @types/node', 'pnpm remove -D eslint @types/node')) -test('global', _('eslint -g', 'pnpm remove --global eslint')) +it('global', _('eslint -g', 'pnpm remove --global eslint')) diff --git a/test/nyxun/yarn.spec.ts b/test/nyxun/yarn.spec.ts index 166fd1d..e0b7d06 100644 --- a/test/nyxun/yarn.spec.ts +++ b/test/nyxun/yarn.spec.ts @@ -1,21 +1,21 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxun } from '../../src/commands' const agent = 'yarn' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxun(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxun(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('single uninstall', _('axios', 'yarn remove axios')) +it('single uninstall', _('axios', 'yarn remove axios')) -test('multiple', _('eslint @types/node', 'yarn remove eslint @types/node')) +it('multiple', _('eslint @types/node', 'yarn remove eslint @types/node')) -test('-D', _('eslint @types/node -D', 'yarn remove eslint @types/node -D')) +it('-D', _('eslint @types/node -D', 'yarn remove eslint @types/node -D')) -test('global', _('eslint nyxi -g', 'yarn global remove eslint nyxi')) +it('global', _('eslint nyxi -g', 'yarn global remove eslint nyxi')) diff --git a/test/nyxun/yarn@berry.spec.ts b/test/nyxun/yarn@berry.spec.ts index c13bee5..757bfdc 100644 --- a/test/nyxun/yarn@berry.spec.ts +++ b/test/nyxun/yarn@berry.spec.ts @@ -1,21 +1,21 @@ -import { expect, test } from 'vitest' +import { expect, it } from 'vitest' import { parseNyxun } from '../../src/commands' const agent = 'yarn@berry' function _(arg: string, expected: string) { - return () => { - expect( - parseNyxun(agent, arg.split(' ').filter(Boolean)), - ).toBe( - expected, - ) - } + return () => { + expect( + parseNyxun(agent, arg.split(' ').filter(Boolean)), + ).toBe( + expected, + ) + } } -test('single add', _('axios', 'yarn remove axios')) +it('single add', _('axios', 'yarn remove axios')) -test('multiple', _('eslint @types/node', 'yarn remove eslint @types/node')) +it('multiple', _('eslint @types/node', 'yarn remove eslint @types/node')) -test('-D', _('eslint @types/node -D', 'yarn remove eslint @types/node -D')) +it('-D', _('eslint @types/node -D', 'yarn remove eslint @types/node -D')) -test('global', _('eslint nyxi -g', 'npm uninstall -g eslint nyxi')) +it('global', _('eslint nyxi -g', 'npm uninstall -g eslint nyxi'))