-
Notifications
You must be signed in to change notification settings - Fork 842
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
Retire TSlint #1950
Retire TSlint #1950
Conversation
nudge |
The use of |
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.
Nice, love it! Have a few comments, but thank you for setting this up.
"lint-fix": "yarn lint-es-fix && yarn lint-ts-fix", | ||
"lint-es": "eslint --cache --ignore-pattern \"**/*.snap.js\", --ignore-pattern \"**/assets/**/*.js\" \"src/**/*.js\" \"src-docs/**/*.js\"", | ||
"lint-es-fix": "eslint --fix --cache --ignore-pattern \"**/*.snap.js\", \"**/assets/**/*.js\" \"src/**/*.js\" \"src-docs/**/*.js\"", | ||
"lint-es": "eslint --cache '{src,src-docs,src-framer}/**/*.{ts,tsx,js}'", |
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 is so much nicer ❤️
Ready for another pass 🙏 |
Errors on build -
custom_typings/framer/index.d.ts:10:1 - error TS6200: Definitions of the following identifiers conflict with those in another file: Boolean, Number, String, FusedNumber, Enum, SegmentedEnum, Color, Image, File, ComponentInstance, Array, Object, Override, OverrideFunction, OverrideObject, animate 10 declare module 'framer' {
custom_typings/framer/index.d.ts:10:1 eui.d.ts:5908:31 - error TS2307: Cannot find module '@elastic/eui/lib/components/avatar/avatar.js'. 5908 import { SIZES, TYPES } from '@elastic/eui/lib/components/avatar/avatar.js'; eui.d.ts:5932:25 - error TS2307: Cannot find module '@elastic/eui/lib/components/badge/badge.js'. 5932 import { COLORS } from '@elastic/eui/lib/components/badge/badge.js'; eui.d.ts:5933:29 - error TS2307: Cannot find module '@elastic/eui/lib/components/icon/index.js'. 5933 import { ICON_TYPES } from '@elastic/eui/lib/components/icon/index.js'; eui.d.ts:5960:32 - error TS2307: Cannot find module '@elastic/eui/lib/components/button/button.js'. 5960 import { COLORS, SIZES } from '@elastic/eui/lib/components/button/button.js'; eui.d.ts:5961:29 - error TS2307: Cannot find module '@elastic/eui/lib/components/icon/index.js'. 5961 import { ICON_TYPES } from '@elastic/eui/lib/components/icon/index.js'; eui.d.ts:5992:32 - error TS2307: Cannot find module '@elastic/eui/lib/components/call_out/call_out.js'. 5992 import { COLORS, SIZES } from '@elastic/eui/lib/components/call_out/call_out.js'; eui.d.ts:5993:29 - error TS2307: Cannot find module '@elastic/eui/lib/components/icon/index.js'. 5993 import { ICON_TYPES } from '@elastic/eui/lib/components/icon/index.js'; eui.d.ts:6019:48 - error TS2307: Cannot find module '@elastic/eui/lib/components/card/card.js'. 6019 import { ALIGNMENTS, LAYOUT_ALIGNMENTS } from '@elastic/eui/lib/components/card/card.js'; eui.d.ts:6020:39 - error TS2307: Cannot find module '@elastic/eui/lib/components/icon/icon.js'. 6020 import { COLORS, SIZES, TYPES } from '@elastic/eui/lib/components/icon/icon.js'; eui.d.ts:6051:44 - error TS2307: Cannot find module '@elastic/eui/lib/components/code/_code_block.js'. 6051 import { FONT_SIZES, PADDING_SIZES } from '@elastic/eui/lib/components/code/_code_block.js'; eui.d.ts:6075:49 - error TS2307: Cannot find module '@elastic/eui/lib/components/description_list/description_list.js'. 6075 import { TYPES, ALIGNMENTS, TEXT_STYLES } from '@elastic/eui/lib/components/description_list/description_list.js'; eui.d.ts:6104:39 - error TS2307: Cannot find module '@elastic/eui/lib/components/icon/icon.js'. 6104 import { COLORS, SIZES, TYPES } from '@elastic/eui/lib/components/icon/icon.js'; eui.d.ts:6183:29 - error TS2307: Cannot find module '@elastic/eui/lib/components/icon/index.js'. 6183 import { ICON_TYPES } from '@elastic/eui/lib/components/icon/index.js'; eui.d.ts:6211:39 - error TS2307: Cannot find module '@elastic/eui/lib/components/icon/icon.js'. 6211 import { COLORS, SIZES, TYPES } from '@elastic/eui/lib/components/icon/icon.js'; eui.d.ts:6235:24 - error TS2307: Cannot find module '@elastic/eui/lib/components/panel/panel.js'. 6235 import { SIZES } from '@elastic/eui/lib/components/panel/panel.js'; eui.d.ts:6257:29 - error TS2307: Cannot find module '@elastic/eui/lib/components/text/text'. 6257 import { TEXT_SIZES } from '@elastic/eui/lib/components/text/text'; eui.d.ts:6258:29 - error TS2307: Cannot find module '@elastic/eui/lib/components/text/text_align'. 6258 import { ALIGNMENTS } from '@elastic/eui/lib/components/text/text_align'; eui.d.ts:6259:25 - error TS2307: Cannot find module '@elastic/eui/lib/components/text/text_color'. 6259 import { COLORS } from '@elastic/eui/lib/components/text/text_color'; eui.d.ts:6280:46 - error TS2307: Cannot find module '@elastic/eui/lib/components/title/title'. 6280 import { TEXT_TRANSFORM, TITLE_SIZES } from '@elastic/eui/lib/components/title/title'; |
@chandlerprall turns out the framer definitions where being incorporated into the TS build. I've fixed that up now, still waiting for CI to pick up the commit though. |
This PR retires TSLint in favour of ESLint. Consolidating the linting rules meant I needed to make a call about what the rules should be going forward - I'm very happy to discuss / change them. There's a lot of tedious quote changes, but I think that was unavoidable given the disparate linting configs.
I also expanded the linting / type-checking to cover
src-framer
. I did my best to patch up the code here, but any tips would be great.Finally, there seems to be an issue with the
scripts/eslint-plugin-i18n/i18n.js
- it seems to be exploding on render props that have no arguments, e.g.src/components/steps/step_number.tsx
. In the former's case, I can probably make it more robust, but in the latter's case I don't understand why it's usingEuiI18n
at all - @chandlerprall any ideas?