Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions .eslintrc

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
id: setup
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
id: setup
Expand All @@ -71,7 +71,7 @@ jobs:
run: npm run build

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand All @@ -85,7 +85,7 @@ jobs:
if: github.ref_name == 'main'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
id: setup
Expand All @@ -106,7 +106,7 @@ jobs:
run: npm ci

- name: Download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v22
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cSpell.words": ["jinju"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifierEnding": "js"
Expand Down
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ celebrate(message: string, context?: string)

Renders a celebration `message`, with optional `context`. If `context` is provided it is rendered dimmer than the `message`.

> 💡
> [!TIP]
> Much like [`success`](#success), it can be used as a different type of positive message, like completing the process.

#### Example
Expand All @@ -55,7 +55,7 @@ debug(message: string)

Renders a debug `message`.

> 💡
> [!TIP]
> Provides additional information without distracting from the core message output.

#### Example
Expand Down Expand Up @@ -86,7 +86,7 @@ fail(message: string, context?: string)

Renders a failure `message`, with optional `context`. If `context` is provided it is rendered dimmer than the `message`.

> 💡
> [!TIP]
> Can be used to indicate a failure or error.

#### Example
Expand All @@ -103,7 +103,7 @@ fail('Could not read file', './config.json');

Returns a spinner instance.

> 💡
> [!TIP]
> Showing feedback during asynchronous processes.

#### `spinner.start(message: string)`
Expand Down Expand Up @@ -145,7 +145,7 @@ success(message: string, context?: string)

Renders a success `message`, with optional `context`. If `context` is provided it is rendered dimmer than the `message`.

> 💡
> [!TIP]
> Can be used to indicate an action has resolved as expected.

#### Example
Expand All @@ -166,7 +166,7 @@ warn(message: string, context?: string)

Renders a warning `message`, with optional `context`. If `context` is provided it is rendered dimmer than the `message`.

> 💡
> [!TIP]
> Can be used to provide awareness to a non-ideal resolution.

#### Example
Expand All @@ -178,3 +178,7 @@ success('Connected to server');

success('Connected to server', 'https://a.server.com');
```

---

<small>© 2025 [Mike Simmonds](https://mike.id)</small>
49 changes: 49 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import * as importPlugin from 'eslint-plugin-import';
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
{
files: ['**/*.{js,mjs,cjs,ts}'],
},
{
languageOptions: {
globals: globals.node,
},
},
eslint.configs.recommended,
tseslint.configs.strict,
tseslint.configs.stylistic,
eslintConfigPrettier,
{
plugins: {
import: importPlugin,
unicorn: eslintPluginUnicorn,
},
rules: {
'unicorn/prefer-node-protocol': 'error',
'import/order': [
'error',
{
groups: [
'builtin',
'index',
'external',
'internal',
'parent',
'sibling',
],
pathGroupsExcludedImportTypes: ['builtin'],
'newlines-between': 'always',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
},
}
);
Loading