diff --git a/.eslintrc.js b/.eslintrc.js index fdb7a3d1..8e528b55 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -57,6 +57,11 @@ module.exports = { react: { version: '16', }, - 'import/core-modules': ['griffith', 'griffith-mp4'], + 'import/core-modules': [ + 'griffith', + 'griffith-mp4', + 'griffith-utils', + 'griffith-message', + ], }, } diff --git a/.travis.yml b/.travis.yml index 34ce1802..e6975fe8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,12 @@ language: node_js node_js: - - 8 - 10 script: - - yarn run build - - yarn run lint - yarn run format + - yarn run lint + - yarn run build - yarn run test:coverage after_success: @@ -19,4 +18,4 @@ notifications: cache: yarn: true directories: - - "node_modules" + - 'node_modules' diff --git a/package.json b/package.json index decab40a..7ceebffc 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "zhihu-video-player" ], "scripts": { - "format": "prettier \"packages/**/*.{js,json,md}\" \"*.{js,json,md}\"", + "format": "prettier --check \"packages/**/*.{js,json,md}\" \"*.{js,json,md}\"", "format:fix": "prettier --write \"packages/**/*.{js,json,md}\" \"*.{js,json,md}\"", "lint": "eslint 'packages/*/src/**/*.js' '*.js'", "test": "jest", diff --git a/packages/griffith-standalone/package.json b/packages/griffith-standalone/package.json index 354e2ea7..4fd28211 100644 --- a/packages/griffith-standalone/package.json +++ b/packages/griffith-standalone/package.json @@ -14,6 +14,7 @@ "build": "webpack -p" }, "devDependencies": { + "babel-loader": "^8.0.5", "griffith": "^1.4.4", "react": "16.4.2", "react-dom": "16.4.2", diff --git a/yarn.lock b/yarn.lock index 5eb04070..4afccaf0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2287,7 +2287,7 @@ babel-jest@^24.6.0: chalk "^2.4.2" slash "^2.0.0" -babel-loader@^8.0.4: +babel-loader@^8.0.4, babel-loader@^8.0.5: version "8.0.5" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.5.tgz#225322d7509c2157655840bba52e46b6c2f2fe33" integrity sha512-NTnHnVRd2JnRqPC0vW+iOQWU5pchDbYXsG2E6DMXEpMfUcQKclF9gmf3G3ZMhzG7IG9ji4coL0cm+FxeWxDpnw==