2019-12-06 19:20:31 +01:00
|
|
|
module.exports = {
|
2021-07-01 10:16:49 +02:00
|
|
|
plugins: ["matrix-org"],
|
2022-12-15 12:00:58 +01:00
|
|
|
extends: ["plugin:matrix-org/javascript"],
|
2019-12-06 19:20:31 +01:00
|
|
|
parserOptions: {
|
2021-05-27 15:27:20 +02:00
|
|
|
ecmaVersion: 2021,
|
2023-02-17 13:17:42 +01:00
|
|
|
project: ["tsconfig.json"],
|
2019-12-06 19:20:31 +01:00
|
|
|
},
|
|
|
|
env: {
|
2020-02-17 15:49:26 +01:00
|
|
|
es6: true,
|
2019-12-06 19:20:31 +01:00
|
|
|
node: true,
|
|
|
|
// we also have some browser code (ie. the preload script)
|
|
|
|
browser: true,
|
|
|
|
},
|
2022-08-09 12:07:25 +02:00
|
|
|
// NOTE: These rules are frozen and new rules should not be added here.
|
|
|
|
// New changes belong in https://github.com/matrix-org/eslint-plugin-matrix-org/
|
2020-07-21 16:06:38 +02:00
|
|
|
rules: {
|
|
|
|
"quotes": "off",
|
|
|
|
"indent": "off",
|
|
|
|
"prefer-promise-reject-errors": "off",
|
|
|
|
"no-async-promise-executor": "off",
|
2021-07-01 10:16:49 +02:00
|
|
|
},
|
2022-12-15 12:00:58 +01:00
|
|
|
overrides: [
|
|
|
|
{
|
2023-02-23 18:10:06 +01:00
|
|
|
files: ["src/**/*.ts"],
|
2022-12-15 12:00:58 +01:00
|
|
|
extends: ["plugin:matrix-org/typescript"],
|
|
|
|
rules: {
|
|
|
|
// Things we do that break the ideal style
|
|
|
|
"prefer-promise-reject-errors": "off",
|
|
|
|
"quotes": "off",
|
2021-07-01 10:16:49 +02:00
|
|
|
|
2022-12-15 12:00:58 +01:00
|
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
|
|
// We're okay with assertion errors when we ask for them
|
|
|
|
"@typescript-eslint/no-non-null-assertion": "off",
|
|
|
|
},
|
2021-07-01 10:16:49 +02:00
|
|
|
},
|
2022-12-15 12:00:58 +01:00
|
|
|
],
|
2021-07-01 10:16:49 +02:00
|
|
|
};
|