-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from p3ol/refactor/typescript
♻️ refactor: rewrite everything with Typescript
- Loading branch information
Showing
47 changed files
with
3,313 additions
and
5,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,17 @@ | ||
module.exports = { | ||
extends: '@poool/eslint-config-react', | ||
extends: [ | ||
'@poool/eslint-config-react', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
rules: { | ||
'react/react-in-jsx-scope': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
}, | ||
overrides: [{ | ||
files: ['src/**/*.test.js'], | ||
files: ['src/**/*.test.{ts,tsx}'], | ||
env: { | ||
jest: true, | ||
}, | ||
}, { | ||
files: ['src/**/*.{ts,tsx}'], | ||
extends: ['plugin:@typescript-eslint/recommended'], | ||
parser: '@typescript-eslint/parser', | ||
globals: { | ||
JSX: 'readonly', | ||
React: 'readonly', | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'max-len': [1, { | ||
ignoreComments: true, | ||
}], | ||
'no-use-before-define': 0, | ||
}, | ||
}], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ REMOVE THIS TO WRITE YOUR OWN DESCRIPTION } | ||
|
||
## PR title rules | ||
|
||
- Should have an emoji so it's clear what it does from the list view | ||
- Should have a type (feat, fix, chore, ...) | ||
- Can have a subject (but it's not mandatory) | ||
|
||
## Available emojis | ||
|
||
- ✨ → New feature | ||
- 🐛 → Bug fix | ||
- ♻️ → Drastically rewrites a big percentage of the code or architecture | ||
- 🏗 → Add/update unit tests | ||
- 📦 → Dependency maintenance and/or internal script update | ||
- 📖 → Documentation update | ||
|
||
## Allowed types | ||
- chore | ||
- docs | ||
- feat | ||
- fix | ||
- refactor | ||
- test | ||
- tests | ||
- deploy | ||
- release | ||
|
||
## Don't do | ||
|
||
``` | ||
Feature: Add new time picker | ||
fix the thing that was not working | ||
``` | ||
|
||
## Do | ||
|
||
``` | ||
✨ feat(react): add new time picker component | ||
🐛 fix(core): parse hsla correctly | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
yarnPath: .yarn/releases/yarn-4.1.1.cjs | ||
enableGlobalCache: true | ||
|
||
nodeLinker: node-modules | ||
|
||
enableGlobalCache: true | ||
yarnPath: .yarn/releases/yarn-4.3.1.cjs |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"name": "poool-react-engage-basic-example" | ||
"name": "poool-react-engage-basic-example", | ||
"scripts": { | ||
"serve": "yarn run -T webpack serve --config ./webpack.config.ts" | ||
}, | ||
"dependencies": { | ||
"@poool/react-engage": "portal:../../" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["./"], | ||
"ts-node": { | ||
"compilerOptions": { | ||
"module": "CommonJS" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://swc.rs/schema.json", | ||
"jsc": { | ||
"transform": { | ||
"react": { | ||
"runtime": "automatic" | ||
} | ||
}, | ||
"parser": { | ||
"syntax": "typescript", | ||
"tsx": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": [ | ||
"../../", | ||
"./", | ||
"app/**/*", | ||
".next/types/**/*.ts" | ||
], | ||
"compilerOptions": { | ||
"jsx": "preserve", | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"isolatedModules": true | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { Config } from 'jest'; | ||
|
||
const config: Config = { | ||
clearMocks: true, | ||
collectCoverage: true, | ||
fakeTimers: { | ||
enableGlobally: false, | ||
}, | ||
testEnvironment: 'jsdom', | ||
coverageDirectory: 'coverage', | ||
coveragePathIgnorePatterns: [ | ||
'/node_modules/', | ||
'/tests/', | ||
], | ||
transform: { | ||
'^.+\\.[j|t]sx?$': ['@swc/jest', { | ||
jsc: { | ||
transform: { | ||
react: { | ||
runtime: 'automatic', | ||
}, | ||
}, | ||
parser: { | ||
syntax: 'typescript', | ||
tsx: true, | ||
}, | ||
}, | ||
}], | ||
}, | ||
moduleNameMapper: { | ||
'^~(.+)': '<rootDir>/$1', | ||
}, | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.