Skip to content

Commit 5a40347

Browse files
committed
Migrate react components to astro components
1 parent 5887d94 commit 5a40347

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1021
-1252
lines changed

.eslintrc.json

+2-17
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
"es2021": true
55
},
66
"extends": [
7-
"plugin:react/recommended",
8-
"airbnb",
9-
"airbnb-typescript",
10-
"airbnb/hooks",
7+
"airbnb-base",
8+
"airbnb-typescript/base",
119
"plugin:@typescript-eslint/recommended",
1210
"plugin:import/recommended",
1311
"plugin:import/typescript",
@@ -20,19 +18,6 @@
2018
"project": "./tsconfig.json"
2119
},
2220
"rules": {
23-
// suppress errors for missing 'import React' in files
24-
"react/react-in-jsx-scope": "off",
25-
// allow tsx/astro files to use jsx syntax
26-
"react/jsx-filename-extension": ["error", {
27-
"extensions": [".js", ".jsx", ".ts", ".tsx", ".astro"]
28-
}],
29-
// allow function declarations for functional components
30-
"react/function-component-definition": ["error", {
31-
"namedComponents": "function-declaration",
32-
"unnamedComponents": "function-expression"
33-
}],
34-
// disable default props validation since we don't use it
35-
"react/require-default-props": "off",
3621
// separate import types from regular imports
3722
"@typescript-eslint/consistent-type-imports": "error",
3823
// supress unused vars errors for astro Prop types

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@
1717
"build:all": "run-s -l talks:sync build talks:build"
1818
},
1919
"devDependencies": {
20+
"@astrojs/ts-plugin": "^1.1.3",
2021
"@iconify-json/mdi": "^1.1.52",
2122
"@iconify-json/simple-icons": "^1.1.58",
2223
"@types/react": "^18.0.21",
2324
"@types/react-dom": "^18.0.6",
2425
"@typescript-eslint/eslint-plugin": "^5.57.0",
2526
"@typescript-eslint/parser": "^5.57.0",
2627
"eslint": "^8.37.0",
27-
"eslint-config-airbnb": "^19.0.4",
28+
"eslint-config-airbnb-base": "^15.0.0",
2829
"eslint-config-airbnb-typescript": "^17.0.0",
2930
"eslint-config-prettier": "^8.8.0",
3031
"eslint-import-resolver-typescript": "^3.5.4",
3132
"eslint-plugin-astro": "^0.26.1",
3233
"eslint-plugin-import": "^2.27.5",
3334
"eslint-plugin-jsx-a11y": "^6.5.1",
3435
"eslint-plugin-prettier": "^4.2.1",
35-
"eslint-plugin-react": "^7.28.0",
36-
"eslint-plugin-react-hooks": "^4.3.0",
3736
"npm-run-all": "^4.1.5",
3837
"playwright-chromium": "^1.35.1",
3938
"prettier": "^2.8.7",

pnpm-lock.yaml

+51-118
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)