Skip to content

Conversation

@ivov
Copy link
Member

@ivov ivov commented Apr 21, 2023

consistent-type-imports is unable to detect usage of components inside Vue templates, causing misfixes of component imports to type imports. This patch for the rule skips over imports where the path ends in .vue, preventing misdetection. This assumes .vue imports are always needed as value imports.

To test:

  • Add '@typescript-eslint/consistent-type-imports': 'error' to packages/@n8n_io/eslint-config/base.js
  • Restart ESLint server
  • Check e.g. packages/editor-ui/src/components/Node/NodeCreator/CategorizedItems.vue at L102 → Line import SearchBar from './SearchBar.vue'; should not be flagged.

Related: #5951

@ivov ivov requested a review from cstuncsik April 21, 2023 12:08
@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.07 ⚠️

Comparison is base (444ed1b) 18.72% compared to head (a5b35e1) 18.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6057      +/-   ##
==========================================
- Coverage   18.72%   18.65%   -0.07%     
==========================================
  Files        2583     2582       -1     
  Lines      116526   116392     -134     
  Branches    18181    18176       -5     
==========================================
- Hits        21821    21717     -104     
+ Misses      94067    94037      -30     
  Partials      638      638              

see 22 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

✅ All Cypress E2E specs passed

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Apr 21, 2023
@ivov ivov merged commit dc2a7a3 into master Apr 21, 2023
@ivov ivov deleted the patch-consistent-type-imports branch April 21, 2023 13:09
@ivov ivov added the tech debt label Apr 21, 2023
MiloradFilipovic added a commit that referenced this pull request Apr 21, 2023
* master:
  feat(core): Add migration to add property userActivated to user settings (no-changelog) (#5940)
  feat(core): Add license:info command (#6047)
  feat: Replace this.$refs.refName as Vue with InstanceType<T> (no-changelog) (#6050)
  refactor(editor): Turn titleChange mixin to composable (#6059)
  test: Add stickies tests (#5413)
  refactor: Patch to adjust `consistent-type-imports` (no-changelog) (#6057)

# Conflicts:
#	packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue
#	packages/editor-ui/src/mixins/workflowRun.ts
MiloradFilipovic added a commit that referenced this pull request Apr 24, 2023
* master: (47 commits)
  feat: Replace Vue.extend with defineComponent in editor-ui (no-changelog) (#6033)
  feat(core): Add migration to add property userActivated to user settings (no-changelog) (#5940)
  feat(core): Add license:info command (#6047)
  feat: Replace this.$refs.refName as Vue with InstanceType<T> (no-changelog) (#6050)
  refactor(editor): Turn titleChange mixin to composable (#6059)
  test: Add stickies tests (#5413)
  refactor: Patch to adjust `consistent-type-imports` (no-changelog) (#6057)
  fix(editor): Resolve expressions for grandparent nodes (#5859)
  ci(editor): Do not run parallel jobs for a single spec (no-changelog) (#6052)
  refactor(editor): Consolidate IN8nUISettings interface (#6055)
  refactor(core): Forbid raw enums (no-changelog)
  refactor(core): Sort variables files under variables folder (#6051)
  fix(core): Add breaking change record for domain and url matching (no-changelog) (#6048)
  feat(editor): Version control paywall (WIP) (#6030)
  feat(editor): Add disable template experiment (#5963)
  feat(core): Upgrade google-timezones-json to use the correct timezone for Sao Paulo (#6042)
  fix(Code Node): Update vm2 to address CVE-2023-30547 (#6039)
  docs: Add proprietary license text (no-changelog) (#6038)
  test(n8n Node): Unit tests (no-changelog)
  refactor: Accumulate `loadOptions` from all node versions to validate (no-changelog) (#6014)
  ...

# Conflicts:
#	packages/cli/src/Server.ts
sunilrr pushed a commit to fl-g6/qp-n8n that referenced this pull request Apr 24, 2023
@janober
Copy link
Member

janober commented May 2, 2023

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team Released tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants