@dineroregnskab/eslint-plugin-custom-rules 3.0.2 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +10 -11
- package/rules/enum-comparison-reminder.js +2 -2
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Run `npm i` in root and in `/example`.
|
|
|
22
22
|
|
|
23
23
|
- Add the new rule to this file `./eslint-plugin-custom-rules.js`.
|
|
24
24
|
|
|
25
|
-
- Add the new rule to `./example
|
|
25
|
+
- Add the new rule to `./example/eslint.config.mjs`
|
|
26
26
|
|
|
27
27
|
- Test the rule by adding some HTML/TS code here `./example/test.html` or `./example/test.ts` and restart the ESLint server in vs code by pressing F1 -> ESLint: Restart ESLint Server.
|
|
28
28
|
|
|
@@ -71,7 +71,7 @@ npm version {version_type} && npm publish
|
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
- In dinero.Frontend and/or dinero.Admin, update the root `package.json` file with the newly published version number.
|
|
74
|
-
- Locate the `eslintrc` file and add the new rule in the rules property (under `"files": ["*.html"]`, `"files": ["*.ts"]` etc. respectively).
|
|
74
|
+
- Locate the `eslintrc` or the newer `eslint.config.mjs` file and add the new rule in the rules property (under `"files": ["*.html"]`, `"files": ["*.ts"]` etc. respectively).
|
|
75
75
|
|
|
76
76
|
> **Note: The reference here must be in the format of the package name without "eslint-plugin" + rule name**
|
|
77
77
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dineroregnskab/eslint-plugin-custom-rules",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "ESLint plugin with custom rules for Dinero Regnskab",
|
|
5
5
|
"main": "eslint-plugin-custom-rules.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,21 +10,20 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@typescript-eslint/parser": "^
|
|
14
|
-
"eslint": "
|
|
15
|
-
"eslint-config-prettier": "^
|
|
16
|
-
"eslint-plugin-prettier": "^5.2.
|
|
17
|
-
"prettier": "^3.
|
|
13
|
+
"@typescript-eslint/parser": "^8.26.1",
|
|
14
|
+
"eslint": "^9.22.0",
|
|
15
|
+
"eslint-config-prettier": "^10.1.1",
|
|
16
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
17
|
+
"prettier": "^3.5.3",
|
|
18
|
+
"@angular-eslint/template-parser": "^19.2.1"
|
|
18
19
|
},
|
|
19
20
|
"peerDependencies": {
|
|
20
21
|
"eslint": ">=8.0.0",
|
|
21
|
-
"@typescript-eslint/parser": ">=7"
|
|
22
|
+
"@typescript-eslint/parser": ">=7",
|
|
23
|
+
"@angular-eslint/template-parser": ">=17"
|
|
22
24
|
},
|
|
23
25
|
"files": [
|
|
24
26
|
"**/*",
|
|
25
27
|
"!example/**/*"
|
|
26
|
-
]
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@angular-eslint/template-parser": "17.5.3"
|
|
29
|
-
}
|
|
28
|
+
]
|
|
30
29
|
}
|
|
@@ -2,11 +2,11 @@ module.exports = {
|
|
|
2
2
|
meta: {
|
|
3
3
|
type: "suggestion",
|
|
4
4
|
docs: {
|
|
5
|
-
description: "Reminder to convert backend data to
|
|
5
|
+
description: "Reminder to convert backend data to lowercase when enum comparisons are made.",
|
|
6
6
|
},
|
|
7
7
|
schema: [],
|
|
8
8
|
messages: {
|
|
9
|
-
enumComparisonTip: "Remember '{{property}}' should be converted to
|
|
9
|
+
enumComparisonTip: "Remember '{{property}}' should be converted to lowercase in the model class if the data is from a HTTP response, to ensure a valid comparison."
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
create(context) {
|