Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Kushal V. Mahajan kushalmahajan

🎯
Focusing
View GitHub Profile
@kushalmahajan
kushalmahajan / package.json
Created Nov 18, 2019
package.json root final
View package.json
{
"name": "root",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"lint": "eslint './packages/**/*.{ts,tsx}'",
"lint:fix": "eslint './packages/**/*.{ts,tsx}' --fix",
"build": "yarn workspace ui-components tsc && yarn workspace ui-core tsc"
View .eslintignore
packages/**/src/**/__tests__/**
packages/**/src/**/__snapshots__/**
packages/**/dist/
node_modules
View .eslintrc
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"prettier",
"@typescript-eslint"
View tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"rootDir": "packages",
@kushalmahajan
kushalmahajan / tsconfig.json
Last active Nov 17, 2019
tsconfig.json ui-core
View tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"declaration": true,
@kushalmahajan
kushalmahajan / tsconfig.json
Created Nov 17, 2019
tsconfig.json ui-components
View tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"declaration": true,
View button.tsx
import React from "react";
const Button = () => {
const handleChange = (e: React.MouseEvent<HTMLButtonElement>) => {
console.log(e);
}
return (
<button onClick={handleChange}>
Sample Button
</button>
@kushalmahajan
kushalmahajan / tsconfig.json
Last active Nov 17, 2019
tsconfig.json initial
View tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"rootDir": "packages",
View lerna.json
{
"packages": [
"packages/*"
],
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}
@kushalmahajan
kushalmahajan / package.json
Last active Nov 17, 2019
The monorepo project
View package.json
{
"name": "root",
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"lerna": "^3.18.4"
}
}