Skip to content

Commit

Permalink
chore: enable eslint for loopback-next monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed May 28, 2019
1 parent a6abe86 commit 10259b2
Show file tree
Hide file tree
Showing 10 changed files with 904 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
dist/
coverage/
api-docs/
/sandbox
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['./packages/eslint-config/eslintrc.js'],
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ matrix:
env: TASK=code-lint
# Running Code Linter -- Requires @loopback/build so it's bootstrapped
script:
- lerna bootstrap --scope @loopback/build --scope @loopback/tslint-config
- lerna bootstrap --scope @loopback/build --scope @loopback/tslint-config --scope @loopback/eslint-config
- npm run lint
- node_js: "8"
os: linux
Expand Down
3 changes: 3 additions & 0 deletions bin/check-package-locks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const fs = require('fs');
const promisify = require('util').promisify;

const readFile = promisify(fs.readFile);
const exists = promisify(fs.exists);

const Project = require('@lerna/project');

Expand Down Expand Up @@ -58,6 +59,8 @@ if (require.main === module) {
}

async function checkLockFile(lockFile) {
const found = await exists(lockFile);
if (!found) return [];
const data = JSON.parse(await readFile(lockFile, 'utf-8'));
return Object.keys(data.dependencies || []).filter(dep =>
dep.startsWith('@loopback/'),
Expand Down
Loading

0 comments on commit 10259b2

Please sign in to comment.