Skip to content

Commit

Permalink
chore: first steps to migrating to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomiguelino committed Dec 27, 2024
1 parent c1c78b3 commit c167151
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.23.3",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"@types/chrome": "^0.0.260",
"@types/react": "^18.2.64",
"@types/react-dom": "^18.2.21",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"babel-loader": "^9.2.1",
"classnames": "^2.5.1",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"eslint": "^9.14.0",
"eslint": "^8.56.0",
"eslint-plugin-jasmine": "^4.2.2",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.12.0",
Expand All @@ -32,6 +38,7 @@
"sass": "^1.81.0",
"sass-loader": "^16.0.3",
"style-loader": "^0.23.1",
"typescript": "^5.3.3",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4",
"webpack-merge": "^6.0.1"
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

7 changes: 4 additions & 3 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ module.exports = {
module: {
rules: [
{
test: /.(js|jsx|mjs)$/,
test: /\.(js|jsx|mjs|ts|tsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-env',
'@babel/preset-react'
'@babel/preset-react',
'@babel/preset-typescript'
]
}
}
Expand Down Expand Up @@ -90,7 +91,7 @@ module.exports = {
'@/scss': path.resolve(__dirname, 'src/assets/scss'),
'@/vendor': path.resolve(__dirname, 'src/lib/vendor'),
},
extensions: ['.js', '.jsx', '.mjs'],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.mjs'],
},

watchOptions: {
Expand Down

0 comments on commit c167151

Please sign in to comment.