Browse Source

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.
jryans/rework-linting
J. Ryan Stinnett 3 months ago
parent
commit
573698789e
  1. 21
      .eslintrc.js
  2. 9
      package.json
  3. 680
      yarn.lock

21
.eslintrc.js

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

9
package.json

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

680
yarn.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save