Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tambien committed Apr 25, 2024
2 parents c313bc6 + 515b9c0 commit 95a2275
Show file tree
Hide file tree
Showing 117 changed files with 20,314 additions and 12,657 deletions.
90 changes: 90 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["jsdoc", "html"],
extends: ["plugin:@typescript-eslint/recommended"],
rules: {
"prefer-rest-params": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-function": "off",
"jsdoc/check-alignment": 1,
"jsdoc/check-param-names": ["error"],
// "jsdoc/check-examples": ["error"],
"jsdoc/check-indentation": [
"error",
{ excludeTags: ["example", "param"] },
],
"dot-location": ["error", "property"],
"linebreak-style": ["error", "unix"],
eqeqeq: ["error"],
curly: ["error", "all"],
"dot-notation": ["error"],
"no-throw-literal": ["error"],
"no-useless-call": ["error"],
"no-unmodified-loop-condition": ["error"],
"quote-props": ["error", "as-needed"],
quotes: ["error", "double"],
"no-shadow": "error",
"no-console": ["error", { allow: ["warn"] }],
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/no-unused-vars": "off",
"sort-imports": [
"error",
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
},
],
"no-lonely-if": ["error"],
semi: ["error", "always"],
"no-cond-assign": ["error", "always"],
indent: "off",
"no-var": "error",
"prefer-arrow-callback": "error",
"@typescript-eslint/indent": [
"error",
"tab",
{ SwitchCase: 1, MemberExpression: 2 },
],
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"no-multi-spaces": ["error"],
"array-bracket-spacing": ["error", "never"],
"block-spacing": ["error", "always"],
"func-call-spacing": ["error", "never"],
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
"brace-style": ["error", "1tbs"],
"space-in-parens": ["error", "never"],
"eol-last": ["error", "always"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/array-type": "off",
"spaced-comment": [
"error",
"always",
{
line: { exceptions: ["-"] },
block: { balanced: true },
},
],
"lines-between-class-members": "off",
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 1, maxBOF: 0 }],
"no-unneeded-ternary": ["error"],
"object-curly-spacing": ["error", "always"],
"space-unary-ops": ["error", { words: true, nonwords: false }],
"block-spacing": ["error", "always"],
"keyword-spacing": ["error", { before: true }],
"space-before-function-paren": [
"error",
{ anonymous: "never", named: "never", asyncArrow: "always" },
],
"comma-spacing": ["error", { before: false, after: true }],
"arrow-spacing": ["error", { before: true, after: true }],
"space-before-blocks": [
"error",
{ functions: "always", keywords: "always", classes: "always" },
],
},
};
73 changes: 0 additions & 73 deletions .eslintrc.js

This file was deleted.

8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Report an issue with Tone.js
title: ''
labels: ''
assignees: ''

---

**Describe the bug**

A description of what the bug is.

For help questions, check out the [forum](https://groups.google.com/forum/#!forum/tonejs).

Note: Browsers' [Autoplay Policy](https://github.com/Tonejs/Tone.js/wiki/Autoplay) leads to a lot of subtle and inconsistent bugs where Tone.js produces no sound. Check out the link for more information and the solution.

If you are experiencing loose or inaccurate timing, double check that you are [correctly scheduling events](https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing).


**To Reproduce**

Please include a way to reproduce your issue. If possible, please includes a link to some example code using a platform like jsfiddle or codesandbox where the code can be edited. This makes it much easier to debug the issue and also create a validation test to verify the bug was fixed.

**Expected behavior**
A description of what you expected to happen.

**What I've tried**
How have you tried resolving/debugging this issue? This can be helpful context for getting to the heart of the issue faster and not duplicating effort.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

**The feature you'd like**
A description of a module or method which you'd like to be included in Tone.js

**Any alternatives you've considered**
Are there existing modules or methods within Tone.js which can be combined to do the same thing? Are there other libraries or reference implementations which do a similar thing?

**Additional context**
Add any other context or screenshots about the feature request here.

**Feature Requests will eventually be closed if inactive**
Consider submitted a Pull Request for the feature you want. If no one addresses your feature, it will eventually be closed due to inactivity. Though, someone could always implement your feature request after it's closed. Closing issues automatically keeps features requests from piling up.
9 changes: 9 additions & 0 deletions .github/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
daysUntilStale: 90
daysUntilClose: 14
onlyLabels:
- feature request
staleLabel: stale
markComment: >
Feature requests which don't have any contributors or activity in the past
90 days are marked as stale. Comment on this issue if you intend on contributing
to this feature, otherwise it will be closed in two weeks.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish
on:
workflow_run:
workflows: ["Tests"]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
# not on PRs
if: github.event_name != 'pull_request'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_CI: true
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: 18.12.0
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Increment version
run: npm run increment
- name: Publish @next
run: npm publish --tag next
if: ${{ github.ref == 'refs/heads/dev' }}
- name: Publish @latest
run: npm publish
if: ${{ github.ref == 'refs/heads/main' }}
118 changes: 118 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Tests

on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- dev
push:
branches:
- dev
- main
jobs:
run-tests:
name: All tests
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
env:
BROWSER: chrome
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 18.12.0
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: All tests
run: npm run test
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
test-code-examples:
name: Check typedocs
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 18.12.0
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build Docs
run: npm run build && npm run docs:json
- name: tsdoc @example checks
run: npm run test:examples
test-html-examples:
name: Run HTML Examples
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 18.12.0
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Code example tests
run: npm run test:html
test-lint:
name: Linting and environment checks
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 18.12.0
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Linting
run: npm run lint
test-readme:
name: Ensure that examples in the README compile
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version: 18.12.0
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm run test:readme
Loading

0 comments on commit 95a2275

Please sign in to comment.