Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>
After years of development, easyplayer project has been verified in many projects. Easyplayer.js is a video streaming player that supports integration into web pages. In addition, all players of easyplayer project support secondary development
Some time ago, we were testing the deployment of easyplayer. JS in GitHub( https://github.com/tsingsee/EasyPlayer.js )Download the legacy branch. Open the local deployment environment directly in the browser, and the error prompt “error: no eslint configuration found” will appear, resulting in the construction failure
We searched the cause of the problem, online analysis is the lack of. Eslintrc. JS file in the project. Because some hidden files cannot be copied, such as. Eslintrc. JS
If the cause of the problem is known, create a new. Eslintrc. JS file in the project
Add the following code to the. Eslintrc. JS file to endow the file with complete content:
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ?'error' : 'off'
}
}
The deployment effect is as follows:
After the construction of the player in the figure above is completed, the video stream can be played normally by passing in the correct playing address as required
Similar Posts:
- Expected indentation of 8 spaces but found [How to Solve]
- Easyplayer player displays the cause and solution of compileerror: webassembly. Instance()
- How to Solve Eslint syntax error in Vue project
- Git Error: The requested URL returned error: 403 Forbidden while accessing
- Easygbs runs with an error of too many open files and cannot play the video stream. How to adjust?
- [Solved] ESLint Error: Failed to load config “standard” to extend from
- [Solved] Vue3+ts+eslint Error: warning Unexpected any. Specify a different type, warning Delete `·` , Missing return type on function, Require statement not part of import statement
- [Solved] ESLint: ‘React’ was used before it was defined.(no-use-before-define)
- this.sanitizer.bypassSecurityTrustResourceUrl(url) & WARNING: sanitizing unsafe style value url
- Failed to install APK, error code: install_ FAILED_ INVALID_ Apk solution