Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Conversation

@danielroe
Copy link
Member

❓ Type of change

  • 🧹 Chore

📚 Description

I think our internal lint rule was enforcing the opposite of what we meant to though I may have misunderstood the intent. But we are, I think, violating it here:

import pagesModule from '../pages/module'
import metaModule from '../meta/module'
import componentsModule from '../components/module'
import autoImportsModule from '../auto-imports/module'

This PR is an initial stab meant to highlight the issue - we either need to:

  1. amend lint error description to reflect what it's meant to do
  2. rethink import approach in core/nuxt.ts
  3. remove lint rules

cc: @clarkdo

@danielroe danielroe self-assigned this Feb 17, 2022
@netlify
Copy link

netlify bot commented Feb 17, 2022

✔️ Deploy Preview for nuxt3-docs canceled.

🔨 Explore the source changes: 61c4291

🔍 Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/620e28674f07fc0008abfda2

Copy link
Member

@clarkdo clarkdo left a comment

Choose a reason for hiding this comment

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

This change looks good.

Regaording the lint error after the change, @pi0 should we exclude them from config or refacor the code to forbid importing other pacakges in core/nuxt.ts ?

@danielroe
Copy link
Member Author

danielroe commented Feb 17, 2022

As adding those modules there is temporary, I've disabled the rule for those specific imports.

// Temporary until finding better placement for each
options.appDir = options.alias['#app'] = resolve(distDir, 'app')
options._majorVersion = 3
options._modules.push(pagesModule, metaModule, componentsModule, autoImportsModule)

@danielroe danielroe marked this pull request as ready for review February 17, 2022 10:51
@danielroe danielroe added chore 🧹 p1-chore Priority 1: no change in change code behavior labels Feb 17, 2022
@danielroe danielroe merged commit 65d16a5 into main Feb 17, 2022
@danielroe danielroe deleted the chore/internal-lint-rules branch February 17, 2022 12:01
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3.x chore 🧹 p1-chore Priority 1: no change in change code behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants