Skip to content

Commit 5108b36

Browse files
authored
fix(eslint-config): disable rules that are triggering due to plugin bugs (#55)
1 parent 45eb9ba commit 5108b36

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

packages/eslint-config-svelte/eslint-config-svelte.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ const baseSvelteConfig = createConfig(
4646
},
4747
},
4848
rules: {
49-
// Too many false positives
49+
// TODO(mc, 2024-02-14): Too many false positives
50+
// https://github.com/sveltejs/eslint-plugin-svelte/issues/1073
5051
'svelte/require-stores-init': 'off',
5152
},
5253
},
@@ -57,6 +58,14 @@ const baseSvelteConfig = createConfig(
5758
rules: {
5859
// Allows us to set option props to `undefined` by default
5960
'no-undef-init': 'off',
61+
62+
// TODO(mc, 2024-11-06): False positive with props
63+
// https://github.com/sveltejs/eslint-plugin-svelte/issues/476
64+
'@typescript-eslint/no-unnecessary-condition': 'off',
65+
66+
// Svelte ESLint parser does not type snippets correctly
67+
// https://github.com/sveltejs/svelte-eslint-parser/issues/657
68+
'@typescript-eslint/no-confusing-void-expression': 'off',
6069
},
6170
},
6271

packages/eslint-config-svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "1.0.0",
6+
"version": "1.0.1",
77
"description": "ESLint configuration for Svelte projects at Viam.",
88
"type": "module",
99
"main": "./eslint-config-svelte.js",

packages/eslint-config/eslint-config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ const baseConfig = createConfig(
268268
{ pattern: String.raw`.*\.spec\.(ts|svelte)$` },
269269
],
270270
'vitest/consistent-test-it': ['error', { fn: 'it' }],
271+
'vitest/expect-expect': [
272+
'error',
273+
{ assertFunctionNames: ['expect', 'expect*'] },
274+
],
271275
'vitest/no-conditional-expect': 'error',
272276
'vitest/no-conditional-in-test': 'error',
273277
'vitest/no-conditional-tests': 'error',

packages/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"access": "public",
55
"provenance": true
66
},
7-
"version": "1.0.0",
7+
"version": "1.0.1",
88
"description": "ESLint configuration for projects at Viam.",
99
"type": "module",
1010
"main": "./eslint-config.js",

0 commit comments

Comments
 (0)