Skip to content

Commit

Permalink
Merge pull request #382 from meteor/feature-add-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jankapunkt authored Jul 25, 2022
2 parents ad5c7a8 + a0d17ab commit fa39abb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
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"
]
}
}

0 comments on commit fa39abb

Please sign in to comment.