-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
Initial version that supports parsing JSON, HTML, SRT, and WEBVTT files. Thanks to Ryan for his help with eslint and prettier. --------- Co-authored-by: Ryan Hirsch <Ryan.Hirsch@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"env": { | ||
"node": true, | ||
"commonjs": true | ||
}, | ||
"extends": [ | ||
"airbnb-base", | ||
"airbnb-typescript/base", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier", | ||
"plugin:prettier/recommended", | ||
"plugin:sonarjs/recommended", | ||
"plugin:jsdoc/recommended" | ||
], | ||
"parserOptions": { | ||
"project": "./tsconfig-eslint.json" | ||
}, | ||
"settings": { | ||
"import/parsers": { | ||
"@typescript-eslint/parser": [".ts"] | ||
}, | ||
"import/resolver": { | ||
"typescript": { | ||
"alwaysTryTypes": true, | ||
"project": "./" | ||
} | ||
} | ||
}, | ||
"plugins": ["jsdoc", "prettier"], | ||
"rules": { | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": true | ||
} | ||
], | ||
"no-underscore-dangle": "off", | ||
"@typescript-eslint/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_" | ||
} | ||
], | ||
"@typescript-eslint/explicit-function-return-type": "error", | ||
"no-plusplus": "off", | ||
"import/prefer-default-export": "off", | ||
"import/newline-after-import": "error", | ||
"import/order": [ | ||
"error", | ||
{ | ||
"newlines-between": "always" | ||
} | ||
], | ||
"no-return-await": "off", | ||
"no-await-in-loop": "off", | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": ["debug", "warn", "error"] | ||
} | ||
], | ||
"@typescript-eslint/no-use-before-define": "warn", | ||
"@typescript-eslint/return-await": ["error", "in-try-catch"], | ||
"jsdoc/require-param-type": 0, | ||
"jsdoc/require-returns-type": 0, | ||
"jsdoc/require-jsdoc": [ | ||
"error", | ||
{ | ||
"require": { | ||
"ArrowFunctionExpression": true, | ||
"ClassDeclaration": true, | ||
"ClassExpression": true, | ||
"FunctionDeclaration": true, | ||
"FunctionExpression": true, | ||
"MethodDefinition": true | ||
} | ||
} | ||
] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/*.test.ts", "test/*.ts", "test/**/*.ts"], | ||
"rules": { | ||
"sonarjs/no-duplicate-string": "off" | ||
} | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=lf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lint | ||
|
||
# This action works with pull requests and pushes | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: "yarn" | ||
|
||
- name: Install project dependencies | ||
run: yarn | ||
|
||
- name: Run All Lint Commands | ||
run: yarn run lint |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: "yarn" | ||
|
||
- name: Install project dependencies | ||
run: yarn | ||
|
||
- name: Run tests | ||
run: yarn run test:coverage |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,3 +263,4 @@ Network Trash Folder | |
Temporary Items | ||
.apdisk | ||
|
||
/test/test_output/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.gitlab-ci.yml | ||
.yarn | ||
yarn.lock | ||
dist | ||
node_modules | ||
coverage | ||
.pnp.loader.mjs | ||
.pnp.cjs | ||
test/test_files | ||
test/test_output | ||
.idea | ||
.vscode |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"tabWidth": 4, | ||
"printWidth": 120, | ||
"semi": false, | ||
"singleQuote": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"cSpell.words": [ | ||
"BUZZCAST", | ||
"LALALAND", | ||
"marlonrock", | ||
"WEBVTT" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Contributing | ||
|
||
Thank you for your interest in contributing to this project. | ||
|
||
## Issues/Feature Requests | ||
|
||
If you have encountered an issue or would like a feature to be added, please create a [GitHub Issue](https://github.com/stevencrader/transcriptator/issues) for the project. | ||
|
||
## Code Contributions | ||
|
||
Before making any changes or building the project locally, install [NodeJS 16.17.1](https://nodejs.org/) and [yarn 3.4.1](https://yarnpkg.com/getting-started/install) or newer. | ||
|
||
1. For this repository | ||
2. Clone the forked copy of the project | ||
3. Change to the project directory | ||
4. Before making changes, pull the latest changes from the upstream repo | ||
5. Create a new branch | ||
6. Make any changes | ||
7. Track changes | ||
8. Commit changes to branch | ||
9. Push changes to the forked project | ||
10. When all changes are complete, create a [Pull Request](https://github.com/stevencrader/transcriptator/pulls) to merge the changes to the `master` branch. | ||
|
||
- Add a title and description of the changes | ||
- If fixing an open Issue, reference the issue number using the GitHub syntax: `#2` | ||
- For a Pull Request to be accepted, all GitHub actions must pass. | ||
- Run the `lint-fix` script and resolve any issues. | ||
- Run the `test` script and resolve any failing tests. | ||
- If new features added, write new tests to cover the changes. | ||
- To get a coverage report run the `test:coverage` script |