Use new eslint package

This commit is contained in:
Jorik Schellekens 2020-07-21 15:06:38 +01:00
parent f21c1bee11
commit 422a827b82
3 changed files with 922 additions and 140 deletions

View file

@ -1,5 +1,3 @@
const jsSdkEslintCfg = require('matrix-js-sdk/.eslintrc');
module.exports = {
parserOptions: {
ecmaVersion: 8,
@ -10,17 +8,15 @@ module.exports = {
// we also have some browser code (ie. the preload script)
browser: true,
},
extends: ["eslint:recommended", "google"],
rules: jsSdkEslintCfg.rules,
extends: ["matrix-org"],
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,
}];

View file

@ -42,8 +42,9 @@
"electron-builder-squirrel-windows": "^22.7.0",
"electron-devtools-installer": "^2.2.4",
"electron-notarize": "^0.2.0",
"eslint": "^5.8.0",
"eslint": "7.3.1",
"eslint-config-google": "^0.7.1",
"eslint-config-matrix-org": "^0.1.2",
"eslint-plugin-babel": "^4.1.2",
"find-npm-prefix": "^1.0.2",
"fs-extra": "^8.1.0",

1033
yarn.lock

File diff suppressed because it is too large Load diff