Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): add eslint scripts and default configs #2572

Merged
merged 2 commits into from
May 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ packages/http-server/* @hacksparrow @bajtos
packages/cli/* @raymondfeng @bajtos
packages/context/* @bajtos @raymondfeng
packages/core/* @bajtos @raymondfeng
packages/eslint-config/* @raymondfeng
packages/metadata/* @raymondfeng
packages/openapi-spec-builder/* @bajtos @raymondfeng
packages/openapi-v3/* @bajtos @jannyHou
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
1 change: 1 addition & 0 deletions docs/site/MONOREPO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The [loopback-next](https://github.com/strongloop/loopback-next) repository uses
| [context](https://github.com/strongloop/loopback-next/tree/master/packages/context) | @loopback/context | Facilities to manage artifacts and their dependencies in your Node.js applications. The module exposes TypeScript/JavaScript APIs and decorators to register artifacts, declare dependencies, and resolve artifacts by keys. It also serves as an IoC container to support dependency injection. |
| [core](https://github.com/strongloop/loopback-next/tree/master/packages/core) | @loopback/core | Define and implement core constructs such as Application and Component |
| [docs](https://github.com/strongloop/loopback-next/tree/master/docs) | @loopback/docs | Documentation files rendered at [https://loopback.io](https://loopback.io) |
| [eslint-config](https://github.com/strongloop/loopback-next/tree/master/packages/eslint-config) | @loopback/eslint-config | ESLint configuration for LoopBack projects |
| [example-express-composition](https://github.com/strongloop/loopback-next/tree/master/examples/express-composition) | @loopback/example-express-composition | A simple Express application that uses LoopBack 4 REST API |
| [example-greeter-extension](https://github.com/strongloop/loopback-next/tree/master/examples/greeter-extension) | @loopback/example-greeter-extension | An example showing how to implement the extension point/extension pattern using LoopBack 4 |
| [example-hello-world](https://github.com/strongloop/loopback-next/tree/master/examples/hello-world) | @loopback/example-hello-world | A simple hello-world application using LoopBack 4 |
Expand Down
1 change: 1 addition & 0 deletions greenkeeper.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"packages/cli/package.json",
"packages/context/package.json",
"packages/core/package.json",
"packages/eslint-config/package.json",
raymondfeng marked this conversation as resolved.
Show resolved Hide resolved
"packages/http-caching-proxy/package.json",
"packages/http-server/package.json",
"packages/metadata/package.json",
Expand Down
Loading