mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-05-29 09:21:16 +03:00
Switch to new Babel lint config
This also adjusts the TypeScript project lint config to cover *.ts test files too.
This commit is contained in:
parent
4dc21674d5
commit
6dca8ac460
24
.eslintrc.js
24
.eslintrc.js
@ -2,7 +2,9 @@ module.exports = {
|
|||||||
plugins: [
|
plugins: [
|
||||||
"matrix-org",
|
"matrix-org",
|
||||||
],
|
],
|
||||||
extends: ["plugin:matrix-org/babel"],
|
extends: [
|
||||||
|
"plugin:matrix-org/babel",
|
||||||
|
],
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
node: true,
|
node: true,
|
||||||
@ -31,14 +33,26 @@ module.exports = {
|
|||||||
"no-console": "error",
|
"no-console": "error",
|
||||||
},
|
},
|
||||||
overrides: [{
|
overrides: [{
|
||||||
"files": ["src/**/*.ts"],
|
files: [
|
||||||
"extends": ["plugin:matrix-org/typescript"],
|
"**/*.ts",
|
||||||
"rules": {
|
],
|
||||||
|
extends: [
|
||||||
|
"plugin:matrix-org/typescript",
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
// TypeScript has its own version of this
|
||||||
|
"@babel/no-invalid-this": "off",
|
||||||
|
|
||||||
// We're okay being explicit at the moment
|
// We're okay being explicit at the moment
|
||||||
"@typescript-eslint/no-empty-interface": "off",
|
"@typescript-eslint/no-empty-interface": "off",
|
||||||
// While we're converting to ts we make heavy use of this
|
// We disable this while we're transitioning
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
// We'd rather not do this but we do
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
|
|
||||||
"quotes": "off",
|
"quotes": "off",
|
||||||
|
// We use a `logger` intermediary module
|
||||||
|
"no-console": "error",
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user