Compare commits

...

8 Commits

Author SHA1 Message Date
OrbisK
6918ea0d72
Merge 38bfe2a6bc into 9bf8465806 2024-11-19 23:30:27 +02:00
Jan-Niklas W.
9bf8465806
docs: update getting started to include WebStorm (#29845) 2024-11-19 20:39:14 +00:00
renovate[bot]
f94d3f2bc6
chore(deps): update resolutions @types/node to v22.9.1 (main) (#29981)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-19 15:32:36 -05:00
renovate[bot]
9c8cd4b74b
chore(deps): update devdependency eslint-plugin-perfectionist to v4 (main) (#29982)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Roe <daniel@roe.dev>
2024-11-19 15:32:33 -05:00
Robin Kehl
38bfe2a6bc chore: update map type 2024-11-19 16:44:37 +01:00
Robin Kehl
06add6e7fb chore: clarify duplicate import message 2024-11-19 15:48:06 +01:00
Robin Kehl
6aa5d12652 chore: clarify duplicate import message 2024-11-19 15:42:10 +01:00
Robin Kehl
05403910ac feat: add warning if some preset import is overridden 2024-11-19 15:25:08 +01:00
5 changed files with 201 additions and 257 deletions

View File

@ -21,8 +21,8 @@ Or follow the steps below to set up a new Nuxt project on your computer.
<!-- markdownlint-disable-next-line MD001 -->
#### Prerequisites
- **Node.js** - [`v18.0.0`](https://nodejs.org/en) or newer
- **Text editor** - We recommend [Visual Studio Code](https://code.visualstudio.com/) with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously known as Volar)
- **Node.js** - [`18.x`](https://nodejs.org/en) or newer (but we recommend the [active LTS release](https://github.com/nodejs/release#release-schedule))
- **Text editor** - There is no IDE requirement, but we recommend [Visual Studio Code](https://code.visualstudio.com/) with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously known as Volar) or [WebStorm](https://www.jetbrains.com/webstorm/), which, along with [other JetBrains IDEs](https://www.jetbrains.com/ides/), offers great Nuxt support right out-of-the-box.
- **Terminal** - In order to run Nuxt commands
::note

View File

@ -189,7 +189,6 @@ export default createConfigForNuxt({
},
},
// Sort rule keys in eslint config
// @ts-expect-error incorrect types 🤔
{
files: ['**/eslint.config.mjs'],
name: 'local/sort-eslint-config',

View File

@ -40,7 +40,7 @@
"@nuxt/ui-templates": "workspace:*",
"@nuxt/vite-builder": "workspace:*",
"@nuxt/webpack-builder": "workspace:*",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@unhead/dom": "1.11.11",
"@unhead/shared": "1.11.11",
"@unhead/vue": "1.11.11",
@ -75,7 +75,7 @@
"@nuxt/webpack-builder": "workspace:*",
"@testing-library/vue": "8.1.0",
"@types/eslint__js": "8.42.3",
"@types/node": "22.9.0",
"@types/node": "22.9.1",
"@types/semver": "7.5.8",
"@unhead/schema": "1.11.11",
"@unhead/vue": "1.11.11",
@ -91,7 +91,7 @@
"devalue": "5.1.1",
"eslint": "9.15.0",
"eslint-plugin-no-only-tests": "3.3.0",
"eslint-plugin-perfectionist": "3.9.1",
"eslint-plugin-perfectionist": "4.0.2",
"eslint-typegen": "0.3.2",
"h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e",
"happy-dom": "15.11.6",

View File

@ -122,7 +122,25 @@ export default defineNuxtModule<Partial<ImportsOptions>>({
const scannedImports = await scanDirExports(composablesDirs, {
fileFilter: file => !isIgnored(file),
})
const presetMap = new Map<string, string>()
for (const preset of presets) {
preset.imports = preset.imports ?? []
for (const i of preset.imports) {
presetMap.set(i, preset.from)
}
presetMap.set(preset.as, preset.from)
}
for (const i of scannedImports) {
const name = i.as ?? i.name
const preset = presetMap.get(name)
if (preset) {
console.warn(`[imports] "${name}" is already defined and auto imported from "${preset ?? 'unknown preset'}" within nuxt itself. Please consider renaming "${name}" at ${i.from}.`)
}
i.priority = i.priority || priorities.find(([dir]) => i.from.startsWith(dir))?.[1]
}
imports.push(...scannedImports)

File diff suppressed because it is too large Load Diff