Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M3-5918: Remove babel and webpack following use of tsup #8495

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions packages/api-v4/.babelrc

This file was deleted.

110 changes: 0 additions & 110 deletions packages/api-v4/.eslintrc.js

This file was deleted.

102 changes: 102 additions & 0 deletions packages/api-v4/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"ignorePatterns": [
"node_modules",
"lib",
"index.js",
"!.eslintrc.js"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"warnOnUnsupportedTypeScriptVersion": true
},
"plugins": [
"@typescript-eslint",
"sonarjs",
"prettier"
],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:sonarjs/recommended",
"plugin:prettier/recommended"
],
"rules": {
"no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_"
}
],
"no-unused-expressions": "warn",
"no-bitwise": "error",
"no-caller": "error",
"no-eval": "error",
"no-throw-literal": "warn",
"no-loop-func": "error",
"no-await-in-loop": "error",
"array-callback-return": "error",
"no-invalid-this": "off",
"no-new-wrappers": "error",
"no-restricted-imports": [
"error",
"rxjs",
"@material-ui/core",
"@material-ui/icons"
],
"no-console": "error",
"no-undef-init": "off",
"radix": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-namespace": "warn",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/interface-name-prefix": "off",
"sonarjs/cognitive-complexity": "warn",
"sonarjs/no-duplicate-string": "warn",
"sonarjs/prefer-immediate-return": "warn",
"sonarjs/no-identical-functions": "warn",
"sonarjs/no-redundant-jump": "warn",
"sonarjs/no-small-switch": "warn",
"no-multiple-empty-lines": "error",
"curly": "warn",
"sort-keys": "off",
"comma-dangle": "off",
"no-trailing-spaces": "warn",
"no-mixed-requires": "warn",
"spaced-comment": "warn",
"object-shorthand": "warn",
"prettier/prettier": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"overrides": [
{
"files": [
"*ts"
],
"rules": {
"@typescript-eslint/ban-types": [
"warn",
{
"types": {
"String": true,
"Boolean": true,
"Number": true,
"Symbol": true,
"{}": false,
"Object": false,
"object": false,
"Function": false
},
"extendDefaults": true
}
]
}
}
]
}
7 changes: 0 additions & 7 deletions packages/api-v4/jestconfig.json

This file was deleted.

42 changes: 19 additions & 23 deletions packages/api-v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,54 +39,36 @@
"unpkg": "./lib/iife/index.js",
"dependencies": {
"@linode/validation": "*",
"@types/yup": "^0.29.13",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved this types dependency to devDependencies

"axios": "~0.21.4",
"ipaddr.js": "^2.0.0",
"querystring": "^0.2.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

querystring was not used anywhere so I removed it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bnussman It seems to be used in session.ts and linodeCreate.reducer.ts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the api-v4 package.json so packages in manager should be okay

"yup": "^0.32.9"
},
"scripts": {
"start": "concurrently --raw \"tsc -w --preserveWatchOutput\" \"tsup --watch\"",
"build": "concurrently --raw \"tsc\" \"tsup\"",
"test": "jest --config jestconfig.json",
"test": "jest",
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
"lint": "yarn run eslint . --quiet --ext .js,.ts,.tsx",
"typecheck": "tsc --noEmit true --emitDeclarationOnly false",
"precommit": "lint-staged"
},
"files": [
"index.js",
"index.node.js",
"index.d.ts",
"lib/*",
"package.json",
"README.md"
"lib"
],
"devDependencies": {
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
"@babel/preset-env": "^7.10.2",
"@babel/preset-typescript": "^7.10.1",
"@types/jest": "^26.0.13",
"@types/node": "^12.7.1",
"@types/yup": "^0.29.13",
"axios-mock-adapter": "^1.18.1",
"babel-plugin-module-resolver": "^4.0.0",
"concurrently": "^4.1.1",
"eslint": "^6.8.0",
"eslint-plugin-ramda": "^2.5.1",
"eslint-plugin-sonarjs": "^0.5.0",
"jest": "~26.4.2",
"lint-staged": "^9.4.2",
"npm-dts-webpack-plugin": "^1.3.10",
"prettier": "~2.2.1",
"ts-jest": "^24.1.0",
"tsup": "^6.2.1",
"webpack": "^5.64.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.4.0"
"tsup": "^6.2.1"
},
"resolutions": {
"handlebars": "^4.4.3"
Expand All @@ -100,5 +82,19 @@
".{ts,tsx}": [
"tsc -p tsconfig.json --noEmit true --emitDeclarationOnly false"
]
},
"jest": {
Copy link
Member Author

@bnussman bnussman Aug 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the jest config into the package.json to match how Cloud Manager does it

"transform": {
"^.+\\.(t)sx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
}
}
18 changes: 0 additions & 18 deletions packages/api-v4/webpack.config.js

This file was deleted.

22 changes: 0 additions & 22 deletions packages/api-v4/webpack.dev.config.js

This file was deleted.

19 changes: 0 additions & 19 deletions packages/api-v4/webpack.node.config.js

This file was deleted.

Loading