Skip to content
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

REMOVE tslint, and use eslint for everything #6621

Merged
merged 15 commits into from
Apr 26, 2019
Merged

REMOVE tslint, and use eslint for everything #6621

merged 15 commits into from
Apr 26, 2019

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Apr 25, 2019

Issue: TSlint will get replaced with ESlint at some point (see this article for explanations on why), having 2 linters is annoying:

  • more processes to run
  • more caching to configure
  • more editor config

What I did

@ndelangen ndelangen added the maintenance User-facing maintenance tasks label Apr 25, 2019
@ndelangen ndelangen self-assigned this Apr 25, 2019
@vercel
Copy link

vercel bot commented Apr 25, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-tech-remove-tslint.storybook.now.sh

@codecov
Copy link

codecov bot commented Apr 25, 2019

Codecov Report

Merging #6621 into next will increase coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #6621      +/-   ##
==========================================
+ Coverage   40.48%   40.57%   +0.08%     
==========================================
  Files         637      637              
  Lines        8743     8714      -29     
  Branches      636      625      -11     
==========================================
- Hits         3540     3536       -4     
+ Misses       5106     5089      -17     
+ Partials       97       89       -8
Impacted Files Coverage Δ
lib/api/src/modules/shortcuts.ts 19% <0%> (-0.2%) ⬇️
addons/info/src/components/types/PrettyPropType.js 41.66% <0%> (ø) ⬆️
addons/info/src/components/types/OneOfType.js 28.57% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Elements.tsx 41.66% <0%> (ø) ⬆️
addons/a11y/src/components/Report/Item.tsx 66.66% <0%> (ø) ⬆️
addons/info/src/components/types/ObjectOf.js 66.66% <0%> (ø) ⬆️
lib/theming/src/base.ts 100% <0%> (ø) ⬆️
addons/info/src/components/types/ArrayOf.js 66.66% <0%> (ø) ⬆️
lib/theming/src/create.ts 77.27% <0%> (ø) ⬆️
addons/info/src/components/types/Shape.js 28.57% <0%> (ø) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62bca85...3310029. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 25, 2019

Codecov Report

Merging #6621 into next will decrease coverage by 0.02%.
The diff coverage is 34.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #6621      +/-   ##
==========================================
- Coverage   40.48%   40.46%   -0.03%     
==========================================
  Files         637      637              
  Lines        8743     8754      +11     
  Branches      636      635       -1     
==========================================
+ Hits         3540     3542       +2     
- Misses       5106     5115       +9     
  Partials       97       97
Impacted Files Coverage Δ
app/preact/src/client/preview/render.js 0% <ø> (ø) ⬆️
lib/ui/src/keyboard/keyCodes.ts 0% <ø> (ø) ⬆️
addons/jest/src/hoc/provideJestResult.tsx 0% <ø> (ø) ⬆️
addons/a11y/src/components/A11YPanel.tsx 89.47% <ø> (ø) ⬆️
addons/contexts/src/manager/ContextsManager.tsx 0% <ø> (ø) ⬆️
lib/api/src/index.tsx 0% <ø> (ø) ⬆️
lib/components/src/ActionBar/ActionBar.tsx 100% <ø> (ø) ⬆️
addons/contexts/src/manager/libs/useChannel.ts 0% <ø> (ø) ⬆️
addons/a11y/src/components/Report/Rules.tsx 29.03% <ø> (ø) ⬆️
...ns/contexts/src/manager/components/ToolBarMenu.tsx 0% <ø> (ø) ⬆️
... and 61 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fba0541...1546f88. Read the comment docs.

@vercel vercel bot temporarily deployed to staging April 25, 2019 16:26 Inactive
}
}

onToggle = (): void => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting fixes, typescript files were missing a ton of useful eslint rules!

Now all eslint rules apply to typescript code as well 🎉

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it! One weird configuration change above, otherwise looks fantastic 🎉

addons/a11y/src/components/ColorBlindness.tsx Show resolved Hide resolved
name: string;
props: GenericProp;
default?: boolean;
}>;
}[];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one, I think Array<> is easier to read. What other devs are thinking about it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree personally on that I find Array<X> to be easier to read then X[], but this is a recommended rule from the typescript folk

examples/cra-ts-kitchen-sink/src/react-app-env.d.ts Outdated Show resolved Hide resolved
examples/official-storybook/webpack.config.js Outdated Show resolved Hide resolved
what a strange world we live in where a triple slash means something other then a code comment
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful! 👌

@shilman shilman merged commit 8aae29d into next Apr 26, 2019
@shilman shilman deleted the tech/remove-tslint branch April 26, 2019 09:01
@@ -94,13 +113,21 @@ module.exports = {
error,
{ allow: ['__STORYBOOK_CLIENT_API__', '__STORYBOOK_ADDONS_CHANNEL__'] },
],
'@typescript-eslint/no-var-requires': ignore,
'@typescript-eslint/camelcase': ignore,
'@typescript-eslint/no-unused-vars': ignore,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

presets: [
['@babel/preset-env', { shippedProposals: true, useBuiltIns: 'usage', corejs: 2 }],
'@babel/preset-typescript',
['babel-preset-minify', { builtIns: false, mangle: false }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ndelangen shouldn't we apply this one only in prod mode?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants