Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
76988df
convert all `.js` files to `.ts` files
aryaemami59 Nov 25, 2025
bc7d884
initial TypeScript setup
aryaemami59 Nov 25, 2025
68acd56
initial steps towards TypeScript migration
aryaemami59 Nov 26, 2025
2e30d4d
update `read` and `write` arrays
aryaemami59 Nov 26, 2025
46098ce
resolve remaining issues
aryaemami59 Dec 2, 2025
e1c2e23
add `typeHelpers.ts` to minimize diff in all other files
aryaemami59 Dec 2, 2025
6d78bbb
activate CI
aryaemami59 Dec 2, 2025
50f93bf
fix `tsdown` config
aryaemami59 Dec 2, 2025
19a4725
fix unit-tests
aryaemami59 Dec 2, 2025
3b2288a
revert some changes in order to minimize overall diff
aryaemami59 Dec 2, 2025
5114599
fix CI
aryaemami59 Dec 2, 2025
f057279
revert some changes in order to minimize overall diff
aryaemami59 Dec 2, 2025
9432aa8
rename all unit-tests to `.test.ts` files
aryaemami59 Dec 2, 2025
36db9a2
fix `test` command
aryaemami59 Dec 2, 2025
86e6f02
rename `test` folder to `tests`
aryaemami59 Dec 2, 2025
f142957
fix `test` command
aryaemami59 Dec 2, 2025
c4b5585
fix ESLint config
aryaemami59 Dec 2, 2025
71dd2fe
fix `default` export and add unit-tests
aryaemami59 Dec 2, 2025
3a8cfdb
fix `lint:js` command
aryaemami59 Dec 2, 2025
8d78a6d
add `are-the-types-wrong` CI job
aryaemami59 Dec 2, 2025
0e335b9
move everything into the `src` directory
aryaemami59 Dec 2, 2025
d8c8dc0
fix remaining issues
aryaemami59 Dec 2, 2025
77380e0
bump `typescript-eslint`
aryaemami59 Dec 2, 2025
31fe597
add `eslint` to `peerDependencies`
aryaemami59 Dec 2, 2025
55fa7a4
fix remaining issues
aryaemami59 Dec 2, 2025
ddd11f2
revert CI changes
aryaemami59 Dec 2, 2025
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
12 changes: 0 additions & 12 deletions .eslint-doc-generatorrc.js

This file was deleted.

39 changes: 34 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,57 @@ on:
branches: [main]

jobs:
are-the-types-wrong:
name: 🤔 Are the types wrong?
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v6
with:
node-version: 24
check-latest: true

- name: Install Packages
run: npm ci

- name: Check package exports with are-the-types-wrong
run: npm run check-exports

- name: Run publint
run: npm run check-package-json

- run: npm run typecheck

lint:
name: Lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: lts/*

- name: Install Packages
run: npm install

- name: Build Project
run: npm run build

- name: Lint Files
run: npm run lint

test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18.18.0, 18.x, 20.x, 22.x, 24.x]
node: [22.x, 24.x, lts/*]
include:
- os: windows-latest
node: lts/*
Expand All @@ -40,16 +66,19 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
persist-credentials: false

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}

- name: Install Packages
run: npm install

- name: Build Project
run: npm run build

- name: Test
run: npm test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
.idea
.rolldown/
dist/
13 changes: 13 additions & 0 deletions eslint-doc-generator.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { GenerateOptions } from 'eslint-doc-generator';
import * as path from 'node:path';
import { format, resolveConfig } from 'prettier';

const config = {
ignoreConfig: ['recommended-legacy'],
postprocess: async (doc, pathToFile) => {
const prettierConfig = (await resolveConfig(pathToFile, { config: path.join(import.meta.dirname, '.prettierrc.json') })) ?? {};
return await format(doc, { ...prettierConfig, filepath: pathToFile, parser: 'markdown' });
},
} as const satisfies GenerateOptions;

export default config;
43 changes: 0 additions & 43 deletions eslint.config.js

This file was deleted.

55 changes: 55 additions & 0 deletions eslint.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import jsPlugin from '@eslint/js';
import prettierConfig from 'eslint-config-prettier';
import eslintPluginRecommendedConfig from 'eslint-plugin-eslint-plugin';
import { defineConfig } from 'eslint/config';
import tsEslint from 'typescript-eslint';

const eslintPluginConfigs = defineConfig([
eslintPluginRecommendedConfig.configs.recommended,
{ ignores: ['dist/'] },
{
rules: {
'eslint-plugin/prefer-message-ids': 'off', // TODO: enable
'eslint-plugin/require-meta-docs-description': ['error', { pattern: '^(Detects|Enforces|Requires|Disallows) .+\\.$' }],
'eslint-plugin/require-meta-docs-url': [
'error',
{
pattern: 'https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/{{name}}.md',
},
],
'eslint-plugin/require-meta-schema': 'off', // TODO: enable
'eslint-plugin/require-meta-type': 'off', // TODO: enable
},
},
]);

export default defineConfig([
jsPlugin.configs.recommended,
prettierConfig,
...eslintPluginConfigs,
tsEslint.configs.strict,
tsEslint.configs.stylistic,
// tsEslint.configs.strictTypeChecked,
// tsEslint.configs.stylisticTypeChecked,
{
files: ['**/*.?(c|m)ts?(x)'],
languageOptions: {
sourceType: 'module',
parserOptions: {
projectService: true,
},
},
rules: {
'@typescript-eslint/consistent-type-definitions': [2, 'type'],
},
},
{
files: ['tests/**/*.tests.ts'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
},
},
},
]);
80 changes: 0 additions & 80 deletions index.js

This file was deleted.

Loading