* [feature] add util module to check element is interactive element
* [feature] add util module to check role is interactive role
* [feature] add a11y checker for no-nointeractive-tabindex
* [chore] add test for no-nointeractive-tabindex
* [chore] fix tabindex-no-positive test div -> button
* [refactor] bundle up two filter into one
* Refactor: export a11y-no-nointeractive-tabindex warning from compiler_warning
* slight refactor to use existing utils
Co-authored-by: tanhauhau <lhtan93@gmail.com>
* Fix 6860: Warn user when binding rest operator
* move the binding validation to Binding node
* update test
Co-authored-by: vaibhav rai <vaibhavrai@vaibhavs-MacBook-Pro.local>
* add more test case, supporting deep destructuring and array destructuring
Co-authored-by: vaibhav rai <vaibhavrai@vaibhavs-MacBook-Pro.local>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
* Recursively check label children for input control
* Add another test case
* Update snapshot
* clean up test
Co-authored-by: tanhauhau <lhtan93@gmail.com>
* 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>
* 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>
* introdcued new compiler error
* making use of newly created compiler error
* updated test for animation not in keyed each
* removed unneeded conditions
* 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>
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
* 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
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