Lint spec js files
This commit is contained in:
parent
0a3331a07c
commit
756f8039e5
2 changed files with 18 additions and 2 deletions
|
@ -16,9 +16,15 @@ def main():
|
|||
eslint = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'eslint')
|
||||
if sys.platform in ['win32', 'cygwin']:
|
||||
eslint += '.cmd'
|
||||
settings = ['--quiet', '--config', os.path.join('script', 'eslintrc.json')]
|
||||
settings = ['--quiet', '--config']
|
||||
|
||||
execute([eslint] + settings + ['atom'])
|
||||
sourceConfig = os.path.join('script', 'eslintrc-src.json')
|
||||
sourceFiles = glob.glob('atom/**/*.js')
|
||||
execute([eslint] + settings + [sourceConfig] + sourceFiles)
|
||||
|
||||
specConfig = os.path.join('script', 'eslintrc-spec.json')
|
||||
specFiles = glob.glob('spec/*.js')
|
||||
execute([eslint] + settings + [specConfig] + specFiles)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
10
script/eslintrc-spec.json
Normal file
10
script/eslintrc-spec.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"rules": {
|
||||
"no-empty": 0
|
||||
},
|
||||
"env": {
|
||||
"jquery": true,
|
||||
"mocha": true
|
||||
},
|
||||
"extends": "./eslintrc-src.json"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue