diff --git a/package.json b/package.json index f220793..4aa9dc3 100644 --- a/package.json +++ b/package.json @@ -7,20 +7,18 @@ "author": "Louis Haftmann", "license": "MIT", "scripts": { - "lint": "pnpm -r run stub && eslint .", + "lint": "eslint .", "test": "pnpm -r run test", "build": "pnpm -r run build", - "prepare": "pnpm -r run stub", "release": "bumpp -r && pnpm run publish", "publish": "pnpm -r publish --filter=!@louishaftmann/config-monorepo --no-git-checks --access public" }, "devDependencies": { "@louishaftmann/eslint-config": "workspace:*", "@louishaftmann/prettier-config": "workspace:*", - "bumpp": "^9.4.1", - "eslint": "^8.57.0", - "rimraf": "^5.0.7", - "typescript": "^5.4.5" + "bumpp": "^9.4.2", + "eslint": "^9.8.0", + "typescript": "^5.5.4" }, "changelogithub": { "extends": "gh:falcondev-it/configs/changelogithub" diff --git a/packages/eslint-config/github.js b/packages/eslint-config/github.js index 2cf187d..32de570 100644 --- a/packages/eslint-config/github.js +++ b/packages/eslint-config/github.js @@ -1,3 +1,4 @@ +import { fixupPluginRules } from '@eslint/compat' import { FlatCompat } from '@eslint/eslintrc' const compat = new FlatCompat() @@ -21,13 +22,14 @@ const github = compat.extends('plugin:github/recommended').map((configItem, inde delete configItem.plugins['eslint-comments'] delete configItem.plugins.import delete configItem.plugins.prettier + configItem.plugins.github = fixupPluginRules(configItem.plugins.github) } configItem.name = `github/${index}` return configItem }) -/** @type {import('eslint').Linter.FlatConfig[]} */ +/** @type {import('eslint').Linter.Config[]} */ export default [ ...github, { diff --git a/packages/eslint-config/index.d.ts b/packages/eslint-config/index.d.ts index 7a5ea3d..062d28d 100644 --- a/packages/eslint-config/index.d.ts +++ b/packages/eslint-config/index.d.ts @@ -1,11 +1,9 @@ -import type { TypedFlatConfigItem } from '@antfu/eslint-config' import type antfu from '@antfu/eslint-config' declare function eslintConfig(config: { nuxt: boolean unicorn?: boolean - tsconfigPath?: string[] - /** @deprecated */ configs?: TypedFlatConfigItem[] + tsconfigPath?: string }): ReturnType export { eslintConfig, eslintConfig as default } diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 5838864..a402cce 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -1,18 +1,17 @@ import antfu from '@antfu/eslint-config' -import { FlatCompat } from '@eslint/eslintrc' +import shopifyEslintPlugin from '@shopify/eslint-plugin' import eslintConfigPrettier from 'eslint-config-prettier' import eslintPluginCompat from 'eslint-plugin-compat' import eslintPluginUnicorn from 'eslint-plugin-unicorn' +import { loadPackageJSON } from 'local-pkg' import github from './github.js' import nuxtRules from './nuxt.js' delete eslintConfigPrettier.rules['vue/html-self-closing'] -const compat = new FlatCompat() - /** @type {import('./index.d.ts').eslintConfig} */ -export function eslintConfig({ nuxt = false, tsconfigPath, unicorn = false, configs }) { +export function eslintConfig({ nuxt = false, tsconfigPath }) { return antfu({ stylistic: false, @@ -23,8 +22,8 @@ export function eslintConfig({ nuxt = false, tsconfigPath, unicorn = false, conf vue: { sfcBlocks: { blocks: { - styles: false - } + styles: false, + }, }, overrides: { // force