Skip to content

Commit 715ff41

Browse files
committed
refactor!: migrate all the package to Typescript
migrate all the project to typescript, and refactor dirs structure.
0 parents  commit 715ff41

23 files changed

+2295
-0
lines changed

.eslintrc.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
env: { browser: true, es2020: true },
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:react-hooks/recommended',
7+
],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
10+
plugins: ['react-refresh'],
11+
rules: {
12+
'react-refresh/only-export-components': 'warn',
13+
},
14+
}

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>doom-react-notifications, enviroment</title>
8+
</head>
9+
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.tsx"></script>
13+
</body>
14+
</html>

package.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "doom-react-notifications",
3+
"private": false,
4+
"version": "0.1.4",
5+
"description": "A simple react notification system",
6+
"author": "camilodavila",
7+
"license": "MIT",
8+
"type": "module",
9+
"keywords": [
10+
"react",
11+
"notification",
12+
"JavaScript"
13+
],
14+
"files": [
15+
"dist",
16+
"README.md"
17+
],
18+
"main": "./dist/doom-react-notifications.umd.js",
19+
"module": "./dist/doom-react-notifications.es.js",
20+
"exports": {
21+
".": {
22+
"import": "./dist/doom-react-notifications.es.js",
23+
"require": "./dist/doom-react-notifications.umd.js"
24+
},
25+
"./dist/style.css": "./dist/style.css"
26+
},
27+
"scripts": {
28+
"dev": "vite",
29+
"build": "tsc && vite build",
30+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
31+
"preview": "vite preview"
32+
},
33+
"dependencies": {
34+
"react": "^18.2.0",
35+
"react-dom": "^18.2.0"
36+
},
37+
"devDependencies": {
38+
"@types/node": "^20.3.1",
39+
"@types/react": "^18.2.14",
40+
"@types/react-dom": "^18.2.6",
41+
"@typescript-eslint/eslint-plugin": "^5.60.0",
42+
"@typescript-eslint/parser": "^5.60.0",
43+
"@vitejs/plugin-react": "^4.0.1",
44+
"eslint": "^8.43.0",
45+
"eslint-plugin-react-hooks": "^4.6.0",
46+
"eslint-plugin-react-refresh": "^0.3.5",
47+
"typescript": "^5.1.3",
48+
"vite": "^4.3.9"
49+
}
50+
}

0 commit comments

Comments
 (0)