Skip to content

Commit bce9675

Browse files
committed
feat(docs), feat(ci): minor project config
1 parent cbf6704 commit bce9675

File tree

4 files changed

+26
-19
lines changed

4 files changed

+26
-19
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-latest
66
strategy:
77
matrix:
8-
node: [ '12', '14', '16' ]
8+
node: [ '14', '16', '18' ]
99
name: Node ${{ matrix.node }} sample
1010
steps:
1111
- uses: actions/checkout@v2

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
![Tests](https://github.com/monade/eslint-plugin-angular/actions/workflows/test.yml/badge.svg)
2+
[![npm version](https://badge.fury.io/js/@monade%2Feslint-plugin-angular.svg)](https://badge.fury.io/js/@monade%2Feslint-plugin-angular)
3+
14
# @monade/eslint-plugin-angular
25
A couple of quality-of-life eslint rules for Angular components.
36

@@ -30,10 +33,13 @@ Add to your .eslint.js:
3033

3134
## TODO:
3235
* Document rules
33-
* When strategy is OnPush, show an error if there's a non-scalar property that is not ReadOnly<>
36+
* [Rule] When strategy is OnPush, show an error if there's a non-scalar property that is not ReadOnly<>
37+
* [Rule] Component too long
38+
* [Rule] Suggest strategy OnPush when the component is in the "components" folder
39+
* [Rule] ADVANCED: Check if there's a reactivity bug with changeDetection: OnPush
3440

35-
## Debugging
36-
You can use an AST view tool
41+
## Contributing
42+
You can use an AST view tool to debug the structure of some code parts:
3743
* For Javascript: https://astexplorer.net/
3844
* For Typescript: https://ts-ast-viewer.com/
3945

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": "@monade/eslint-plugin-angular",
3-
"version": "1.0.0",
4-
"description": "A couple of rules for eslint + angular",
5-
"main": "src/index.js",
6-
"scripts": {
7-
"test": "mocha"
8-
},
9-
"author": "Mònade",
10-
"license": "MIT",
11-
"devDependencies": {
12-
"@typescript-eslint/parser": "^5.35.1",
13-
"eslint": "^8.22.0",
14-
"mocha": "^10.0.0",
15-
"typescript": "^4.7.4"
16-
}
2+
"name": "@monade/eslint-plugin-angular",
3+
"version": "0.1.0",
4+
"description": "A couple of quality-of-life rules for eslint + angular",
5+
"main": "src/index.js",
6+
"scripts": {
7+
"test": "mocha"
8+
},
9+
"author": "Mònade",
10+
"license": "MIT",
11+
"devDependencies": {
12+
"@typescript-eslint/parser": "^5.35.1",
13+
"eslint": "^8.22.0",
14+
"mocha": "^10.0.0",
15+
"typescript": "^4.7.4"
16+
}
1717
}

src/rules/strategy-onpush.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module.exports = {
2929
return;
3030
}
3131

32+
/** @type {import('estree').MethodDefinition} */
3233
const constructor = node.body.body.find(
3334
(e) => e.kind === "constructor"
3435
);

0 commit comments

Comments
 (0)