linked-list-typed 1.21.4 → 1.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js ADDED
@@ -0,0 +1,65 @@
1
+ module.exports = {
2
+ 'extends': [
3
+ 'plugin:@typescript-eslint/recommended',
4
+ 'prettier'
5
+ ],
6
+ 'rules': {
7
+ 'react/display-name': 'off',
8
+ '@next/next/no-img-element': 'off',
9
+ 'react/no-unescaped-entities': 'off',
10
+ 'import/no-anonymous-default-export': 'off',
11
+ '@typescript-eslint/no-unused-vars': 'error',
12
+ '@typescript-eslint/ban-ts-comment': 'off',
13
+ '@typescript-eslint/no-explicit-any': 'off',
14
+ '@typescript-eslint/no-non-null-assertion': 'off',
15
+ // add new line above comment
16
+ 'lines-around-comment': [
17
+ 'error',
18
+ {
19
+ 'beforeLineComment': false,
20
+ 'beforeBlockComment': true,
21
+ 'allowBlockStart': true,
22
+ 'allowClassStart': true,
23
+ 'allowObjectStart': true,
24
+ 'allowArrayStart': true
25
+ }
26
+ ],
27
+ // add new line above return
28
+ 'newline-before-return': 'off',
29
+ // add new line below import
30
+ 'import/newline-after-import': [
31
+ 'error',
32
+ {
33
+ 'count': 1
34
+ }
35
+ ],
36
+ '@typescript-eslint/ban-types': [
37
+ 'error',
38
+ {
39
+ 'extendDefaults': true,
40
+ 'types': {
41
+ '{}': false
42
+ }
43
+ }
44
+ ]
45
+ },
46
+ 'plugins': [
47
+ 'import'
48
+ ],
49
+ 'settings': {
50
+ 'import/parsers': {
51
+ '@typescript-eslint/parser': [
52
+ '.ts',
53
+ '.tsx'
54
+ ]
55
+ },
56
+ 'import/resolver': {
57
+ 'typescript': {
58
+ 'alwaysTryTypes': true,
59
+ 'project': [
60
+ './tsconfig.json'
61
+ ]
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,6 @@
1
+ src/types/data-structures/abstract-binary-tree.ts
2
+ src/types/data-structures/binary-tree.ts
3
+ src/types/data-structures/bst.ts
4
+ src/types/data-structures/avl-tree.ts
5
+ src/types/data-structures/tree-multiset.ts
6
+ src/types/data-structures/rb-tree.ts
package/.prettierrc.js ADDED
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ arrowParens: 'avoid',
3
+ bracketSpacing: true,
4
+ htmlWhitespaceSensitivity: 'css',
5
+ insertPragma: false,
6
+ bracketSameLine: false,
7
+ jsxSingleQuote: true,
8
+ printWidth: 120,
9
+ proseWrap: 'preserve',
10
+ quoteProps: 'as-needed',
11
+ requirePragma: false,
12
+ singleQuote: true,
13
+ tabWidth: 2,
14
+ trailingComma: 'none',
15
+ useTabs: false
16
+ }
package/README.md CHANGED
@@ -8,7 +8,7 @@ This is a standalone Linked List data structure from the data-structure-typed co
8
8
  ## install
9
9
  ### npm
10
10
  ```bash
11
- npm i linked-list-typed
11
+ npm i linked-list-typed --save
12
12
  ```
13
13
  ### yarn
14
14
  ```bash
package/jest.config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
2
  preset: 'ts-jest',
3
3
  testEnvironment: 'node',
4
- testMatch: ['<rootDir>/tests/**/*.test.ts'],
4
+ testMatch: ['<rootDir>/test/**/*.test.ts'],
5
5
  };
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "linked-list-typed",
3
- "version": "1.21.4",
3
+ "version": "1.31.0",
4
4
  "description": "Linked List, Doubly Linked List, Singly Linked List. Javascript & Typescript Data Structure.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "build": "rm -rf dist && npx tsc",
8
+ "lint": "eslint --fix \"src/**/*.{js,ts}\"",
9
+ "format": "prettier --write \"src/**/*.{js,ts}\"",
8
10
  "test": "jest",
9
11
  "build:docs": "typedoc --out docs ./src",
10
12
  "deps:check": "dependency-cruiser src",
@@ -50,13 +52,19 @@
50
52
  "devDependencies": {
51
53
  "@types/jest": "^29.5.3",
52
54
  "@types/node": "^20.4.9",
53
- "dependency-cruiser": "^13.1.2",
55
+ "@typescript-eslint/eslint-plugin": "^5.6.0",
56
+ "@typescript-eslint/parser": "^5.11.0",
57
+ "eslint": "^7.32.0",
58
+ "eslint-config-prettier": "^8.3.0",
59
+ "eslint-import-resolver-alias": "^1.1.2",
60
+ "eslint-import-resolver-typescript": "^2.5.0",
61
+ "eslint-plugin-import": "^2.25.4",
54
62
  "jest": "^29.6.2",
63
+ "prettier": "^3.0.3",
55
64
  "ts-jest": "^29.1.1",
56
- "typedoc": "^0.24.8",
57
65
  "typescript": "^4.9.5"
58
66
  },
59
67
  "dependencies": {
60
- "data-structure-typed": "^1.21.4"
68
+ "data-structure-typed": "^1.31.0"
61
69
  }
62
70
  }
@@ -0,0 +1,5 @@
1
+ describe('Operation Test', () => {
2
+ it('should perform various operations well', () => {
3
+ expect(true).toBeTruthy();
4
+ });
5
+ });