-
Notifications
You must be signed in to change notification settings - Fork 3
/
Linter-SimplyLint.xml
54 lines (52 loc) · 1.92 KB
/
Linter-SimplyLint.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0"?>
<!--
/**
* @license https://raw.githubusercontent.com/andkirby/commithook/master/LICENSE.md
*/
-->
<!--Example of config how to use SimplyLint validator in example with JsHint-->
<config>
<code>
<interpreter>
<node>path/to/node.exe</node>
</interpreter>
</code>
<!--Validators setup-->
<validators>
<Linter-SimplyLint>
<!--Files extension which should be applied by this linter-->
<!--Internal config nodes are the same like in linter JsHint for example-->
<!--so it's needed just this configuration for JS files-->
<js>
<execution>
<!--Interpreter type. Used to get config by XPath code/interpreter/TYPE-->
<interpreter_type>node</interpreter_type>
<!--Path to executable file of JSHint file which should be interpreted by the interpreter-->
<linter>d:/s/jshint/bin/jshint</linter>
<!--Command which will be executed to run linter-->
<command>%interpreter% %linter% --config "%config%" %file%</command>
</execution>
<config>
<file>
<predefined>
<default>path/to/jshint/config.json</default>
<jshintrc>PROJECT_DIR/.jshintrc</jshintrc>
<packages>PROJECT_DIR/packages.json</packages>
</predefined>
</file>
</config>
</js>
</Linter-SimplyLint>
</validators>
<hooks>
<pre-commit>
<filetype>
<js>
<validators>
<Linter-SimplyLint>1</Linter-SimplyLint>
</validators>
</js>
</filetype>
</pre-commit>
</hooks>
</config>