Kerry
d98a73b003
Revert "replace all require(.svg) with esm import" ( #7969 )
...
* Revert "replace all require(svgs) with esm import (#7948 )"
This reverts commit 61cd463a3b
.
* add .default to svg icon inline requires
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add shameful eslint ignore
Signed-off-by: Kerry Archibald <kerrya@element.io>
* format eslintrc
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add missed MFileBody change
Signed-off-by: Kerry Archibald <kerrya@element.io>
* one more broken svg
Signed-off-by: Kerry Archibald <kerrya@element.io>
* and ignore it
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-03 17:51:38 +00:00
Michael Telatynski
f25e6813bb
Mandate use of js-sdk/src/matrix import over js-sdk/src ( #7933 )
2022-03-01 20:42:05 +00:00
Kerry
26e1570dd6
a11y - fix iframes without title ( #7614 )
...
* iframe title in AppTile
Signed-off-by: Kerry Archibald <kerrya@element.io>
* iframe title in hostSignupDialog
Signed-off-by: Kerry Archibald <kerrya@element.io>
* iframe title in MFileBody
* iframe titles in modal widget and int man
Signed-off-by: Kerry Archibald <kerrya@element.io>
* enable jsx-a11y/iframe-has-title rule
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-01-24 14:07:54 +00:00
Kerry
fed53a268b
A11y - fix anchors-as-buttons ( #7444 )
...
* add link_inline accessiblebutton variant
* valid anchors in SecurityRoomSettingsTab
Signed-off-by: Kerry Archibald <kerrya@element.io>
* new room intro link button
Signed-off-by: Kerry Archibald <kerrya@element.io>
* replace anchor with button in rerequest encryption keys message
Signed-off-by: Kerry Archibald <kerrya@element.io>
* inline button in UrlPreviewSettings
Signed-off-by: Kerry Archibald <kerrya@element.io>
* ButtonResetDefault mixin
Signed-off-by: Kerry Archibald <kerrya@element.io>
* inline link buttons in TextForEvent
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix anchors in InviteDialog
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix anchors in DevToolsDialog
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix anchors in login/registration/reset pword flows
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix types after fixing anchors in devtools
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix anchors in MemberEventListSummary
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix anchors in ReactionsRow and RoomUpgrade
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix anchors in ReplyChain
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix more anchors
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix anchors in auth comps
* stylelint fixes
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove ignore of jsx-a11y rule that is not added yet
Signed-off-by: Kerry Archibald <kerrya@element.io>
* devtools style important explainer
Signed-off-by: Kerry Archibald <kerrya@element.io>
* translate button alt in devtools dialog
Signed-off-by: Kerry Archibald <kerrya@element.io>
* AccessibleButton is reactionsrow
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix viewsourcevent button placement, use AccessibleButton
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use AccessibleButton in EventTile
Signed-off-by: Kerry Archibald <kerrya@element.io>
* unignore jsx-a11y/anchor-is-valid
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix lint issue in test jsx
Signed-off-by: Kerry Archibald <kerrya@element.io>
* update coment
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-01-07 10:40:53 +01:00
Kerry
aaf14aacd2
A11y fix role-has-required-aria-props ( #7455 )
...
* remove jsx a11y direct use in eslintrc
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove debug
Signed-off-by: Kerry Archibald <kerrya@element.io>
* split aria-selected out from restProps in Autocomplete
Signed-off-by: Kerry Archibald <kerrya@element.io>
* update Dropdown to aria 1.1 aria-owns -> aria-controls
Signed-off-by: Kerry Archibald <kerrya@element.io>
* unignore jsx-a11y/role-has-required-aria-props rule
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove debug
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-01-04 08:46:21 +00:00
Kerry
846fbfa2a0
Add jsx-a11y eslint plugin ( #7434 )
...
* add matrix-org a11y eslint plgin
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add eslint a11y, enable and fix anchor-has-content rule
Signed-off-by: Kerry Archibald <kerrya@element.io>
* enable and fix jsx-a11y/no-redundant-roles
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove debug
Signed-off-by: Kerry Archibald <kerrya@element.io>
* i18n
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use jsx-a11y via matrix-org-eslint
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-01-03 18:51:58 +01:00
Aaron Raimist
77dbb84673
Remove import rules from .eslintrc.js
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-27 21:46:26 -05:00
Aaron Raimist
027b3660bb
Manual fixes
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:49:12 -05:00
Aaron Raimist
860c0596e1
Add rule to group imports by external and internal
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:21:46 -05:00
Germain Souquet
237212b082
Add ESLint shared settings to detect React version
2021-08-25 09:36:35 +01:00
J. Ryan Stinnett
2baace7658
Apply restricted property rules to all files
2021-06-30 14:27:10 +01:00
J. Ryan Stinnett
a9f35e8c69
Lint MXC APIs to centralise access
...
This adds linting rules to ensure that MXC APIs are only accessed via the
`Media` helper so they can be customised easily when desired.
Fixes https://github.com/vector-im/element-web/issues/16933
2021-06-30 14:19:39 +01:00
J. Ryan Stinnett
07f057f381
Keep indent rule enabled
2021-06-29 15:30:38 +01:00
J. Ryan Stinnett
fe123fc605
Rework lint comments
2021-06-29 13:35:43 +01:00
J. Ryan Stinnett
2be40ad08a
Use unquoted keys
2021-06-29 13:19:42 +01:00
J. Ryan Stinnett
a4f8ca4f8a
Switch to newer Babel specific config
2021-06-29 13:18:58 +01:00
J. Ryan Stinnett
71116bfa27
Migrate to eslint-plugin-matrix-org
...
This migrates to the new plugin form of our custom ESLint configs. As part of
this, some packages are de-duplicated, configs streamlined, etc.
2021-06-29 12:51:13 +01:00
David Baker
31604c13c0
Lint the typescript tests
...
Turns out we hadn't told eslint to lint .ts in tests/
Also fix all the lint errors, including removing a use of assert that
had randomly crept in.
2021-06-04 16:52:50 +01:00
Germain Souquet
f156c2db15
prevent reflow in app when accessing window dimensions
2021-05-25 10:28:43 +01:00
Šimon Brandner
46bfbbadf9
Enable indent rule and fix indent
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-27 17:23:27 +02:00
J. Ryan Stinnett
d78bc98521
Resolve linting errors after upgrades
2021-01-27 12:42:39 +00:00
Michael Telatynski
9ba33c7f80
Fix eslint ts override tsx matching and delint
2020-08-29 01:11:08 +01:00
J. Ryan Stinnett
50bc7fc62f
Remove redundant lint dependencies
...
These are no longer needed with the new standard lint repo.
2020-07-29 12:00:42 +01:00
Jorik Schellekens
be5db851ca
Revert unsafe rename and use boolean coercion
2020-07-21 10:29:05 +01:00
Jorik Schellekens
7699aafcaf
Use new eslint package- fix lint issues in ts and js
2020-06-23 17:01:19 +01:00
Travis Ralston
457e63f24e
Fix reference to js-sdk lint config
2020-01-15 10:25:36 -07:00
Travis Ralston
20a615396b
Implementation of new potential skinning mechanism
...
With a switch to Only One Webpack™ we need a way to help developers generate the component index without a concurrent watch task. The best way to do this is to have developers import their components, but how do they do that when we support skins? The answer in this commit is to change skinning.
Skinning now expects to receive your list of overrides instead of the react-sdk+branded components. For Riot this means we send over *only* the Vector components and not Vector+react-sdk.
Components can then be annotated with the `replaceComponent` decorator to have them be skinnable. The decorator must take a string with the dot path of the component because we can't reliably calculate it ourselves, sadly.
The decorator does a call to `getComponent` which is where the important part of the branded components not including the react-sdk is important: if the branded app includes the react-sdk then the decorator gets executed before the skin has finished loading, leading to all kinds of fun errors. This is also why the skinner lazily loads the react-sdk components to avoid importing them too early, breaking the app.
The decorator will end up receiving null for a component because of the getComponent loop mentioned: the require() call is still in progress when the decorator is called, therefore we can't error out. All usages of getComponent() within the app are safe to not need such an error (the return won't be null, and developers shouldn't use getComponent() after this commit anyways).
The AuthPage, being a prominent component, has been converted to demonstrate this working. Changes to riot-web are required to have this work.
The reskindex script has also been altered to reflect these skinning changes - it no longer should set the react-sdk as a parent. The eventual end goal is to get rid of `getComponent()` entirely as it'll be easily replaced by imports.
2019-12-12 19:48:45 -07:00
Michael Telatynski
df02eb8e92
Add UserInfo panel (consolidation of MemberInfo & GroupMemberInfo) Labs
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-10-07 16:52:50 +01:00
Bruno Windels
f51d25c394
declare LANGUAGES_FILE as global in eslint config
2019-02-18 16:36:11 +01:00
Bruno Windels
87ddb8a453
Merge pull request #2575 from matrix-org/bwindels/customtags
...
Bring back custom tags, also badges on communities
2019-02-07 11:37:17 +00:00
Bruno Windels
b9b83605b6
leave my regex along, lint
2019-02-05 19:31:14 +00:00
David Baker
32dbbbe7b1
Remove the arrow-paren lint rule
...
It's now in the base lint rules file: https://github.com/matrix-org/matrix-js-sdk/pull/834
2019-02-05 13:13:20 +00:00
Travis Ralston
a488304410
Appease the linter
...
Appease the linter round 2
Appease the linter round 3
Appease the linter round 4
Appease the linter round 5
2019-01-21 18:41:49 -07:00
J. Ryan Stinnett
b036e59021
Enable ESLint rule to require defined components in JSX
...
Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
2018-12-18 17:01:37 +00:00
Matthew Hodgson
4439a04689
fix lint
2018-05-20 23:43:42 +01:00
Matthew Hodgson
ebfcea8b78
Merge pull request #1872 from matrix-org/matthew/lint-changes
...
relax lint for jsx-curly-spacing and arrow-parens
2018-05-02 23:33:04 +01:00
Matthew Hodgson
09dcfb0a00
relax lint for jsx-curly-spacing and arrow-parens
2018-05-02 23:27:19 +01:00
David Baker
adf3e2f376
Change jsx-no-bind to warn
2018-05-02 17:36:29 +01:00
Luke Barnard
c429b13b05
Add eslint rule keyword-spacing
...
Because we follow it almost all of the time.
2017-11-16 13:18:58 +00:00
Luke Barnard
1c82df216e
Ignore unused React when using JSX
2017-11-10 16:11:59 +00:00
Luke Barnard
6b9a2909df
Add rule to enforce spacing in curly brackets in JSX children
...
This required an updated in version of eslint-plugin-react to 7.4.0.
2017-09-28 11:21:06 +01:00
Luke Barnard
e70336af11
Add rule to enforce JSX tag spacing
2017-09-28 10:27:03 +01:00
Luke Barnard
6eedf8b073
Add eslint rule to disallow spaces inside of curly braces
2017-09-28 10:06:51 +01:00
Michael Telatynski
86a5ff42e9
Change max-len 90->120
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-29 14:23:08 +01:00
Aviral Dasgupta
0e66b370d4
fix eslint's no-invalid-this rule for class properties
2017-02-16 16:49:00 +05:30
Richard van der Hoff
a65d94e8ce
Reinstate max-len lint configs
...
Apparenltly setting the ignorePattern on max-len (as per cf049f2
) makes eslint
forget the `ignoreComments` and `code` settings from js-sdk, so reinstate
these.
2017-02-02 10:52:11 +00:00
Richard van der Hoff
cf049f2d75
Exempt lines which look like pure JSX from the maxlen line
2017-02-01 09:59:46 +00:00
David Baker
905508f1ce
Correctly get the path of the js-sdk .eslintrc.js
...
So we work correctly when we're included in another module
2017-01-23 17:33:09 +00:00
David Baker
4ba224aac3
Use eslint config from the js sdk
...
Extend the js sdk's eslint config to give as consistent a code
style as possible. Add react/jsx/flow stuff that we use here.
2017-01-20 14:08:14 +00:00