From d08e5c1e16c52da54d27ed047a809350b0376f0c Mon Sep 17 00:00:00 2001 From: matt Date: Wed, 8 Sep 2021 19:00:26 -0500 Subject: [PATCH] feat(core): Added the core --- .eslintrc.json | 49 + .github/dependabot.yml | 4 +- .github/pull_request_template.md | 41 +- .github/workflows/changelog.yml | 22 + .github/workflows/lint.yml | 30 - .gitignore | 19 +- CHANGELOG.md | 0 CONTRIBUTING.md | 163 ++ index.js | 14 + package-lock.json | 2619 ++++++++++++++++++++++++++++++ package.json | 27 + 11 files changed, 2933 insertions(+), 55 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .github/workflows/changelog.yml delete mode 100644 .github/workflows/lint.yml create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 index.js create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..ae431cc --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,49 @@ +{ + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + }, + "parserOptions": { + "ecmaVersion": 2021 + }, + "rules": { + "arrow-spacing": ["warn", { "before": true, "after": true }], + "brace-style": ["error", "stroustrup", { "allowSingleLine": true }], + "comma-dangle": ["error", "always-multiline"], + "comma-spacing": "error", + "comma-style": "error", + "curly": ["error", "multi-line", "consistent"], + "dot-location": ["error", "property"], + "handle-callback-err": "off", + "indent": ["error", "tab"], + "keyword-spacing": "error", + "max-nested-callbacks": ["error", { "max": 4 }], + "max-statements-per-line": ["error", { "max": 2 }], + "no-console": "off", + "no-empty-function": "error", + "no-floating-decimal": "error", + "no-inline-comments": "error", + "no-lonely-if": "error", + "no-multi-spaces": "error", + "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], + "no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }], + "no-trailing-spaces": ["error"], + "no-var": "error", + "object-curly-spacing": ["error", "always"], + "prefer-const": "error", + "quotes": ["error", "single"], + "semi": ["error", "always"], + "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", + "yoda": "error" + } +} \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 66089f0..0b2004a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,6 @@ version: 2 updates: - - package-ecosystem: "pip" + - package-ecosystem: "npm" directory: "/" schedule: interval: "daily" @@ -9,4 +9,4 @@ updates: assignees: - "mmattbtw" commit-message: - prefix: "🔼" + prefix: "chore(deps): " \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6d1a3d6..d66a150 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,10 +1,39 @@ -## Describe what your pull request adds or fixes. + + -### Pre-Merge checklist -- [ ] - Made sure there were no bugs by testing the bot on your own Bot Application. +## Description + + + + + -- [ ] - Added a `CHANGELOG.md` entry if applicable. +## How Has This Been Tested + + + + -- [ ] - Edited the version number in `launcher.py` +## Screenshots(optional) + + -- [ ] - Added any dependencies in `requirements.txt` if needed +## Types of changes + + +- Bug fix (non-breaking change which fixes an issue) +- New feature (non-breaking change which adds functionality) +- Documentation (non-breaking change which updates documentation) +- Breaking change (fix or feature that would cause existing functionality to change) +- Code style (formatting, renaming) +- Refactoring (no functional changes, no api changes) +- Other (please describe here): + +## Checklist + + +- [ ] Changes follow the **CONTRIBUTING**.md guidelines. +- [ ] Update necessary documentation accordingly. +- [ ] Check issues and pull requests first. You don't want to duplicate effort. + +## Other information \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..89866ba --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,22 @@ +name: Generate changelog +on: + release: + types: [created, edited] + push: + branches: + - master + +jobs: + generate-changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: BobAnkh/auto-generate-changelog@master + with: + REPO_NAME: 'DoobDev/Doob' + ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}} + PATH: '/CHANGELOG.md' + COMMIT_MESSAGE: 'docs(CHANGELOG): update release notes' + TYPE: 'feat:Feature,fix:Bug Fixes,docs:Documentation,refactor:Refactor,perf:Performance Improvements' \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index c818028..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Lint - -on: [push, pull_request] - -jobs: - run-linters: - name: Run linters - runs-on: ubuntu-latest - - steps: - - name: Check out Git repository - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - - name: Install Python dependencies - run: pip install black - - - name: Run linters - uses: wearerequired/lint-action@v1 - with: - black: true - github_token: ${{ secrets.GITHUB_TOKEN }} - auto_fix: true - git_name: 'Doob Linting BOT' - git_email: 'matt@mmatt.net' - commit_message: '✨ [auto lint]' diff --git a/.gitignore b/.gitignore index 6d0e45d..bc43430 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,4 @@ -old v1/cogs/__pycache__ -__pycache__ -lib/bot/token.txt -*.db -*.db-journal -lib/bot/topgg.txt -lib/bot/webhook.txt .env -pythonenv3.8 -lib/bot/statcord.txt -lib/bot/trackergg api.txt -.idea -pyproject.toml -poetry.lock .DS_store -logs/ -test-venv/ -lib/cogs/afk.json -lib/cogs/blacklisted_users.json +config.json +node_modules diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..003478b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,163 @@ +# CONTRIBUTING + +We'd be glad for you to contribute to our source code and to make this project better! + +Feel free to submit a pull request or an issue, but make sure to use the templates + +We adopt a series of automation tools to check, contributions not following the conventions may be rejected + +Here are the contributing conventions we'd like you to follow: + +## Style Guide + +### Commit Message Convention + +Each commit should contain relatively independent change (that is, a hodgepodge of multiple types of modifications is not allowed to be submitted in one commit), and the specific changes need to be clarified in the message + +The commit message conventions of this project mainly refers to the most widely used [AngularJS Git Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.uyo6cb12dt6w) + +Here is the message format: + +> `(): ` +> +> // blank line +> +> `` +> +> // blank line +> +> `