@aneuhold/eslint-config 2.0.3 → 2.0.4
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/package.json +1 -1
- package/src/svelte-config.js +13 -0
package/package.json
CHANGED
package/src/svelte-config.js
CHANGED
|
@@ -111,6 +111,19 @@ export default defineConfig(
|
|
|
111
111
|
// Turned off because it doesn't seem too helpful, and it likes to error
|
|
112
112
|
// on things that seem to be just fine in generics.
|
|
113
113
|
'@typescript-eslint/no-unnecessary-type-parameters': 'off',
|
|
114
|
+
// Ban type assertions (as X) to prevent type-avoidance
|
|
115
|
+
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
|
|
116
|
+
// Ban the `object` type to prevent type-avoidance
|
|
117
|
+
'@typescript-eslint/no-restricted-types': [
|
|
118
|
+
'error',
|
|
119
|
+
{
|
|
120
|
+
types: {
|
|
121
|
+
object: {
|
|
122
|
+
message: 'The `object` type is too loose. Use a specific type instead.',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
],
|
|
114
127
|
// Disabled due to false positives with Svelte components
|
|
115
128
|
'@typescript-eslint/no-useless-default-assignment': 'off',
|
|
116
129
|
// Disabled because it wasn't working correctly with Svelte snippets
|