neatlint 1.1.27 → 1.2.0

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 CHANGED
@@ -48,9 +48,10 @@ Strict ESLint presets for modern TypeScript projects.
48
48
  ## Features
49
49
 
50
50
  - Enforces type safety
51
+ - Prohibits potentially unsafe patterns
51
52
  - Encourages modern syntax
52
53
  - Encourages the use of arrow functions
53
- - Prohibits potentially unsafe patterns
54
+ - Encourages the use of try/catch
54
55
  - Bans `var` and warns about proper use of `const` and `let`
55
56
  - Disallows interfaces, using only types
56
57
  - Requires explicit readonly and accessibility modifiers in classes
package/dist/main.js CHANGED
@@ -91,6 +91,14 @@ var javascript_rules = {
91
91
  selector: "CallExpression[callee.property.name='join'][callee.object.callee.property.name='split']",
92
92
  message: "Use `.replaceAll()` instead."
93
93
  },
94
+ {
95
+ selector: "CallExpression[callee.property.name='then']",
96
+ message: "Use try/catch instead."
97
+ },
98
+ {
99
+ selector: "CallExpression[callee.property.name='catch']",
100
+ message: "Use try/catch instead."
101
+ },
94
102
  {
95
103
  selector: "SwitchStatement",
96
104
  message: "Use if/else instead."
package/dist/main.mjs CHANGED
@@ -55,6 +55,14 @@ var javascript_rules = {
55
55
  selector: "CallExpression[callee.property.name='join'][callee.object.callee.property.name='split']",
56
56
  message: "Use `.replaceAll()` instead."
57
57
  },
58
+ {
59
+ selector: "CallExpression[callee.property.name='then']",
60
+ message: "Use try/catch instead."
61
+ },
62
+ {
63
+ selector: "CallExpression[callee.property.name='catch']",
64
+ message: "Use try/catch instead."
65
+ },
58
66
  {
59
67
  selector: "SwitchStatement",
60
68
  message: "Use if/else instead."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neatlint",
3
- "version": "1.1.27",
3
+ "version": "1.2.0",
4
4
  "description": "Strict ESLint presets for modern TypeScript projects.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/keift/neatlint",