This repository was archived by the owner on Aug 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 17
17
"dependencies" : {
18
18
"atom-languageclient" : " ^0.6.3"
19
19
},
20
+ "devDependencies" : {
21
+ "snazzy" : " ^7.0.0" ,
22
+ "standard" : " ^10.0.3"
23
+ },
24
+ "standard" : {
25
+ "globals" : [
26
+ " afterEach" ,
27
+ " atom" ,
28
+ " beforeEach" ,
29
+ " describe" ,
30
+ " expect" ,
31
+ " it" ,
32
+ " jasmine" ,
33
+ " runs" ,
34
+ " spyOn" ,
35
+ " waitsFor" ,
36
+ " waitsForPromise"
37
+ ]
38
+ },
20
39
"enhancedScopes" : [
21
40
" source.c" ,
22
41
" source.cpp"
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Exit on failure, and treat expansion of unset variables as an error.
4
+ set -eu
5
+
6
+ lint () {
7
+ local npm_bin=$( npm bin )
8
+ local paths=" $1 "
9
+
10
+ " ${npm_bin} /standard" --verbose " ${paths} " | " ${npm_bin} /snazzy"
11
+ }
12
+
13
+ main () {
14
+ local script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd -P ) "
15
+ local source_dir=$( dirname " ${script_dir} " )
16
+
17
+ local -i status=0
18
+ echo " Linting package..." && lint " ${source_dir} /lib/**/*.js" || status=$?
19
+ echo " Linting package specs..." && lint " ${source_dir} /spec/**/*.js" || status=$?
20
+ return ${status}
21
+ }
22
+
23
+ main " $@ "
You can’t perform that action at this time.
0 commit comments