2 Star 6 Fork 1

github_mirrors / hls.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 2.39 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
},
globals: {
// Allowed globals
console: true,
// Compile-time defines
__VERSION__: true,
__USE_SUBTITLES__: true,
__USE_ALT_AUDIO__: true,
__USE_EME_DRM__: true,
__USE_CMCD__: true,
__USE_CONTENT_STEERING__: true,
__USE_VARIABLE_SUBSTITUTION__: true,
__USE_M2TS_ADVANCED_CODECS__: true,
},
// see https://github.com/standard/eslint-config-standard
// 'prettier' (https://github.com/prettier/eslint-config-prettier) must be last
extends: ['eslint:recommended', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'import'],
rules: {
'no-restricted-globals': [
2,
{
name: 'window',
message:
'Use `self` instead of `window` to access the global context everywhere (including workers).',
},
{
name: 'SourceBuffer',
message: 'Use `self.SourceBuffer`',
},
{
name: 'setTimeout',
message: 'Use `self.setTimeout`',
},
{
name: 'setInterval',
message: 'Use `self.setInterval`',
},
],
'no-restricted-properties': [
2,
{ property: 'findIndex' }, // Intended to block usage of Array.prototype.findIndex
{ property: 'find' }, // Intended to block usage of Array.prototype.find
],
'import/first': 1,
'no-var': 1,
'no-empty': 1,
'no-unused-vars': 'warn',
'no-console': [
1,
{
allow: ['assert'],
},
],
'no-fallthrough': 1,
'no-case-declarations': 2,
'no-self-assign': 1,
'new-cap': 1,
'no-undefined': 0,
'no-global-assign': 2,
'prefer-const': 2,
'dot-notation': 2,
'no-void': 2,
'no-useless-catch': 2,
'no-prototype-builtins': 0,
},
overrides: [
{
files: ['*.ts'],
rules: {
'no-unused-vars': 0,
'no-undef': 0,
'no-use-before-define': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
args: 'none',
},
],
'@typescript-eslint/prefer-optional-chain': 2,
'@typescript-eslint/consistent-type-assertions': [
2,
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'never',
},
],
},
},
],
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/github_mirrors/hls.js.git
git@gitee.com:github_mirrors/hls.js.git
github_mirrors
hls.js
hls.js
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891