mirror of
https://github.com/electron/electron.git
synced 2026-01-23 06:18:17 -05:00
Lint spec js files
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user