File tree 5 files changed +6
-18
lines changed
5 files changed +6
-18
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " svelte-eslint-parser " : minor
3
+ ---
4
+
5
+ feat: stabilized generics
Original file line number Diff line number Diff line change @@ -291,11 +291,6 @@ export default [
291
291
// If not configured this option, The parser will try to read the option from `compilerOptions.runes` from `svelte.config.js`.
292
292
// If `parserOptions.svelteConfig` is not specified and the file cannot be parsed by static analysis, it will behave as `true`.
293
293
runes: true ,
294
- /* -- Experimental Svelte Features -- */
295
- /* It may be changed or removed in minor versions without notice. */
296
- // Whether to parse the `generics` attribute.
297
- // See https://github.com/sveltejs/rfcs/pull/38
298
- experimentalGenerics: false ,
299
294
},
300
295
},
301
296
},
@@ -317,11 +312,6 @@ For example in `.eslintrc.*`:
317
312
// If not configured this option, The parser will try to read the option from `compilerOptions.runes` from `svelte.config.js`.
318
313
// If `parserOptions.svelteConfig` is not specified and the file cannot be parsed by static analysis, it will behave as `true`.
319
314
" runes" : true ,
320
- /* -- Experimental Svelte Features -- */
321
- /* It may be changed or removed in minor versions without notice. */
322
- // Whether to parse the `generics` attribute.
323
- // See https://github.com/sveltejs/rfcs/pull/38
324
- " experimentalGenerics" : false ,
325
315
},
326
316
},
327
317
}
Original file line number Diff line number Diff line change @@ -173,8 +173,7 @@ export function convertSvelteRoot(
173
173
body . push ( style ) ;
174
174
}
175
175
body . push ( ...convertChildren ( { nodes : snippetChildren } , ast , ctx ) ) ;
176
- if ( script && ctx . parserOptions . svelteFeatures ?. experimentalGenerics )
177
- convertGenericsAttribute ( script , ctx ) ;
176
+ if ( script ) convertGenericsAttribute ( script , ctx ) ;
178
177
179
178
// Set the scope of the Program node.
180
179
ctx . scriptLet . addProgramRestore (
Original file line number Diff line number Diff line change @@ -26,9 +26,6 @@ export type NormalizedParserOptions = {
26
26
// If not configured this option, The parser will try to read the option from `compilerOptions.runes` from `svelte.config.js`.
27
27
// If `parserOptions.svelteConfig` is not specified and the file cannot be parsed by static analysis, it will behave as `true`.
28
28
runes ?: boolean ;
29
- // Whether to parse the `generics` attribute.
30
- // See https://github.com/sveltejs/rfcs/pull/38
31
- experimentalGenerics ?: boolean ;
32
29
} ;
33
30
loc : boolean ;
34
31
range : boolean ;
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ const BASIC_PARSER_OPTIONS: Linter.ParserOptions = {
21
21
} ,
22
22
project : require . resolve ( "../../fixtures/tsconfig.test.json" ) ,
23
23
extraFileExtensions : [ ".svelte" ] ,
24
- svelteFeatures : {
25
- experimentalGenerics : true ,
26
- } ,
27
24
} ;
28
25
29
26
const SVELTE5_SCOPE_VARIABLES_BASE = [
You can’t perform that action at this time.
0 commit comments