element-desktop/.eslintrc.js

39 lines
1.1 KiB
JavaScript
Raw Normal View History

module.exports = {
2021-07-01 08:16:49 +00:00
plugins: ["matrix-org"],
extends: [
"plugin:matrix-org/javascript",
],
parserOptions: {
ecmaVersion: 2021,
},
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
},
overrides: [{
files: ["{src,scripts,hak}/**/*.{ts,tsx}"],
2021-07-01 08:16:49 +00:00
extends: [
"plugin:matrix-org/typescript",
],
rules: {
// Things we do that break the ideal style
"prefer-promise-reject-errors": "off",
"quotes": "off",
"@typescript-eslint/no-explicit-any": "off",
2022-10-13 11:42:33 +00:00
// 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
},
}],
};