Skip to content

Commit fa39abb

Browse files
authored
Merge pull request #382 from meteor/feature-add-linter
2 parents ad5c7a8 + a0d17ab commit fa39abb

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

CONTRIBUTING.md

+23
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,29 @@ $ meteor npm run setup # create link to packages
5050

5151
This has to be done only once.
5252

53+
#### Run the linter
54+
55+
We use eslint with the [quave config](https://github.com/quavedev/eslint-config), which is also used
56+
by the Meteor core project.
57+
58+
Due to the fact, that this repo consists of multiple packages, you should run the linter for single packages
59+
like so:
60+
61+
```bash
62+
$ cd test-app
63+
$ meteor npm run lint:check -- ./packages/templating-compiler
64+
```
65+
66+
If you need to lint other packages, use `.packages/<nameOfPackage>` or use `./packages/` to lint all packages.
67+
Beware, however, that this might take a while to lint all packages.
68+
69+
The same goes for autofixing common lint errors:
70+
71+
```bash
72+
$ cd test-app
73+
$ meteor npm run lint:check -- ./packages/templating-compiler
74+
```
75+
5376
#### Run the tests
5477

5578
Simply execute the test script:

test-app/package.json

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"scripts": {
99
"start": "meteor run",
1010
"setup": "ln -sfn ../packages ./packages",
11+
"lint:check": "npx eslint",
12+
"lint:fix": "npm run eslint --fix",
1113
"test:watch": "meteor test-packages --raw-logs ./packages/*",
1214
"test:ci": "ci.sh"
1315
},
@@ -17,5 +19,13 @@
1719
"jquery": "^3.6.0",
1820
"meteor-node-stubs": "^1.2.1",
1921
"puppeteer": "^10.4.0"
22+
},
23+
"devDependencies": {
24+
"@quave/eslint-config-quave": "^1.0.7"
25+
},
26+
"eslintConfig": {
27+
"extends": [
28+
"@quave/quave"
29+
]
2030
}
2131
}

0 commit comments

Comments
 (0)