mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 15:34:59 +01:00
Use new eslint package
This commit is contained in:
parent
f21c1bee11
commit
422a827b82
26
.eslintrc.js
26
.eslintrc.js
@ -1,5 +1,3 @@
|
|||||||
const jsSdkEslintCfg = require('matrix-js-sdk/.eslintrc');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 8,
|
ecmaVersion: 8,
|
||||||
@ -10,17 +8,15 @@ module.exports = {
|
|||||||
// we also have some browser code (ie. the preload script)
|
// we also have some browser code (ie. the preload script)
|
||||||
browser: true,
|
browser: true,
|
||||||
},
|
},
|
||||||
extends: ["eslint:recommended", "google"],
|
extends: ["matrix-org"],
|
||||||
rules: jsSdkEslintCfg.rules,
|
rules: {
|
||||||
|
// js-sdk uses a babel rule which we can't use because we
|
||||||
|
// don't use babel, so remove it & put the original back
|
||||||
|
"babel/no-invalid-this": "off",
|
||||||
|
"no-invalid-this": "error",
|
||||||
|
"quotes": "off",
|
||||||
|
"indent": "off",
|
||||||
|
"prefer-promise-reject-errors": "off",
|
||||||
|
"no-async-promise-executor": "off",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// js-sdk uses a babel rule which we can't use because we
|
|
||||||
// don't use babel, so remove it & put the original back
|
|
||||||
delete module.exports.rules["babel/no-invalid-this"];
|
|
||||||
module.exports.rules["no-invalid-this"] = "error";
|
|
||||||
|
|
||||||
// also override the line length to be consistent with
|
|
||||||
// vector-web / react-sdk rather than js-sdk
|
|
||||||
module.exports.rules["max-len"] = ["warn", {
|
|
||||||
code: 120,
|
|
||||||
}];
|
|
||||||
|
@ -42,8 +42,9 @@
|
|||||||
"electron-builder-squirrel-windows": "^22.7.0",
|
"electron-builder-squirrel-windows": "^22.7.0",
|
||||||
"electron-devtools-installer": "^2.2.4",
|
"electron-devtools-installer": "^2.2.4",
|
||||||
"electron-notarize": "^0.2.0",
|
"electron-notarize": "^0.2.0",
|
||||||
"eslint": "^5.8.0",
|
"eslint": "7.3.1",
|
||||||
"eslint-config-google": "^0.7.1",
|
"eslint-config-google": "^0.7.1",
|
||||||
|
"eslint-config-matrix-org": "^0.1.2",
|
||||||
"eslint-plugin-babel": "^4.1.2",
|
"eslint-plugin-babel": "^4.1.2",
|
||||||
"find-npm-prefix": "^1.0.2",
|
"find-npm-prefix": "^1.0.2",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user