The invention relates to an SVN and JSHint integrated code detection method and system. The method includes the steps that a developer commits a source code to an SVN server; an SVN hook pre-commit is triggered; a version repository transmits corresponding parameters to the hook program, the hook program executes and calls a Nodejs module and runs JSHint instruction steps; the Nodejs module feeds a detection structure back to the SVN hook; the SVN hook determines whether to allow code commission or obstruct code commission according to the returned result, gives a detection result and informs the developer of the result, and if the SVN hook obstructs code commission, the developer carries out code modification until code commission. According to the SVN and JSHint integrated code detection method and system, by integrating an SVN version management tool and a JavaScript code detection tool JSHint, the system can automatically carry out code filtration, acquire a JavaScript file, carry out analysis and detection and inform the developer of the detection result rapidly when the developer commits the source code through SVN, the version commission JavaScript code quality is effectively improved, code standards are unified, and the software source core development quality and team development efficiency of software engineering are improved.