-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: support ts, bump lint and prettier
- Loading branch information
Peter Hellstrand
committed
May 2, 2024
1 parent
7a2fe14
commit b36b2c0
Showing
36 changed files
with
464 additions
and
58 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
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ dist/ | |
packages/*/lib/ | ||
tmp/ | ||
es/ | ||
build/ | ||
types/ | ||
|
||
# Editors | ||
|
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 @@ | ||
{ | ||
"compilerOptions": { | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"strict": true, | ||
"jsx": "react", | ||
"lib": ["dom", "es2019"] | ||
} | ||
} |
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 @@ | ||
const { spawn } = require('child_process'); | ||
|
||
module.exports = function (args) { | ||
const arg = ['tsc', '--project', './tsconfig.json', ...args]; | ||
|
||
return spawn('npx', arg, { | ||
cwd: process.cwd(), | ||
stdio: 'inherit', | ||
}).on('exit', code => { | ||
if (code) { | ||
process.exit(code); | ||
} | ||
}); | ||
}; |
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
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,18 +1,21 @@ | ||
{ | ||
"extends": ["../.eslintrc"], | ||
"overrides": [ | ||
{ | ||
"files": ["examples/**/*.jsx"], | ||
"globals": { | ||
"React": false | ||
}, | ||
"rules": { | ||
"no-unused-expressions": "off", | ||
"no-unused-vars": "warn", | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-boolean-value": "warn", | ||
"react/prop-types": "off" | ||
} | ||
} | ||
] | ||
"extends": [ | ||
"../.eslintrc" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"examples/**/*.jsx" | ||
], | ||
"globals": { | ||
"React": false | ||
}, | ||
"rules": { | ||
"no-unused-expressions": "off", | ||
"no-unused-vars": "warn", | ||
"react/react-in-jsx-scope": "off", | ||
"react/jsx-boolean-value": "warn" | ||
} | ||
} | ||
] | ||
} |
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
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
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
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,113 @@ | ||
'use strict'; | ||
var __assign = | ||
(this && this.__assign) || | ||
function () { | ||
__assign = | ||
Object.assign || | ||
function (t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) | ||
if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __createBinding = | ||
(this && this.__createBinding) || | ||
(Object.create | ||
? function (o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if ( | ||
!desc || | ||
('get' in desc | ||
? !m.__esModule | ||
: desc.writable || desc.configurable) | ||
) { | ||
desc = { | ||
enumerable: true, | ||
get: function () { | ||
return m[k]; | ||
}, | ||
}; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
} | ||
: function (o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
}); | ||
var __setModuleDefault = | ||
(this && this.__setModuleDefault) || | ||
(Object.create | ||
? function (o, v) { | ||
Object.defineProperty(o, 'default', { | ||
enumerable: true, | ||
value: v, | ||
}); | ||
} | ||
: function (o, v) { | ||
o['default'] = v; | ||
}); | ||
var __importStar = | ||
(this && this.__importStar) || | ||
function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) | ||
for (var k in mod) | ||
if ( | ||
k !== 'default' && | ||
Object.prototype.hasOwnProperty.call(mod, k) | ||
) | ||
__createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __rest = | ||
(this && this.__rest) || | ||
function (s, e) { | ||
var t = {}; | ||
for (var p in s) | ||
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === 'function') | ||
for ( | ||
var i = 0, p = Object.getOwnPropertySymbols(s); | ||
i < p.length; | ||
i++ | ||
) { | ||
if ( | ||
e.indexOf(p[i]) < 0 && | ||
Object.prototype.propertyIsEnumerable.call(s, p[i]) | ||
) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.App = exports.ActionButton = void 0; | ||
var react_1 = __importStar(require('react')); | ||
var BaseButton_1 = require('./BaseButton'); | ||
function ActionButton(props, ref) { | ||
// eslint-disable-next-line no-unused-vars | ||
var _ = props.ref, | ||
rest = __rest(props, ['ref']); | ||
return react_1.default.createElement( | ||
BaseButton_1.BaseButton, | ||
__assign({ buttonType: 'action' }, rest, { ref: ref }), | ||
); | ||
} | ||
exports.ActionButton = ActionButton; | ||
function App() { | ||
var ref = (0, react_1.useRef)(null); | ||
return react_1.default.createElement(ActionButton, { | ||
as: 'a', | ||
ref: ref, | ||
leftIcon: react_1.default.createElement('div', null, 'icon her'), | ||
}); | ||
} | ||
exports.App = App; |
Oops, something went wrong.