element-desktop/.eslintrc.js

38 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

module.exports = {
2021-07-01 08:16:49 +00:00
plugins: ["matrix-org"],
2022-12-15 11:00:58 +00:00
extends: ["plugin:matrix-org/javascript"],
parserOptions: {
ecmaVersion: 2021,
project: ["tsconfig.json"],
},
env: {
2020-02-17 14:49:26 +00:00
es6: true,
node: true,
// we also have some browser code (ie. the preload script)
browser: true,
},
2022-08-09 10:07:25 +00: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 14:06:38 +00:00
rules: {
"quotes": "off",
"indent": "off",
"prefer-promise-reject-errors": "off",
"no-async-promise-executor": "off",
2021-07-01 08:16:49 +00:00
},
2022-12-15 11:00:58 +00:00
overrides: [
{
files: ["src/**/*.ts"],
2022-12-15 11:00:58 +00: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 08:16:49 +00:00
2022-12-15 11:00:58 +00: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 08:16:49 +00:00
},
2022-12-15 11:00:58 +00:00
],
2021-07-01 08:16:49 +00:00
};