Skip to content
Open
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
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

47 changes: 0 additions & 47 deletions .eslintrc.js

This file was deleted.

70 changes: 70 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import jestPlugin from 'eslint-plugin-jest';
import prettierPlugin from 'eslint-plugin-prettier';
import eslintConfigPrettier from 'eslint-config-prettier';
import globals from 'globals';

export default tseslint.config(
{
ignores: ['dist', 'node_modules', '**/generated', 'jest-html-reporters-attach', 'coverage']
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname
},
globals: {
...globals.node,
...globals.jest
}
},
plugins: {
prettier: prettierPlugin,
jest: jestPlugin
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/semi': 'warn',
'@typescript-eslint/quotes': ['error', 'single'],
'@typescript-eslint/no-floating-promises': 'error',
'no-return-await': 'error',

'prettier/prettier': [
'warn',
{
printWidth: 120,
tabWidth: 2,
tabs: false,
semi: true,
singleQuote: true,
quoteProps: 'as-needed',
trailingComma: 'none',
bracketSpacing: true,
arrowParens: 'avoid'
}
]
}
},
{
files: ['test/**/*.spec.ts', 'test/**/*.ts'],
...jestPlugin.configs['flat/recommended'],
rules: {
...jestPlugin.configs['flat/recommended'].rules,
'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error'
}
},
{
files: ['**/*.js', '**/*.mjs'],
...tseslint.configs.disableTypeChecked
},
eslintConfigPrettier
);
5 changes: 4 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ interface TraversalState<T> {
type DAGVisitor<T, C> = (node: T, state: TraversalState<T>, context: C) => void;

class Node<T extends Identifiable> {
constructor(readonly data: T, readonly dependencies = new Set<string>()) {}
constructor(
readonly data: T,
readonly dependencies = new Set<string>()
) {}

get id(): string {
return this.data.id;
Expand Down
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,30 @@
"clean": "rm -rf ./dist",
"build": "tsc",
"test": "DEBUG='error:*' jest --coverage && pnpm lint",
"lint": "eslint --fix --ext .js,.ts .",
"lint": "eslint --fix .",
"prepare": "pnpm run build"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"@types/jest": "^27.0.2",
"@types/node": "^24.0.0",
"@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"eslint": "^8.38.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.4",
"eslint-plugin-no-floating-promise": "^1.0.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^8.54.0",
"@typescript-eslint/parser": "^8.54.0",
"eslint": "^9.26.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jest": "^29.12.1",
"eslint-plugin-prettier": "^5.5.5",
"globals": "^17.2.0",
"jest": "^27.5.1",
"jest-extended": "^2.0.0",
"jest-html-reporters": "^3.0.6",
"jest-summary-reporter": "^0.0.2",
"prettier": "^2.6.2",
"prettier": "^3.8.1",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"typescript": "^4.9.5",
"typescript-eslint": "^8.54.0",
"uuid": "^8.3.2"
},
"packageManager": "pnpm@10.28.0",
Expand Down
Loading