| # Copyright 2019 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| def Run(os_path=None, args=None): |
| _HERE_PATH = os_path.dirname(os_path.realpath(__file__)) |
| _SRC_PATH = os_path.normpath(os_path.join(_HERE_PATH, '..', '..')) |
| old_sys_path = sys.path[:] |
| sys.path.append(os_path.join(_SRC_PATH, 'third_party', 'node')) |
| import node, node_modules |
| return node.RunNode([node_modules.PathToEsLint()] + args) |
| if __name__ == '__main__': |
| Run(os_path=os.path, args=sys.argv[1:]) |