forked from nuxt/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to eslint v9 (nuxt#955)
- Loading branch information
Showing
10 changed files
with
1,019 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// @ts-check | ||
import { createConfigForNuxt } from '@nuxt/eslint-config/flat' | ||
|
||
export default createConfigForNuxt({ | ||
features: { | ||
tooling: true, | ||
stylistic: true, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,5 @@ export const categories = [ | |
'Request', | ||
'SEO', | ||
'Security', | ||
'UI' | ||
'UI', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
import { resolve } from 'path' | ||
import { resolve } from 'node:path' | ||
import { ofetch } from 'ofetch' | ||
|
||
export const rootDir = resolve(__dirname, '..') | ||
export const modulesDir = resolve(rootDir, 'modules') | ||
export const distDir = resolve(rootDir) | ||
export const distFile = resolve(distDir, 'modules.json') | ||
|
||
export function fetchPKG (name) { | ||
export function fetchPKG(name) { | ||
return ofetch('http://registry.npmjs.org/' + name) | ||
} | ||
|
||
export function fetchRawGithub (path) { | ||
export function fetchRawGithub(path) { | ||
return ofetch('https://raw.githubusercontent.com/' + path, { responseType: 'json' }) | ||
} | ||
|
||
export function fetchGithubPkg (repo) { | ||
let path | ||
export function fetchGithubPkg(repo) { | ||
let path: string | ||
// HEAD will be the default branch | ||
[repo, path = 'HEAD'] = repo.split('#') | ||
|
||
return fetchRawGithub(repo + '/' + path + '/' + 'package.json') | ||
} | ||
|
||
export function uniq (items: any[]) { | ||
export function uniq<T>(items: T[]) { | ||
return Array.from(new Set(items)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,17 +16,17 @@ | |
"cli": "jiti ./lib/cli", | ||
"website:build": "pnpm build && nuxi build website", | ||
"website:dev": "pnpm build && nuxi dev website", | ||
"lint": "eslint --ext .", | ||
"lint": "eslint", | ||
"release": "pnpm cli version && npm publish", | ||
"sync": "pnpm cli sync", | ||
"test": "pnpm lint && pnpm sync" | ||
}, | ||
"devDependencies": { | ||
"@nuxt/eslint-config": "^0.2.0", | ||
"@nuxt/eslint-config": "^0.3.10", | ||
"@types/js-yaml": "^4.0.5", | ||
"@types/node": "^18.17.15", | ||
"defu": "^6.1.2", | ||
"eslint": "^8.49.0", | ||
"eslint": "^9.2.0", | ||
"globby": "^13.2.2", | ||
"hasha": "^5.2.2", | ||
"jiti": "^1.20.0", | ||
|
@@ -36,4 +36,4 @@ | |
"typescript": "^5.2.2" | ||
}, | ||
"packageManager": "[email protected]" | ||
} | ||
} |
Oops, something went wrong.