@dfinity/eslint-config-oisy-wallet 0.1.14 → 0.2.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 +8 -2
- package/configs/eslint.rules.mjs +0 -6
- package/package.json +14 -14
- package/rules/use-nullish-checks.cjs +1 -1
- package/rules/use-option-type-wrapper.cjs +1 -1
- package/vitest.mjs +5 -0
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",
|
package/configs/eslint.rules.mjs
CHANGED
|
@@ -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
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Shared ESLint configurations from the Oisy Wallet team",
|
|
6
6
|
"repository": {
|
|
@@ -64,23 +64,23 @@
|
|
|
64
64
|
],
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@dfinity/utils": "*",
|
|
67
|
-
"@eslint/compat": "^1.
|
|
68
|
-
"@eslint/eslintrc": "^3.
|
|
69
|
-
"@eslint/js": "^9.
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
71
|
-
"@vitest/eslint-plugin": "^1.
|
|
72
|
-
"eslint": "^9.
|
|
73
|
-
"eslint-config-love": "^
|
|
74
|
-
"eslint-config-prettier": "^10.
|
|
75
|
-
"eslint-plugin-import": "^2.
|
|
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.
|
|
77
|
+
"eslint-plugin-n": "^17.21.0",
|
|
78
78
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
79
|
-
"eslint-plugin-prettier": "^5.
|
|
79
|
+
"eslint-plugin-prettier": "^5.5.1",
|
|
80
80
|
"eslint-plugin-promise": "^7.2.1",
|
|
81
81
|
"eslint-plugin-svelte": "^3",
|
|
82
|
-
"globals": "^
|
|
83
|
-
"prettier": "^3.
|
|
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
|
},
|
package/vitest.mjs
CHANGED
|
@@ -11,9 +11,12 @@ export default [
|
|
|
11
11
|
|
|
12
12
|
"vitest/no-alias-methods": ["error"],
|
|
13
13
|
"vitest/no-duplicate-hooks": ["error"],
|
|
14
|
+
"vitest/no-importing-vitest-globals": ["error"],
|
|
15
|
+
"vitest/no-test-prefixes": ["error"],
|
|
14
16
|
"vitest/no-test-return-statement": ["error"],
|
|
15
17
|
"vitest/padding-around-all": ["error"],
|
|
16
18
|
"vitest/prefer-comparison-matcher": ["error"],
|
|
19
|
+
"vitest/prefer-called-once": ["error"],
|
|
17
20
|
"vitest/prefer-each": ["error"],
|
|
18
21
|
"vitest/prefer-equality-matcher": ["error"],
|
|
19
22
|
"vitest/prefer-expect-resolves": ["error"],
|
|
@@ -26,7 +29,9 @@ export default [
|
|
|
26
29
|
"vitest/prefer-to-contain": ["error"],
|
|
27
30
|
"vitest/prefer-to-have-length": ["error"],
|
|
28
31
|
"vitest/prefer-todo": ["error"],
|
|
32
|
+
"vitest/prefer-vi-mocked": ["error"],
|
|
29
33
|
"vitest/require-top-level-describe": ["error"],
|
|
34
|
+
"vitest/valid-expect-in-promise": ["error"],
|
|
30
35
|
},
|
|
31
36
|
},
|
|
32
37
|
languageOptions(),
|