mirror of
https://github.com/vector-im/element-desktop.git
synced 2024-09-10 06:15:17 +00:00
26 lines
746 B
JavaScript
26 lines
746 B
JavaScript
const jsSdkEslintCfg = require('matrix-js-sdk/.eslintrc');
|
|
|
|
module.exports = {
|
|
parserOptions: {
|
|
ecmaVersion: 8,
|
|
},
|
|
env: {
|
|
es6: true,
|
|
node: true,
|
|
// we also have some browser code (ie. the preload script)
|
|
browser: true,
|
|
},
|
|
extends: ["eslint:recommended", "google"],
|
|
rules: jsSdkEslintCfg.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
|
|
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,
|
|
}];
|