Skip to content

Commit

Permalink
Merge branch 'main' into vtt-extranewlines
Browse files Browse the repository at this point in the history
  • Loading branch information
bloomtom authored Jan 27, 2023
2 parents 9755442 + 7c4ed53 commit 42218d0
Show file tree
Hide file tree
Showing 1,792 changed files with 104,396 additions and 27,352 deletions.
15 changes: 13 additions & 2 deletions .csslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
{
"extends": "stylelint-config-standard",
"customSyntax": "postcss-less",
"rules": {
"font-family-no-missing-generic-family-keyword": null,
"declaration-block-single-line-max-declarations": null,
"max-line-length": [ 80, {
"declaration-empty-line-before": null,
"max-line-length": [80, {
ignorePattern: "/^@import\\s+/",
}],
"function-no-unknown": [true, {
ignoreFunctions: [
"data-uri",
"lighten",
"percentage",
],
}],
"property-no-vendor-prefix": null,
"selector-list-comma-newline-after": "always-multi-line",
"selector-no-vendor-prefix": null,
"selector-pseudo-element-colon-notation": "single",
"unit-whitelist": ["em", "%", "px", "s", "deg", "vmin", "ms", "vh"]
"unit-allowed-list": ["em", "%", "px", "s", "deg", "vmin", "ms", "vh"]
}
}
60 changes: 47 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// vim: foldmethod=marker:foldmarker={{{,}}}
/** @license
/*! @license
* Shaka Player
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -28,8 +29,9 @@ const commonNoRestrictedSyntax = [
'message': 'Use for-of instead of forEach',
},
{
'selector': 'CallExpression[callee.property.name=/^(bind|call|apply)$/]',
'message': 'Don\'t use Function bind/call/apply.',
// NOTE: prefer-spread rule covers .apply() already.
'selector': 'CallExpression[callee.property.name=/^(bind|call)$/]',
'message': 'Don\'t use Function bind/call.',
},
{
'selector': 'MemberExpression[property.name="prototype"]',
Expand Down Expand Up @@ -76,19 +78,15 @@ module.exports = {
'no-shadow': 'off',
// }}}

// Temporary Google style overrides while we get in compliance with the
// latest style guide {{{
'prefer-spread': 'off',
'require-jsdoc': 'off',
// }}}

// "Possible error" rules: {{{
'no-async-promise-executor': 'error',
'no-await-in-loop': 'error',
'no-empty': ['error', {'allowEmptyCatch': true}],
'no-misleading-character-class': 'error',
'no-template-curly-in-string': 'error',
'require-atomic-updates': 'error',
// TODO: Try to re-enable this if possible. Right now, it produces way too
// many false-positives with eslint 7. It worked well enough in eslint 5.
// 'require-atomic-updates': 'error',
// }}}

// "Best practices" rules: {{{
Expand Down Expand Up @@ -153,7 +151,7 @@ module.exports = {
'array-bracket-newline': ['error', 'consistent'],
'block-spacing': ['error', 'always'],
'brace-style': ['error', '1tbs', {'allowSingleLine': true}],
'id-blacklist': ['error', 'async'],
'id-denylist': ['error', 'async'],
'lines-between-class-members': 'error',
'max-statements-per-line': ['error', {'max': 1}],
'new-parens': 'error',
Expand All @@ -170,6 +168,20 @@ module.exports = {
'no-whitespace-before-property': 'error',
'nonblock-statement-body-position': ['error', 'below'],
'operator-assignment': 'error',
'spaced-comment': ['error', 'always', {
// Characters which may be glued to the start of a comment block, but
// which do not violate the rule. The "*" is for jsdoc's "/**" syntax,
// and the "!" is for the "/*!" of license headers which are passed
// verbatim through the compiler.
'markers': ['*', '!'],
}],
'require-jsdoc': ['error', {
'require': {
'FunctionDeclaration': true,
'MethodDefinition': true,
'ClassDeclaration': true,
},
}],
// }}}

// "ECMAScript 6" rules: {{{
Expand Down Expand Up @@ -201,7 +213,7 @@ module.exports = {
},
{
'selector': 'CatchClause',
'message': 'Use expect.toFail or expectAsync.toBeRejected',
'message': 'Use expect.toThrow or expectAsync.toBeRejected',
},
{
'selector': 'CallExpression[callee.name=expect] >' +
Expand Down Expand Up @@ -264,12 +276,34 @@ module.exports = {
],
},
{
'files': ['externs/*', 'externs/shaka/*'],
'rules': {
// Disable rules on useless constructors so we can use ES6 classes in
// externs.
'no-useless-constructor': 'off',
},
'files': ['externs/**/*.js'],
},
{
'rules': {
// JSDoc is not strictly required in externs, tests, and in load.js.
'require-jsdoc': 'off',
},
'files': [
'demo/load.js',
'externs/**/*.js',
'test/**/*.js',
],
},
{
'rules': {
// Externs naturally redeclare things eslint knows about.
'no-redeclare': 'off',
},
'files': [
'ui/externs/*.js',
'externs/**/*.js',
'test/test/externs/*.js',
],
},
],
};
12 changes: 10 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Report a bug to help us improve
title: ''
labels: ''
labels: 'type: bug'
assignees: ''

---
Expand All @@ -18,7 +18,7 @@ assignees: ''
**Can you reproduce the issue with our latest release version?**


**Can you reproduce the issue with the latest code from `master`?**
**Can you reproduce the issue with the latest code from `main`?**


**Are you using the demo app or your own custom app?**
Expand All @@ -44,6 +44,14 @@ assignees: ''
-->


**What configuration are you using? What is the output of `player.getConfiguration()`?**
<!-- NOTE:
You can censor URLs to keep them private, but include them in the email. You
can also use JSON.stringify(obj, null, 2) to print nicely on platforms that
don't print objects well in the console. DON'T SEND '[object Object]'!
-->


**What did you do?**
<!-- Steps to reproduce the bug -->

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: 'type: enhancement'
assignees: ''

---
Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Question
about: An open-ended question or discussion about Shaka Player, but not a bug report
or feature request
title: ''
labels: question
labels: 'type: question'
assignees: ''

---
Expand All @@ -14,6 +14,9 @@ assignees: ''
If you want to know whether we will support a feature, please file the feature request template instead.
-->

**Have you read the [Tutorials](http://shaka-player-demo.appspot.com/docs/api/tutorial-welcome.html)?**


**Have you read the [FAQ](https://bit.ly/ShakaFAQ) and checked for duplicate open issues?**


Expand Down
1 change: 1 addition & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
Loading

0 comments on commit 42218d0

Please sign in to comment.