Migrate to eslint-plugin-matrix-org

This migrates to the new plugin form of our custom ESLint configs. As part of
this, some packages are de-duplicated, configs streamlined, etc.
This commit is contained in:
J. Ryan Stinnett 2021-06-30 13:24:16 +01:00
parent 160a1fd8c8
commit 573698789e
3 changed files with 158 additions and 546 deletions

View file

@ -1,23 +1,30 @@
module.exports = { module.exports = {
extends: ["matrix-org", "matrix-org/react"], plugins: ["matrix-org"],
extends: [
"plugin:matrix-org/babel",
"plugin:matrix-org/react",
],
env: { env: {
browser: true, browser: true,
node: true, node: true,
}, },
rules: { rules: {
// Things we do that break the ideal style
"quotes": "off", "quotes": "off",
}, },
overrides: [{ overrides: [{
files: ["src/**/*.{ts,tsx}"], files: ["src/**/*.{ts,tsx}"],
extends: ["matrix-org/ts", "matrix-org/react"], extends: [
env: { "plugin:matrix-org/typescript",
browser: true, "plugin:matrix-org/react",
}, ],
rules: { rules: {
"quotes": "off", // Things we do that break the ideal style
// While converting to ts we allow this
"@typescript-eslint/no-explicit-any": "off",
"prefer-promise-reject-errors": "off", "prefer-promise-reject-errors": "off",
"quotes": "off",
// We disable this while we're transitioning
"@typescript-eslint/no-explicit-any": "off",
}, },
}], }],
}; };

View file

@ -71,6 +71,8 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.10", "@babel/core": "^7.12.10",
"@babel/eslint-parser": "^7.12.10",
"@babel/eslint-plugin": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1", "@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.12", "@babel/plugin-proposal-decorators": "^7.12.12",
"@babel/plugin-proposal-export-default-from": "^7.12.1", "@babel/plugin-proposal-export-default-from": "^7.12.1",
@ -92,8 +94,9 @@
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2", "@types/react-dom": "^17.0.2",
"@types/sanitize-html": "^2.3.1", "@types/sanitize-html": "^2.3.1",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"autoprefixer": "^9.8.6", "autoprefixer": "^9.8.6",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3", "babel-jest": "^26.6.3",
"babel-loader": "^8.2.2", "babel-loader": "^8.2.2",
"canvas": "^2.6.1", "canvas": "^2.6.1",
@ -102,8 +105,8 @@
"cpx": "^1.5.0", "cpx": "^1.5.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"eslint": "7.18.0", "eslint": "7.18.0",
"eslint-config-matrix-org": "^0.2.0", "eslint-config-google": "^0.14.0",
"eslint-plugin-babel": "^5.3.1", "eslint-plugin-matrix-org": "github:matrix-org/eslint-plugin-matrix-org#main",
"eslint-plugin-react": "^7.22.0", "eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-hooks": "^4.2.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0", "extract-text-webpack-plugin": "^4.0.0-beta.0",

672
yarn.lock

File diff suppressed because it is too large Load diff