Browse Source

replace eslint with standard

Zeke Sikelianos 9 years ago
parent
commit
e156faea5c
4 changed files with 1 additions and 80 deletions
  1. 1 1
      package.json
  2. 0 36
      script/eslint.py
  3. 0 36
      script/eslintrc-base.json
  4. 0 7
      script/eslintrc-spec.json

+ 1 - 1
package.json

@@ -29,7 +29,7 @@
   "scripts": {
     "bootstrap": "python ./script/bootstrap.py",
     "build": "python ./script/build.py -c D",
-    "lint": "python ./script/eslint.py && python ./script/cpplint.py",
+    "lint": "standard && python ./script/cpplint.py",
     "preinstall": "node -e 'process.exit(0)'",
     "repl": "python ./script/start.py --interactive",
     "start": "python ./script/start.py",

+ 0 - 36
script/eslint.py

@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-
-import glob
-import os
-import sys
-
-from lib.config import PLATFORM
-from lib.util import execute
-
-
-SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
-
-
-def main():
-  os.chdir(SOURCE_ROOT)
-
-  # Skip eslint on our Windows build machine for now.
-  if PLATFORM == 'win32' and os.getenv('JANKY_SHA1'):
-    return
-
-  eslint = os.path.join(SOURCE_ROOT, 'node_modules', '.bin', 'eslint')
-  if sys.platform in ['win32', 'cygwin']:
-    eslint += '.cmd'
-  settings = ['--quiet', '--config']
-
-  sourceConfig = os.path.join('script', 'eslintrc-base.json')
-  sourceFiles = ['lib']
-  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__':
-  sys.exit(main())

+ 0 - 36
script/eslintrc-base.json

@@ -1,36 +0,0 @@
-{
-  "rules": {
-    "indent": [
-      2,
-      2,
-      {
-        "SwitchCase": 1
-      }
-    ],
-    "quotes": [
-      0,
-      "single"
-    ],
-    "semi": [
-      2,
-      "always"
-    ],
-    "comma-dangle": 0,
-    "linebreak-style": 0,
-    "no-console": 0,
-    "no-undef": 2,
-    "no-unused-vars": 2
-  },
-  "env": {
-    "es6": true,
-    "node": true,
-    "browser": true
-  },
-  "extends": "eslint:recommended",
-  "globals": {
-    "DevToolsAPI": false,
-    "InspectorFrontendHost": false,
-    "WebInspector": false,
-    "WebView": false
-  }
-}

+ 0 - 7
script/eslintrc-spec.json

@@ -1,7 +0,0 @@
-{
-  "env": {
-    "jquery": true,
-    "mocha": true
-  },
-  "extends": "./eslintrc-base.json"
-}