diff --git a/.eslintrc.js b/.eslintrc.js index a5873c24a6..9d57b278ff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,8 @@ module.exports = { }, extends: 'standard', plugins: [ - 'html' + 'html', + 'jest' ], 'globals': { 'wx': false, @@ -22,6 +23,9 @@ module.exports = { }, rules: { 'no-cond-assign': 0, - "camelcase": ['error', {'allow': ['__mpx_mode__', '__swan_exports_map__']}] + 'camelcase': ['error', {'allow': ['__mpx_mode__', '__swan_exports_map__']}] + }, + env: { + 'jest/globals': true } } diff --git a/package.json b/package.json index 480b4d6148..f5ca71ad03 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,13 @@ "eslint-friendly-formatter": "^4.0.1", "eslint-plugin-html": "^5.0.0", "eslint-plugin-import": "^2.14.0", + "eslint-plugin-jest": "^22.5.1", "eslint-plugin-local-rules": "^0.1.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^2.6.2", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", + "jest": "^24.8.0", "lerna": "^3.4.3" } }