MM-26572 Improve tooling around typescript (#105)
* Upstream typescript tooling changes. * Update rest of dependencies.
This commit is contained in:
parent
becbbc9685
commit
7cdbf90a73
4 changed files with 4904 additions and 6122 deletions
1
Makefile
1
Makefile
|
@ -44,6 +44,7 @@ check-style: webapp/node_modules
|
|||
|
||||
ifneq ($(HAS_WEBAPP),)
|
||||
cd webapp && npm run lint
|
||||
cd webapp && npm run check-types
|
||||
endif
|
||||
|
||||
ifneq ($(HAS_SERVER),)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
"extends": "eslint:recommended",
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react-hooks/recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 8,
|
||||
"sourceType": "module",
|
||||
|
@ -60,12 +63,6 @@
|
|||
"allowSingleLine": false
|
||||
}
|
||||
],
|
||||
"camelcase": [
|
||||
2,
|
||||
{
|
||||
"properties": "never"
|
||||
}
|
||||
],
|
||||
"capitalized-comments": 0,
|
||||
"class-methods-use-this": 0,
|
||||
"comma-dangle": [
|
||||
|
@ -270,7 +267,7 @@
|
|||
"no-lonely-if": 2,
|
||||
"no-loop-func": 2,
|
||||
"no-magic-numbers": [
|
||||
1,
|
||||
0,
|
||||
{
|
||||
"ignore": [
|
||||
-1,
|
||||
|
@ -548,7 +545,7 @@
|
|||
}
|
||||
],
|
||||
"react/prefer-es6-class": 2,
|
||||
"react/prefer-stateless-function": 0,
|
||||
"react/prefer-stateless-function": 2,
|
||||
"react/prop-types": [
|
||||
2,
|
||||
{
|
||||
|
@ -638,8 +635,13 @@
|
|||
"files": ["**/*.tsx", "**/*.ts"],
|
||||
"extends": "plugin:@typescript-eslint/recommended",
|
||||
"rules": {
|
||||
"@typescript-eslint/ban-ts-ignore": 0,
|
||||
"@typescript-eslint/ban-types": 1,
|
||||
"@typescript-eslint/ban-ts-comment": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/prefer-interface": 0,
|
||||
"@typescript-eslint/explicit-function-return-type": 0,
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||
"@typescript-eslint/indent": [
|
||||
2,
|
||||
4,
|
||||
|
@ -655,12 +657,6 @@
|
|||
"variables": false
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/camelcase": [
|
||||
2,
|
||||
{
|
||||
"properties": "never"
|
||||
}
|
||||
],
|
||||
"react/jsx-filename-extension": [
|
||||
1,
|
||||
{
|
||||
|
|
10916
webapp/package-lock.json
generated
10916
webapp/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -9,61 +9,64 @@
|
|||
"fix": "eslint --ignore-pattern node_modules --ignore-pattern dist --ext .js --ext .jsx --ext tsx --ext ts . --quiet --fix --cache",
|
||||
"test": "jest --forceExit --detectOpenHandles --verbose",
|
||||
"test:watch": "jest --watch",
|
||||
"test-ci": "jest --forceExit --detectOpenHandles --maxWorkers=2"
|
||||
"test-ci": "jest --forceExit --detectOpenHandles --maxWorkers=2",
|
||||
"check-types": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.4.4",
|
||||
"@babel/core": "7.4.5",
|
||||
"@babel/plugin-proposal-class-properties": "7.4.4",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.5.5",
|
||||
"@babel/cli": "7.10.4",
|
||||
"@babel/core": "7.10.4",
|
||||
"@babel/plugin-proposal-class-properties": "7.10.4",
|
||||
"@babel/plugin-proposal-object-rest-spread": "7.10.4",
|
||||
"@babel/plugin-proposal-optional-chaining": "7.10.4",
|
||||
"@babel/plugin-syntax-dynamic-import": "7.2.0",
|
||||
"@babel/polyfill": "7.4.4",
|
||||
"@babel/preset-env": "7.4.5",
|
||||
"@babel/preset-react": "7.0.0",
|
||||
"@babel/preset-typescript": "7.3.3",
|
||||
"@babel/runtime": "7.4.5",
|
||||
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
||||
"@babel/polyfill": "7.10.4",
|
||||
"@babel/preset-env": "7.10.4",
|
||||
"@babel/preset-react": "7.10.4",
|
||||
"@babel/preset-typescript": "7.10.4",
|
||||
"@babel/runtime": "7.10.4",
|
||||
"@emotion/babel-preset-css-prop": "10.0.27",
|
||||
"@emotion/core": "10.0.28",
|
||||
"@types/enzyme": "3.10.4",
|
||||
"@types/jest": "24.0.25",
|
||||
"@types/node": "12.12.24",
|
||||
"@types/react": "16.9.17",
|
||||
"@types/react-dom": "16.9.4",
|
||||
"@types/react-intl": "2.3.18",
|
||||
"@types/react-router-dom": "4.3.4",
|
||||
"@types/react-transition-group": "4.2.2",
|
||||
"@typescript-eslint/eslint-plugin": "1.13.0",
|
||||
"@typescript-eslint/parser": "1.13.0",
|
||||
"babel-eslint": "10.0.2",
|
||||
"@types/enzyme": "3.10.5",
|
||||
"@types/jest": "26.0.4",
|
||||
"@types/node": "14.0.20",
|
||||
"@types/react": "16.9.41",
|
||||
"@types/react-dom": "16.9.8",
|
||||
"@types/react-intl": "3.0.0",
|
||||
"@types/react-redux": "7.1.9",
|
||||
"@types/react-router-dom": "5.1.5",
|
||||
"@types/react-transition-group": "4.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"babel-eslint": "10.1.0",
|
||||
"babel-jest": "26.1.0",
|
||||
"babel-loader": "8.0.6",
|
||||
"babel-plugin-typescript-to-proptypes": "0.17.1",
|
||||
"babel-loader": "8.1.0",
|
||||
"babel-plugin-typescript-to-proptypes": "1.3.2",
|
||||
"css-loader": "3.6.0",
|
||||
"enzyme": "3.11.0",
|
||||
"enzyme-adapter-react-16": "1.15.2",
|
||||
"enzyme-to-json": "3.4.3",
|
||||
"eslint": "6.0.1",
|
||||
"eslint-import-resolver-webpack": "0.11.1",
|
||||
"eslint-plugin-import": "2.18.0",
|
||||
"eslint-plugin-react": "7.14.2",
|
||||
"file-loader": "4.0.0",
|
||||
"enzyme-to-json": "3.5.0",
|
||||
"eslint": "7.4.0",
|
||||
"eslint-import-resolver-webpack": "0.12.2",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"eslint-plugin-react": "7.20.3",
|
||||
"eslint-plugin-react-hooks": "4.0.6",
|
||||
"file-loader": "6.0.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"jest": "25.1.0",
|
||||
"jest": "26.1.0",
|
||||
"jest-canvas-mock": "2.2.0",
|
||||
"jest-junit": "10.0.0",
|
||||
"jest-junit": "11.0.1",
|
||||
"mattermost-webapp": "github:mattermost/mattermost-webapp#23f5f93d9f12a7e2b5623e5cee6814366abd9a0f",
|
||||
"sass-loader": "8.0.2",
|
||||
"sass-loader": "9.0.2",
|
||||
"style-loader": "1.2.1",
|
||||
"webpack": "4.35.0",
|
||||
"webpack-cli": "3.3.5"
|
||||
"webpack": "4.43.0",
|
||||
"webpack-cli": "3.3.12"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "3.6.2",
|
||||
"react": "16.8.6",
|
||||
"react-redux": "5.0.7",
|
||||
"redux": "4.0.1",
|
||||
"typescript": "3.5.3"
|
||||
"core-js": "3.6.5",
|
||||
"react": "16.13.1",
|
||||
"react-redux": "7.2.0",
|
||||
"redux": "4.0.5",
|
||||
"typescript": "3.9.6"
|
||||
},
|
||||
"jest": {
|
||||
"snapshotSerializers": [
|
||||
|
|
Reference in a new issue