| * Copyright 2020 Google LLC |
| * SPDX-License-Identifier: Apache-2.0 |
| // This file has a special settings for bazel. |
| // The settings is required because bazel uses different location |
| function getBazelSettings() { |
| const runFilesDir = process.env['RUNFILES_DIR']; |
| // eslint is executed with 'bazel run ...' to fix the source code. It runs |
| // against real source code, no special paths for node_modules is set. |
| // eslint is executed with 'bazel test...'. Set path to required node_modules |
| `${runFilesDir}/ui_npm/node_modules`, |
| `${runFilesDir}/ui_dev_npm/node_modules`, |
| extends: './.eslintrc.js', |
| settings: getBazelSettings(), |