diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 939fbfa..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,143 +0,0 @@ -{ - "extends": "eslint:recommended", - "parserOptions": { - "ecmaVersion": 2018 - }, - "env": { - "es6": true, - "node": true - }, - "rules": { - "no-await-in-loop": "warn", - "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", - "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", "smart"], - "no-console": "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", - "require-await": "warn", - "wrap-iife": "error", - "yoda": "error", - - "no-label-var": "error", - "no-shadow": "error", - "no-undef-init": "error", - - "callback-return": "error", - "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 }], - "comma-dangle": ["error", "never"], - "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", 4], - "key-spacing": "error", - "keyword-spacing": "error", - "max-depth": "error", - "max-nested-callbacks": ["error", { "max": 4 }], - "max-statements-per-line": ["error", { "max": 2 }], - "new-cap": "error", - "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", - "object-curly-spacing": ["error", "always"], - "operator-assignment": "error", - "operator-linebreak": ["error", "before"], - "padded-blocks": ["error", "never"], - "quote-props": ["error", "as-needed"], - "quotes": ["error", "single"], - "semi-spacing": "error", - "semi": "error", - "space-before-blocks": "error", - "space-before-function-paren": ["error", "never"], - "space-in-parens": "error", - "space-infix-ops": "error", - "space-unary-ops": "error", - "spaced-comment": "error", - "unicode-bom": "error", - - "arrow-parens": ["error", "as-needed"], - "arrow-spacing": "error", - "no-duplicate-imports": "error", - "no-useless-computed-key": "error", - "no-useless-constructor": "error", - "prefer-const": "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" - } -} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 4ac2cad..2df5a7e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,8 +12,6 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v3 - with: - version: 8 - uses: ArtiomTr/jest-coverage-report-action@v2 with: diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index c07f50f..56bc2fb 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -24,23 +24,31 @@ jobs: eslint: name: Run eslint scanning runs-on: ubuntu-latest + permissions: contents: read security-events: write actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install ESLint - run: | - npm install eslint@latest - npm install @microsoft/eslint-formatter-sarif@3.0.0 + - name: Setup pnpm + uses: pnpm/action-setup@v3 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' + + - name: Install dev dependencies + run: pnpm install --dev - name: Run ESLint - run: npx eslint ./src ./test - --config .eslintrc.json - --ext .js,.jsx,.ts,.tsx + run: pnpm run lint --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif continue-on-error: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47d7bee..55ddde8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,6 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v3 - with: - version: 8 - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b2694c..7156fd6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,6 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v3 - with: - version: 8 - uses: actions/setup-node@v4 with: diff --git a/.gitignore b/.gitignore index 3080551..ae3c3f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -.vscode -coverage -node_modules -dist \ No newline at end of file +.vscode/ +coverage/ +dist/ +node_modules/ +*.sarif \ No newline at end of file diff --git a/docs/BTTVEmote.html b/docs/BTTVEmote.html index 25a803c..9bba931 100644 --- a/docs/BTTVEmote.html +++ b/docs/BTTVEmote.html @@ -1182,7 +1182,7 @@
Returns:
-

toObject() → {Object}

+

toObject() → {object}

@@ -1276,7 +1276,7 @@
Returns:
-Object +object @@ -1390,7 +1390,7 @@
Parameters:
-Object +object @@ -1519,7 +1519,7 @@
Returns:

diff --git a/docs/Channel.html b/docs/Channel.html index 2fb0a36..d80a072 100644 --- a/docs/Channel.html +++ b/docs/Channel.html @@ -811,7 +811,7 @@
Returns:

diff --git a/docs/Collection.html b/docs/Collection.html index a54479d..36b858f 100644 --- a/docs/Collection.html +++ b/docs/Collection.html @@ -785,7 +785,7 @@
Returns:

diff --git a/docs/Emote.html b/docs/Emote.html index 1c3742d..c7bf147 100644 --- a/docs/Emote.html +++ b/docs/Emote.html @@ -669,7 +669,7 @@

Methods

-

toObject() → {Object}

+

toObject() → {object}

@@ -758,7 +758,7 @@
Returns:
-Object +object @@ -789,7 +789,7 @@
Returns:

diff --git a/docs/EmoteFetcher.html b/docs/EmoteFetcher.html index 3129369..3d382a6 100644 --- a/docs/EmoteFetcher.html +++ b/docs/EmoteFetcher.html @@ -206,7 +206,7 @@
Parameters:
-Object +object @@ -839,7 +839,7 @@
Parameters:
-Object +object @@ -1085,7 +1085,7 @@
Parameters:
-Object +object @@ -1331,7 +1331,7 @@
Parameters:
-Object +object @@ -1613,7 +1613,7 @@
Parameters:
-Object +object @@ -1725,7 +1725,7 @@
Returns:
-

(private) _getRawBTTVEmotes(idopt) → {Promise.<Array.<Object>>}

+

(private) _getRawBTTVEmotes(idopt) → {Promise.<Array.<object>>}

@@ -1884,7 +1884,7 @@
Returns:
-Promise.<Array.<Object>> +Promise.<Array.<object>> @@ -1900,7 +1900,7 @@
Returns:
-

(private) _getRawFFZEmoteSet(id) → {Promise.<Array.<Object>>}

+

(private) _getRawFFZEmoteSet(id) → {Promise.<Array.<object>>}

@@ -2038,7 +2038,7 @@
Returns:
-Promise.<Array.<Object>> +Promise.<Array.<object>> @@ -2054,7 +2054,7 @@
Returns:
-

(private) _getRawFFZEmotes(id) → {Promise.<Array.<Object>>}

+

(private) _getRawFFZEmotes(id) → {Promise.<Array.<object>>}

@@ -2192,7 +2192,7 @@
Returns:
-Promise.<Array.<Object>> +Promise.<Array.<object>> @@ -2208,7 +2208,7 @@
Returns:
-

(private) _getRawSevenTVEmotes(idopt) → {Promise.<Array.<Object>>}

+

(private) _getRawSevenTVEmotes(idopt) → {Promise.<Array.<object>>}

@@ -2366,7 +2366,7 @@
Returns:
-Promise.<Array.<Object>> +Promise.<Array.<object>> @@ -2382,7 +2382,7 @@
Returns:
-

(private) _getRawTwitchEmotes(id) → {Promise.<Array.<Object>>}

+

(private) _getRawTwitchEmotes(id) → {Promise.<Array.<object>>}

@@ -2520,7 +2520,7 @@
Returns:
-Promise.<Array.<Object>> +Promise.<Array.<object>> @@ -3583,7 +3583,7 @@
Parameters:
-Object +object @@ -3668,7 +3668,7 @@
Returns:

diff --git a/docs/EmoteParser.html b/docs/EmoteParser.html index 11fd8ce..d7c49bf 100644 --- a/docs/EmoteParser.html +++ b/docs/EmoteParser.html @@ -198,7 +198,7 @@
Parameters:
-Object +object @@ -507,7 +507,7 @@
Type:
-

options :Object

+

options :object

@@ -571,7 +571,7 @@
Type: