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 = { 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 // js-sdk uses a babel rule which we can't use because we
// don't use babel, so remove it & put the original back // don't use babel, so remove it & put the original back
delete module.exports.rules["babel/no-invalid-this"]; "babel/no-invalid-this": "off",
module.exports.rules["no-invalid-this"] = "error"; "no-invalid-this": "error",
"quotes": "off",
// also override the line length to be consistent with "indent": "off",
// vector-web / react-sdk rather than js-sdk "prefer-promise-reject-errors": "off",
module.exports.rules["max-len"] = ["warn", { "no-async-promise-executor": "off",
code: 120, }
}]; }

View file

@ -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",

1033
yarn.lock

File diff suppressed because it is too large Load diff