Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: initial data structures #11

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
7 changes: 2 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output
coverage
# don't lint readme
README.md
README.md
*.config.*
29 changes: 29 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": ["standard-with-typescript", "eslint:recommended", "plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint"],
"parserOptions": {
"ecmaVersion": "latest",
"project": "./tsconfig.eslint.json",
"sourceType": "module"
},
"rules": {
"semi": "off",
"@typescript-eslint/semi": "off",
"member-delimiter-style": "off",
"@typescript-eslint/member-delimiter-style": "off",
"prefer-function-type": "off",
"@typescript-eslint/space-before-function-paren": "off",
"generator-star-spacing": "off",
"no-eq-null": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"strict-boolean-expressions": "off",
"no-template-curly-in-string": "off",
"explicit-function-return-type": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
}
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"trailingComma": "es5",
"trailingComma": "none",
"tabWidth": 2,
"singleQuote": true,
"printWidth": 120
Expand Down
Empty file removed CHANGELOG.md
Empty file.
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# Broccoli and Carrots
_Data Structures and Algorithms in Typescript_

TODO: Make README nice.
Data Structures and Algorithms in Typescript

## Overview

_Note: this is primarily for my own learning. I'll aim to keep test coverage at 100%, but I have made this to practice 1. DSA and 2. Publishing and maintaining an npm package. Test and confirm for yourself before importing and using._

## Data Structures

| Structure | Type | Notes |
| ------------------------- | --------------------------------- | --------------------------------------------------------- |
| [Linked List][LinkedList] | Sequence (linear, not contiguous) | Similar to arrays, but uses pointers rather than indices. |

## Algorithms

## References

[Jeff Zhang - Iruka - DSA in Typescript](https://github.com/jeffzh4ng/iruka)
[William Fiset - Algorithms - DSA in Java](https://github.com/williamfiset/Algorithms)

<!-- Link defs -->

[LinkedList]: ./src/data-structures/sequences/linked-list/index.ts
6 changes: 0 additions & 6 deletions eslintrc.js

This file was deleted.

16 changes: 8 additions & 8 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
roots: ['<rootDir>/test'],
testMatch: ['**/__test__/**/*.+(ts|tsx|js)', '**/?(*.)+(spec|test).+(ts|tsx|js)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
collectCoverage: true,
collectCoverageFrom: ['src/**/{!(b-tree),}.ts'],
export default {
roots: ['<rootDir>/test'],
testMatch: ['**/__test__/**/*.+(ts|tsx|js)', '**/?(*.)+(spec|test).+(ts|tsx|js)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest'
},
collectCoverage: true,
collectCoverageFrom: ['src/**/{!(b-tree),}.ts']
};
Loading