Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

src: TS rewrite #6

Merged
merged 24 commits into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
18caf75
src: TS rewrite
vladfrangu Apr 23, 2019
7d90547
misc: NPM please
vladfrangu Apr 23, 2019
8e3effd
misc: Update lint script to lint ts files
iCrawl Apr 23, 2019
b84ea26
misc: Actually do test script
vladfrangu Apr 23, 2019
027db11
src: Requested changes
vladfrangu Apr 23, 2019
50a04df
src: Redundant extends any
vladfrangu Apr 23, 2019
64d2e6c
src: Finally moar requested changes
vladfrangu Apr 23, 2019
333e32a
src: I love exports in TS
vladfrangu Apr 23, 2019
70d3e1e
src: Duping my... definitions
vladfrangu Apr 23, 2019
a0129bb
src: I seem to have bad decision making at night
vladfrangu Apr 24, 2019
f8551e6
src: Refactor loops, add more tests
vladfrangu Apr 24, 2019
bc625b6
docs: Requested changes
vladfrangu May 28, 2019
1494b23
misc: Crawl requests 1
vladfrangu Sep 3, 2019
e4cfe61
src: Crawl requests 2
vladfrangu Sep 3, 2019
9b2b820
src: Suggested changes
vladfrangu Sep 3, 2019
253649d
src: Suggested changes by Appel
vladfrangu Sep 4, 2019
202900a
src: Suggested change
vladfrangu Sep 4, 2019
2096d58
src: Update eslint-config-marine and remove eslint disable comment
vladfrangu Sep 4, 2019
c838a7b
src: Implement PR https://github.com/discordjs/collection/pull/7
vladfrangu Sep 4, 2019
0d98653
src: Implement PR https://github.com/discordjs/collection/pull/8
vladfrangu Sep 4, 2019
7d933fb
src: Remove all @ts-ignore comments
vladfrangu Sep 4, 2019
1b71096
src: Use unknown instead of any
vladfrangu Sep 4, 2019
a4a862f
src: Fix Travis for TS 3.6.2
vladfrangu Sep 4, 2019
8285d14
src: Slap a todo comment
vladfrangu Sep 4, 2019
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
150 changes: 1 addition & 149 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,158 +1,10 @@
{
"extends": "eslint:recommended",
"extends": "marine",
"parserOptions": {
"ecmaVersion": 2018
},
"env": {
"es6": true,
"node": true
},
"overrides": [
{ "files": ["*.browser.js"], "env": { "browser": true } }
],
"rules": {
"no-await-in-loop": "warn",
"no-compare-neg-zero": "error",
"no-extra-parens": ["warn", "all", {
"nestedBinaryExpressions": false
}],
"no-template-curly-in-string": "error",
"no-unsafe-negation": "error",
"valid-jsdoc": ["error", {
"requireReturn": false,
"requireReturnDescription": false,
"prefer": {
"return": "returns",
"arg": "param"
},
"preferType": {
"String": "string",
"Number": "number",
"Boolean": "boolean",
"Symbol": "symbol",
"object": "Object",
"function": "Function",
"array": "Array",
"date": "Date",
"error": "Error",
"null": "void"
}
}],

"accessor-pairs": "warn",
"array-callback-return": "error",
"complexity": "warn",
"consistent-return": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
"dot-notation": "error",
"eqeqeq": "error",
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-multi-spaces": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-escape": "error",
"no-useless-return": "error",
"no-void": "error",
"no-warning-comments": "warn",
"prefer-promise-reject-errors": "error",
"require-await": "warn",
"wrap-iife": "error",
"yoda": "error",

"no-label-var": "error",
"no-shadow": "error",
"no-undef-init": "error",

"callback-return": "error",
"getter-return": "off",
"handle-callback-err": "error",
"no-mixed-requires": "error",
"no-new-require": "error",
"no-path-concat": "error",

"array-bracket-spacing": "error",
"block-spacing": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"capitalized-comments": ["error", "always", { "ignoreConsecutiveComments": true }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"consistent-this": ["error", "$this"],
"eol-last": "error",
"func-names": "error",
"func-name-matching": "error",
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
"indent": ["error", 2, { "SwitchCase": 1 }],
"key-spacing": "error",
"keyword-spacing": "error",
"max-depth": "error",
"max-len": ["error", 120, 2],
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"new-cap": "off",
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 3 }],
"no-array-constructor": "error",
"no-inline-comments": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-new-object": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"nonblock-statement-body-position": "error",
"object-curly-spacing": ["error", "always"],
"operator-assignment": "error",
"operator-linebreak": ["error", "after"],
"padded-blocks": ["error", "never"],
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
"semi-spacing": "error",
"semi": "error",
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"template-tag-spacing": "error",
"unicode-bom": "error",

"arrow-body-style": "error",
"arrow-parens": ["error", "as-needed"],
"arrow-spacing": "error",
"no-duplicate-imports": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"prefer-arrow-callback": "error",
"prefer-numeric-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"rest-spread-spacing": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error"
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ package-lock.json
# Miscellaneous
.tmp/
.vscode/
dist/
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ yarn.lock
.vscode/

# NPM ignore
!dist/
src/
.eslintrc.json
.gitattributes
.gitignore
.travis.yml
.github/
test/
jsdoc.json
tsconfig.json
tslint.json
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"name": "collection",
"version": "1.0.0",
"description": "Utility data structure used in Discord.js",
"main": "./src/index.js",
"types": "./typings/index.d.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "npm run lint && npm run lint:typings && npm run unit-test",
"lint": "eslint ./",
"lint:typings": "tslint typings/index.d.ts",
"unit-test": "node test/index.js"
"lint": "eslint src --ext .ts",
"prebuild": "npm run lint",
"build": "rimraf dist/ && tsc",
"pretest": "npm run build",
"test": "node test/index.js"
},
"repository": {
"type": "git",
Expand All @@ -26,10 +27,12 @@
},
"homepage": "https://github.com/discordjs/collection#readme",
"devDependencies": {
"@types/node": "^10.7.1",
"eslint": "^5.4.0",
"tslint": "^5.11.0",
"tslint-config-typings": "^0.3.1",
"typescript": "^3.0.1"
"@types/node": "^10.14.17",
"@typescript-eslint/eslint-plugin": "^2.1.0",
"@typescript-eslint/parser": "^2.1.0",
"eslint": "^6.3.0",
"eslint-config-marine": "^4.2.1",
"rimraf": "^3.0.0",
"typescript": "^3.6.2"
}
}
Loading