Files
element-call/.eslintrc.cjs
T

46 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-09-22 18:05:13 -04:00
const COPYRIGHT_HEADER = `/*
2024-09-10 18:18:55 -04:00
Copyright %%CURRENT_YEAR%% New Vector Ltd.
2023-09-22 18:05:13 -04:00
2024-09-10 18:18:55 -04:00
SPDX-License-Identifier: AGPL-3.0-only
Please see LICENSE in the repository root for full details.
2023-09-22 18:05:13 -04:00
*/
`;
2022-05-03 15:32:16 +01:00
module.exports = {
2022-12-09 14:34:25 -05:00
plugins: ["matrix-org"],
2023-06-30 16:43:28 +01:00
extends: [
"plugin:matrix-org/react",
"plugin:matrix-org/a11y",
"plugin:matrix-org/typescript",
2023-09-22 18:05:13 -04:00
"prettier",
2023-06-30 16:43:28 +01:00
],
parserOptions: {
2023-09-22 18:05:13 -04:00
ecmaVersion: "latest",
2023-06-30 16:43:28 +01:00
sourceType: "module",
project: ["./tsconfig.json"],
},
2022-12-09 14:34:25 -05:00
env: {
browser: true,
node: true,
},
rules: {
2023-09-22 18:05:13 -04:00
"matrix-org/require-copyright-header": ["error", COPYRIGHT_HEADER],
"jsx-a11y/media-has-caption": "off",
2023-10-11 10:30:57 -04:00
// We should use the js-sdk logger, never console directly.
"no-console": ["error"],
"react/display-name": "error",
// Encourage proper usage of Promises:
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/await-thenable": "error",
2022-12-09 14:34:25 -05:00
},
settings: {
react: {
version: "detect",
2022-05-03 15:32:16 +01:00
},
2022-12-09 14:34:25 -05:00
},
2022-05-03 15:32:16 +01:00
};