@dfinity/eslint-config-oisy-wallet 0.1.9 → 0.1.10
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 +28 -0
- package/package.json +1 -1
- package/rules/prefer-object-params.cjs +1 -0
- package/vitest.mjs +4 -0
package/README.md
CHANGED
|
@@ -106,6 +106,34 @@ module.exports = {
|
|
|
106
106
|
};
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
+
Or in `eslint.config.ts`, adding an object with the `rules` property:
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
import { default as svelteConfig } from "@dfinity/eslint-config-oisy-wallet/svelte";
|
|
113
|
+
import { default as vitestConfig } from "@dfinity/eslint-config-oisy-wallet/vitest";
|
|
114
|
+
|
|
115
|
+
export default [
|
|
116
|
+
...vitestConfig,
|
|
117
|
+
...svelteConfig,
|
|
118
|
+
{
|
|
119
|
+
rules: {
|
|
120
|
+
// Disable a built-in rule
|
|
121
|
+
"no-console": "off",
|
|
122
|
+
"vitest/expect-expect": "off",
|
|
123
|
+
|
|
124
|
+
// Disable a local custom rule
|
|
125
|
+
"local/use-nullish-checks": "off",
|
|
126
|
+
|
|
127
|
+
// Customize severity or options
|
|
128
|
+
"@typescript-eslint/no-unused-vars": [
|
|
129
|
+
"warn",
|
|
130
|
+
{ argsIgnorePattern: "^_" },
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
];
|
|
135
|
+
```
|
|
136
|
+
|
|
109
137
|
Note: To override local rules, make sure you have the `eslint-local-rules.cjs` file at the root as described above.
|
|
110
138
|
|
|
111
139
|
## 🛠️ TypeScript Support
|
package/package.json
CHANGED
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-test-return-statement": ["error"],
|
|
14
15
|
"vitest/padding-around-all": ["error"],
|
|
15
16
|
"vitest/prefer-comparison-matcher": ["error"],
|
|
16
17
|
"vitest/prefer-each": ["error"],
|
|
18
|
+
"vitest/prefer-equality-matcher": ["error"],
|
|
19
|
+
"vitest/prefer-expect-resolves": ["error"],
|
|
17
20
|
"vitest/prefer-hooks-in-order": ["error"],
|
|
18
21
|
"vitest/prefer-hooks-on-top": ["error"],
|
|
19
22
|
"vitest/prefer-to-be-falsy": ["error"],
|
|
@@ -21,6 +24,7 @@ export default [
|
|
|
21
24
|
"vitest/prefer-to-be-truthy": ["error"],
|
|
22
25
|
"vitest/prefer-to-contain": ["error"],
|
|
23
26
|
"vitest/prefer-to-have-length": ["error"],
|
|
27
|
+
"vitest/require-top-level-describe": ["error"],
|
|
24
28
|
},
|
|
25
29
|
},
|
|
26
30
|
languageOptions(),
|