πͺπ¬ Made in Egypt
π€ 11 years of console.log('whyyyyyy!!!!')
π¨π»βπ» Frontend Lead @ Curalie
~1000 files, ~11 developers, ~4 months
ahmed.rocks
___________
// Java
int myNum = 5; // Integer (whole number)
float myFloatNum = 5.99f; // Floating point number
char myLetter = 'D'; // Character
boolean myBool = true; // Boolean
String myText = "Hello"; // String
const num = 1;
const str = "hi";
const fn = (param) => true
"Yeah it's cool, but we are busy now"
"It's not worth the effort"
"I tried flow before, never again!"
"I donβt need a tool to tell me what to do."
Phase 1 | Phase 2 | |
---|---|---|
allow js | β | β |
allow any/unknown | β | β |
refactoring logic | β | β |
βstrict mode | ββ | ββ |
Button.js
App.js
LoginForm.js
1
2
3
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
// javascript rules
'prettier/prettier': 'error',
},
settings: {
'import/resolver': 'typescript',
'import/extensions': ['.js', '.jsx', '.ts', '.tsx', '.json'],
react: {
version: 'detect',
},
},
overrides: [
{
files: ['src/**/*.ts', 'src/**/*.tsx'],
rules: {
// typescript rules
'curalie/type-default-props': 'error',
},
parserOptions: {
project: 'tsconfig.json',
},
},
],
};
Editor/Hooks | CI | |
---|---|---|
Fast | β | β |
Free | β | β |
Dependable | β | β |
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
}
{
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix"
],
"*": [
"prettier --ignore-unknown --write"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
}
},
}
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"command": "npm run migrate -- \"${file}\"",
"problemMatcher": [],
"label": "Migrate file to TS",
"detail": "Runs the npm migrate script"
}
]
}