Henning Groß
9276f85768
[feat] improve error message for animate used in a non-keyed each block ( #6838 )
...
* introdcued new compiler error
* making use of newly created compiler error
* updated test for animation not in keyed each
* removed unneeded conditions
3 years ago
Tan Li Hau
d9687da632
each animate allow having comment siblings ( #7435 )
...
Co-authored-by: GHOST <ghostdevbusiness@gmail.com>
Co-authored-by: GHOST <ghostdevbusiness@gmail.com>
3 years ago
Yuichiro Yamashita
e0d93254fd
[feature] Dynamic elements implementation <svelte:element> ( #6898 )
...
Closes #2324
Co-authored-by: Alfred Ringstad <alfred.ringstad@hyperlab.se>
Co-authored-by: Simon Holthausen <simon.holthausen@accso.de>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
3 years ago
rgossiaux
e2adf6a211
fix: do not generate unused-export-let inside <script context="module"> ( #7232 )
...
Fixes #7055 . This warning can be delegated to userland tools like eslint
3 years ago
Efe Selim Küçük
587f94eb65
[feat] Better error message for inline component style directive ( #7187 )
...
Closes #7177
3 years ago
Yuichiro Yamashita
5665f711fd
[fix] raise compile error if variable name is same as imported variable name ( #7145 )
3 years ago
Andreas Ehrencrona
a4e4027f79
Handle whitespace inside #each with animation ( #5477 )
...
* Strip out whitespace inside each when it has an animation
* remove accidentally committed file
* lint
* add test to validate no error
* update changelog
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
Co-authored-by: Tan Li Hau <tanhauhau@users.noreply.github.com>
3 years ago
Tan Li Hau
b5aaa6641b
[feat] implement constants in markup ( #6413 )
3 years ago
Tan Li Hau
5e40277167
[feat] add reference for default values in destructuring context ( #7007 )
3 years ago
James Bradbury
84a4ef07c9
[feat] add a11y-no-redundant-roles check ( #7067 )
...
Part of #820
Closes #5361
Co-authored-by: mhatvan <markus_hatvan@aon.at>
3 years ago
Oliver Ford
f48239914d
[fix] warning on reactive use of module const ( #6606 ) ( #6607 )
3 years ago
Maxime LUCE
0cf5511ae0
[feat] Add errorMode option to compile to allow continuing on errors (and mark them as warnings) ( #6194 )
...
This PR adds a new option errorMode to CompileOptions to allow continuing the compilation process when errors occured.
When set to warn, this new option will indicate to Svelte that it should log errors as warnings and continue compilation.
This allows (notably) preprocessors to compile the markup to detect vars in markup before preprocessing (in this case: script and style tags are stripped so it can produce a lot of errors).
This PR is part of a work on the svelte-preprocess side to improve the preprocessing of TypeScript files: https://github.com/sveltejs/svelte-preprocess/issues/318
- allow compiler to pass error as warnings
- enforce stops after errors during compilation (for type-checking, TS doesn't know the error method throws)
- should review Element.ts:302
- added a test case for errorMode
- added documentation
3 years ago
Tan Li Hau
fd031105aa
[fix] do not warn if module variables are not the only dependencies in reactive statements ( #6510 )
...
The warning was too strict, since there are valid use cases for having non-reactive variables inside reactive statements
Fixes #5954
3 years ago
Simon H
a8c35daa9a
[fix] be able to silence more warnings ( #6504 )
...
including css-unused-selector, unused-export-let, module-script-reactive-declaration
Fixes #5954
Related to #5281
3 years ago
Tan Li Hau
f60cb22a9d
standalone :global() with multiple selectors shouldn't be treated as error ( #6508 )
3 years ago
Geoff Rich
391258aa10
Remove caption warning on <audio> ( #6054 )
3 years ago
Geoff Rich
e73f641ca5
Remove deprecated a11y-no-onchange warning ( #6457 )
3 years ago
Tan Li Hau
fca6a6d38a
:global() with pseudo element should be considered as global ( #6470 )
3 years ago
Tan Li Hau
98ddf8b588
update periscopic ( #6471 )
3 years ago
Ignatius Bagus
8c3fb922d8
only check selector that are direct children of `:global` ( #6435 )
...
* failing test for i6434
* use string match to simplify regexp
* more tests
* separate test suite
* test for commas inside attributes
* stricter regex pattern
* test escaped brackets and parentheses
* change latest test selector to lists
* correct failing test for escaped parentheses
* update with proposed pattern
3 years ago
Anthony Le Goas
58790a9281
a11y: check if mouse events are accompanied by key events ( #5938 )
3 years ago
Dennis Kaspar
b464320607
Add trusted modifier ( #6149 )
...
Fixes #6137
Adding a trusted modifier to make events not be dispatchable by console/sourcecode.
Useful to prevent injected code to automatically dispatch event for preventing botting
3 years ago
Roy Choo
228832c9a3
fix: :global(...):some-pseudoclass should be considered global ( #6317 )
3 years ago
Tan Li Hau
bbcc1e7479
disallow multiple selectors inside :global() ( #6428 )
3 years ago
Térence Hollander
842b8412b6
fix(a11y): do not warn if href value is dynamic ( #6110 )
4 years ago
Tan Li Hau
3d1af7fb68
support :global() in compound selector ( #6223 )
4 years ago
Tan Li Hau
1d6e20f2a9
implement <svelte:fragment> ( #4556 )
...
add validation and test
replace svelte:slot -> svelte:fragment
slot as a sugar syntax
fix eslint
4 years ago
Tan Li Hau
6589aa2548
warn module variables are nonreactive and make them truly nonreactive ( #5847 )
4 years ago
Saurav Sahu
87417e5a7b
fix: "foreign" namespace elements should still allow binding 'this' ( #5942 )
4 years ago
halfnelson
a7eff8894f
add `foreign` namespace to preserve attribute case and skip HTML-specific a11y validations ( #5652 )
4 years ago
Tan Li Hau
2d5d6b05ed
warn if React attributes are used ( #5836 )
4 years ago
Mikail Khan
9745b61aab
fixed typo in each loop animation error ( #5648 )
4 years ago
Andreas Ehrencrona
ddf13211af
Updated to ESLint config 5.4.0 ( #5541 )
4 years ago
Ben McCann
229a16d6e7
upgrade ESLint config ( #5472 )
4 years ago
Tan Li Hau
2d88dc460e
warn for possible use of component without uppercase tag name ( #5302 )
4 years ago
Ben McCann
0645631b28
Use TypeScript in tests ( #5433 )
4 years ago
Tan Li Hau
a1651ca271
add nonpassive event modifier ( #5442 )
...
Co-authored-by: filipot <filipot@stud.ntnu.no>
4 years ago
Tan Li Hau
6e0cd9bcbf
fix missing-declaration warning for use:obj.method ( #5454 )
4 years ago
Tan Li Hau
aef5671411
update acorn and parse expression as module script ( #5423 )
4 years ago
Bassam Ismail
fb51dd8f07
add a11y-media-has-caption check ( #5075 )
4 years ago
Bassam Ismail
62ab75e365
add a11y-label-has-associated-control check ( #5074 )
4 years ago
Bassam Ismail
10f7b5ee70
skip a11y-missing-content check with contenteditable bindings ( #5023 )
4 years ago
pushkin
0da70f46b9
handle line ending differences in tests ( #4915 )
5 years ago
André Lins
f7d1bf35a0
A11y rule no-onchange ( #4788 )
...
* A11y rule no-onchange
* Fix message
* Fix tests
* Removing declarations
5 years ago
Tan Li Hau
37cc5888f8
dry {#each}/{#await} destructuring ( #4596 )
5 years ago
Conduitry
bdabd89f09
fix exception with empty alt attribute ( #4778 )
5 years ago
Doga Genc
ba89c29b98
fix img-reduntant-alt bug ( #4771 )
5 years ago
André Lins
153b128fe2
a11y: implement img-redundant-alt ( #4750 )
5 years ago
André Lins
07242f994c
a11y: do not warn about <a name> / <a id> ( #4739 )
5 years ago
Kalan
56d1af493b
a11y: warn about href="javascript:..." ( #4733 )
5 years ago