@dfinity/eslint-config-oisy-wallet 0.1.13 → 0.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
@@ -84,9 +84,9 @@ module.exports = require("@dfinity/eslint-config-oisy-wallet/eslint-local-rules"
84
84
  > [!NOTE]
85
85
  > This is necessary because the `eslint-plugin-local-rules` plugin we use for custom rules requires a file located at the root and does not offer any customizable location option.
86
86
 
87
- ## 🔧 Overriding or Disabling Rules
87
+ ## 🔧 Overriding, Enabling, or Disabling Rules
88
88
 
89
- You can override or disable any of the rules provided by this configuration — including custom **local rules** — just like you would with any ESLint config.
89
+ You can override, enable, or disable any of the rules provided by this configuration — including custom **local rules** — just like you would with any ESLint config.
90
90
 
91
91
  In your `.eslintrc.js`, simply add a `rules` section:
92
92
 
@@ -100,6 +100,9 @@ module.exports = {
100
100
  // Disable a local custom rule
101
101
  "local/use-nullish-checks": "off",
102
102
 
103
+ // Enable a built-in rule
104
+ "local-rules/prefer-object-params": "warn",
105
+
103
106
  // Customize severity or options
104
107
  "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
105
108
  },
@@ -124,6 +127,9 @@ export default [
124
127
  // Disable a local custom rule
125
128
  "local/use-nullish-checks": "off",
126
129
 
130
+ // Enable a built-in rule
131
+ "local-rules/prefer-object-params": "warn",
132
+
127
133
  // Customize severity or options
128
134
  "@typescript-eslint/no-unused-vars": [
129
135
  "warn",
@@ -53,12 +53,6 @@ export const eslintRules = [
53
53
 
54
54
  "local-rules/prefer-object-params": "warn",
55
55
 
56
- // TODO: Disabled for now to allow the migration of ESLint v9 in OISY, as the rule is not yet enforced.
57
- // It should also be introduced as an optional rule.
58
- // "local-rules/use-nullish-checks": "warn",
59
-
60
- "local-rules/use-option-type-wrapper": "warn",
61
-
62
56
  "import/no-duplicates": ["error", { "prefer-inline": true }],
63
57
  "import/no-relative-parent-imports": "error",
64
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfinity/eslint-config-oisy-wallet",
3
- "version": "0.1.13",
3
+ "version": "0.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Shared ESLint configurations from the Oisy Wallet team",
6
6
  "repository": {
@@ -63,24 +63,24 @@
63
63
  "best-practices"
64
64
  ],
65
65
  "peerDependencies": {
66
- "@dfinity/utils": "^2",
67
- "@eslint/compat": "^1.2.6",
68
- "@eslint/eslintrc": "^3.2.0",
69
- "@eslint/js": "^9.20.0",
70
- "@typescript-eslint/eslint-plugin": "^8.24.1",
71
- "@vitest/eslint-plugin": "^1.1.39",
72
- "eslint": "^9.20.1",
73
- "eslint-config-love": "^118.0.0",
74
- "eslint-config-prettier": "^10.0.1",
75
- "eslint-plugin-import": "^2.31.0",
66
+ "@dfinity/utils": "*",
67
+ "@eslint/compat": "^1.3.1",
68
+ "@eslint/eslintrc": "^3.3.1",
69
+ "@eslint/js": "^9.30.1",
70
+ "@typescript-eslint/eslint-plugin": "^8.36.0",
71
+ "@vitest/eslint-plugin": "^1.3.4",
72
+ "eslint": "^9.30.1",
73
+ "eslint-config-love": "^121.0.0",
74
+ "eslint-config-prettier": "^10.1.5",
75
+ "eslint-plugin-import": "^2.32.0",
76
76
  "eslint-plugin-local-rules": "^3.0.2",
77
- "eslint-plugin-n": "^17.15.1",
77
+ "eslint-plugin-n": "^17.21.0",
78
78
  "eslint-plugin-prefer-arrow": "^1.2.3",
79
- "eslint-plugin-prettier": "^5.2.3",
79
+ "eslint-plugin-prettier": "^5.5.1",
80
80
  "eslint-plugin-promise": "^7.2.1",
81
81
  "eslint-plugin-svelte": "^3",
82
- "globals": "^15.15.0",
83
- "prettier": "^3.5.1",
82
+ "globals": "^16.3.0",
83
+ "prettier": "^3.6.2",
84
84
  "prettier-plugin-organize-imports": "^4.1.0",
85
85
  "typescript": "^5"
86
86
  },
@@ -4,7 +4,7 @@ module.exports = {
4
4
  docs: {
5
5
  description: "Enforce the use of isNullish functions for nullish checks",
6
6
  category: "Best Practices",
7
- recommended: true,
7
+ recommended: false,
8
8
  },
9
9
  messages: {
10
10
  isNullish:
@@ -4,7 +4,7 @@ module.exports = {
4
4
  docs: {
5
5
  description: "Enforce use of Option<T> instead of T | null | undefined",
6
6
  category: "Best Practices",
7
- recommended: true,
7
+ recommended: false,
8
8
  },
9
9
  messages: {
10
10
  useOption: