-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to Typescript #36
Conversation
Talking about linting - are there alternatives for standard/prettier, react and other eslint presets in tslint? |
@bytasv it looks like there are react-related For |
Ok, so apparently the obvious way is to stick with ESlint: bradzacher/eslint-plugin-typescript#290 Here is official statement from TS team: microsoft/TypeScript#29288 so we should just take that into consideration, drop TS lint for now I guess and see what can we do to use ESlint |
@bytasv yeah, this microsoft/TypeScript#29288 makes a lot of sense 👍 thanks for finding this! |
1d3dcb5
to
6833c07
Compare
8efe9bf
to
423d9b5
Compare
components/Label/Label.tsx
Outdated
classes: {}, | ||
label: undefined, | ||
onDelete: undefined, | ||
variant: undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably shouldn't be undefined and it should have some default variant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use default
for example, but this variant is our variant which controls the root
class which we set for Chip
component. But I think it just adds complexity if we specify default
instead of just checking for undefined:
const rootClass = variant ? classes[variant] : ''
wdyt @MilosMosovsky ?
"dependencies": { | ||
"@material-ui/core": "^3.6.0", | ||
"@material-ui/core": "3.6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
important to fix this version, because snapshot tests are failing with updating MUI core. Maybe we can use Greenkeeper or something like that to keep us updated?
@@ -68,7 +80,7 @@ | |||
"eslint-plugin-import": "^2.14.0", | |||
"eslint-plugin-node": "^8.0.0", | |||
"eslint-plugin-promise": "^4.0.1", | |||
"eslint-plugin-react": "^7.11.1", | |||
"eslint-plugin-react": "7.11.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important to fix it, with the new version a lot of new linting problems are appearing. We should update it, but in the other PR
6f9bbad
to
d25c109
Compare
Add config, packages and ts linter Fix import of React and PropTypes Fix color import Remove noEmit config from ts config Fix unit tests with correct import of color Support ES6 modules and babel imports in TS This information was really helpful - https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability Move Label component to tsx Fix usage of eslint for Typescript Enable linting for ts files Move styles, test files to TS Update component generator to use TS Fix default imports for react and prop-types packages Remove tslint config Cleanup tsconfig Fix the issue with linting of imported types for typescript Remove some classes type casting for Label Remove webpack and replace with tsc cli Add 2 configurations for tsc: ES6 and ES2015 Return ts-loader for storybook Fix version of material-ui core Fix linting Simplify classnames for Label Move default props to the bottom of the component Fix build script with using Typescript to compile and remove all babel dependencies Add skiplibcheck to tsconfig Leave only 1 tsconfig, build only ES6/ES2015 version
35d89af
to
310dd45
Compare
@@ -39,14 +39,14 @@ chapter.addSection('Flat', null, () => ( | |||
)) | |||
|
|||
chapter.addSection('Statuses', 'Use these to communicate status.', () => ( | |||
<React.Fragment> | |||
<> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward ✅
PICAS-39
Description
This PR is about moving Picasso to Typescript. I want you guys to review the changes has been made and discuss them. The most important once I would like to talk:
*.tsx
eslint
doesn't really make sense for TS, I faced already few problems with it: PropTypes validation, matching Default prop types to PropTypes and, more important, TS types imports from*.d.ts
which is not supported byeslint
. So as a proposition - havingtslint
(https://github.com/palantir/tslint) and keep usingeslint
until we move 100% to TS