forked from leon-ai/leon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlint.js
More file actions
35 lines (30 loc) 路 732 Bytes
/
Copy pathlint.js
File metadata and controls
35 lines (30 loc) 路 732 Bytes
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
import { shell } from 'execa'
import log from '@/helpers/log'
import loader from '@/helpers/loader';
/**
* This script ensures the correct coding syntax of the whole project
*/
(async () => {
loader.start()
log.info('Linting...')
try {
const globs = [
'"app/**/*.es6.js"',
'"hotword/index.js"',
'"packages/**/*.js"',
'"scripts/**/*.js"',
'"server/src/**/*.js"',
'"test/*.js"',
'"test/e2e/**/*.js"',
'"test/json/**/*.js"',
'"test/unit/**/*.js"'
]
await shell(`npx eslint ${globs.join(' ')}`)
log.success('Looks great')
loader.stop()
} catch (e) {
log.error(`Does not look great: ${e.stdout}`)
loader.stop()
process.exit(1)
}
})()