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

Add linter #382

Merged
merged 1 commit into from
Jul 25, 2022
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
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,29 @@ $ meteor npm run setup # create link to packages

This has to be done only once.

#### Run the linter

We use eslint with the [quave config](https://github.com/quavedev/eslint-config), which is also used
by the Meteor core project.

Due to the fact, that this repo consists of multiple packages, you should run the linter for single packages
like so:

```bash
$ cd test-app
$ meteor npm run lint:check -- ./packages/templating-compiler
```

If you need to lint other packages, use `.packages/<nameOfPackage>` or use `./packages/` to lint all packages.
Beware, however, that this might take a while to lint all packages.

The same goes for autofixing common lint errors:

```bash
$ cd test-app
$ meteor npm run lint:check -- ./packages/templating-compiler
```

#### Run the tests

Simply execute the test script:
Expand Down
10 changes: 10 additions & 0 deletions test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"scripts": {
"start": "meteor run",
"setup": "ln -sfn ../packages ./packages",
"lint:check": "npx eslint",
"lint:fix": "npm run eslint --fix",
"test:watch": "meteor test-packages --raw-logs ./packages/*",
"test:ci": "ci.sh"
},
Expand All @@ -17,5 +19,13 @@
"jquery": "^3.6.0",
"meteor-node-stubs": "^1.2.1",
"puppeteer": "^10.4.0"
},
"devDependencies": {
"@quave/eslint-config-quave": "^1.0.7"
},
"eslintConfig": {
"extends": [
"@quave/quave"
]
}
}