Anthony Le Goas
b517df14e4
[feat] check noninteractive roles on interactive elements ( #5955 )
...
* check noninteractive roles on interactive elements
* refactor to match the eslint-plugin-jsx-a11y implementation
* update test case
Co-authored-by: tanhauhau <lhtan93@gmail.com>
2022-07-17 17:27:35 +08:00
Tan Li Hau
2db60a77e1
rename test files from svelte-slot -> svelte-fragment ( #7679 )
2022-07-12 23:20:44 +08:00
Anthony Le Goas
f5111ef436
[feat] add a11y check on abstract roles ( #6241 )
...
* add a11y check on abstract roles
* use aria-query and move warnings to compiler_warnings file
* uppercase warning message
Co-authored-by: tanhauhau <lhtan93@gmail.com>
2022-07-12 06:52:25 +08:00
kwangure
39901986d6
[feat]: Add A11y aria-proptypes check ( #6978 )
...
* Add aria prop type list
* feat: check aria attribute types
* feat: add proptype tests
* Add documentation
* use aria-query
Co-authored-by: Nurassyl Zekenov <nurassyl@snoonu.com>
Co-authored-by: mka_882@yahoo.com <mka_882@yahoo.com>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
Co-authored-by: David Mosher <davidmosher@gmail.com>
2022-07-11 09:40:12 +08:00
Mel
1d19aebe38
a11y: Add role-has-required-aria-props rule ( #5852 )
...
* Check required props for ARIA roles
* Test required ARIA props check
* Properly indent with tabs in test
* swtich to use aria-query
* fix validation test
* update docs
Co-authored-by: tanhauhau <lhtan93@gmail.com>
2022-07-11 02:23:41 +08:00
Tan Li Hau
a2de3894c0
[feat] support const tag for if block ( #7451 )
2022-04-30 14:34:58 -04:00
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
2022-04-13 00:22:11 +08:00
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>
2022-04-12 16:48:09 +08:00
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>
2022-04-08 16:54:55 +02:00
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
2022-03-02 16:55:02 -08:00
Efe Selim Küçük
587f94eb65
[feat] Better error message for inline component style directive ( #7187 )
...
Closes #7177
2022-02-02 08:56:23 +01:00
Yuichiro Yamashita
5665f711fd
[fix] raise compile error if variable name is same as imported variable name ( #7145 )
2022-01-26 10:16:20 -05:00
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>
2022-01-15 11:47:02 +08:00
Tan Li Hau
b5aaa6641b
[feat] implement constants in markup ( #6413 )
2022-01-11 17:10:09 -05:00
Tan Li Hau
5e40277167
[feat] add reference for default values in destructuring context ( #7007 )
2022-01-06 16:05:49 -05:00
James Bradbury
84a4ef07c9
[feat] add a11y-no-redundant-roles check ( #7067 )
...
Part of #820
Closes #5361
Co-authored-by: mhatvan <markus_hatvan@aon.at>
2022-01-03 11:33:08 +01:00
Oliver Ford
f48239914d
[fix] warning on reactive use of module const ( #6606 ) ( #6607 )
2021-08-03 18:10:56 -04:00
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
2021-07-17 13:37:29 +02:00
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
2021-07-14 10:01:05 +02:00
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
2021-07-14 09:54:15 +02:00
Tan Li Hau
f60cb22a9d
standalone :global() with multiple selectors shouldn't be treated as error ( #6508 )
2021-07-08 11:24:22 -04:00
Geoff Rich
391258aa10
Remove caption warning on <audio> ( #6054 )
2021-07-02 12:02:02 -07:00
Geoff Rich
e73f641ca5
Remove deprecated a11y-no-onchange warning ( #6457 )
2021-06-29 10:46:03 -04:00
Tan Li Hau
fca6a6d38a
:global() with pseudo element should be considered as global ( #6470 )
2021-06-29 10:45:29 -04:00
Tan Li Hau
98ddf8b588
update periscopic ( #6471 )
2021-06-29 10:44:54 -04:00
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
2021-06-29 15:08:58 +08:00
Anthony Le Goas
58790a9281
a11y: check if mouse events are accompanied by key events ( #5938 )
2021-06-28 12:50:52 +02:00
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
2021-06-27 18:48:42 +02:00
Roy Choo
228832c9a3
fix: :global(...):some-pseudoclass should be considered global ( #6317 )
2021-06-22 11:03:08 -04:00
Tan Li Hau
bbcc1e7479
disallow multiple selectors inside :global() ( #6428 )
2021-06-22 10:03:56 -04:00
Térence Hollander
842b8412b6
fix(a11y): do not warn if href value is dynamic ( #6110 )
2021-04-30 11:55:38 -04:00
Tan Li Hau
3d1af7fb68
support :global() in compound selector ( #6223 )
2021-04-30 10:35:40 -04:00
Tan Li Hau
1d6e20f2a9
implement <svelte:fragment> ( #4556 )
...
add validation and test
replace svelte:slot -> svelte:fragment
slot as a sugar syntax
fix eslint
2021-02-27 12:43:53 -05:00
Tan Li Hau
6589aa2548
warn module variables are nonreactive and make them truly nonreactive ( #5847 )
2021-01-29 15:05:04 -05:00
Saurav Sahu
87417e5a7b
fix: "foreign" namespace elements should still allow binding 'this' ( #5942 )
2021-01-29 13:31:23 -05:00
halfnelson
a7eff8894f
add foreign
namespace to preserve attribute case and skip HTML-specific a11y validations ( #5652 )
2021-01-25 16:25:10 -05:00
Tan Li Hau
2d5d6b05ed
warn if React attributes are used ( #5836 )
2021-01-01 19:49:03 -05:00
Mikail Khan
9745b61aab
fixed typo in each loop animation error ( #5648 )
2020-11-05 19:06:53 -08:00
Andreas Ehrencrona
ddf13211af
Updated to ESLint config 5.4.0 ( #5541 )
2020-10-21 15:23:08 -07:00
Ben McCann
229a16d6e7
upgrade ESLint config ( #5472 )
2020-09-29 20:19:43 -04:00
Tan Li Hau
2d88dc460e
warn for possible use of component without uppercase tag name ( #5302 )
2020-09-29 16:13:23 -04:00
Ben McCann
0645631b28
Use TypeScript in tests ( #5433 )
2020-09-29 11:19:21 -04:00
Tan Li Hau
a1651ca271
add nonpassive event modifier ( #5442 )
...
Co-authored-by: filipot <filipot@stud.ntnu.no>
2020-09-24 15:54:54 -04:00
Tan Li Hau
6e0cd9bcbf
fix missing-declaration warning for use:obj.method ( #5454 )
2020-09-24 09:48:27 -04:00
Tan Li Hau
aef5671411
update acorn and parse expression as module script ( #5423 )
2020-09-18 12:09:44 -04:00
Bassam Ismail
fb51dd8f07
add a11y-media-has-caption check ( #5075 )
2020-08-05 12:21:44 -04:00
Bassam Ismail
62ab75e365
add a11y-label-has-associated-control check ( #5074 )
2020-08-05 11:57:20 -04:00
Bassam Ismail
10f7b5ee70
skip a11y-missing-content check with contenteditable bindings ( #5023 )
2020-06-23 16:06:05 -04:00
pushkin
0da70f46b9
handle line ending differences in tests ( #4915 )
2020-05-28 12:36:27 -04:00
André Lins
f7d1bf35a0
A11y rule no-onchange ( #4788 )
...
* A11y rule no-onchange
* Fix message
* Fix tests
* Removing declarations
2020-05-17 11:50:38 -04:00