diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cb02856..4fe576db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: - name: Check Types run: npm run test:types - are-the-types-wrong: + are_the_types_wrong: name: Are the types wrong? runs-on: ubuntu-latest steps: diff --git a/eslint.config-content.js b/eslint.config-content.js index 67555d9f..506ab8af 100644 --- a/eslint.config-content.js +++ b/eslint.config-content.js @@ -1,9 +1,11 @@ +import { defineConfig, globalIgnores } from "eslint/config"; import markdown from "./src/index.js"; -export default [ - { - name: "markdown/content/ignores", - ignores: ["**/*.js", "**/.cjs", "**/.mjs"], - }, - ...markdown.configs.recommended, -]; +export default defineConfig([ + globalIgnores( + ["**/*.js", "**/.cjs", "**/.mjs"], + "markdown/content/ignores", + ), + + markdown.configs.recommended, +]); diff --git a/examples/react/eslint.config.mjs b/examples/react/eslint.config.mjs index 5e49ab77..5ef86860 100644 --- a/examples/react/eslint.config.mjs +++ b/examples/react/eslint.config.mjs @@ -1,11 +1,12 @@ +import { defineConfig } from "eslint/config"; import js from "@eslint/js"; import markdown from "../../src/index.js"; import globals from "globals"; import reactPlugin from "eslint-plugin-react"; -export default [ +export default defineConfig([ js.configs.recommended, - ...markdown.configs.processor, + markdown.configs.processor, reactPlugin.configs.flat.recommended, { settings: { @@ -32,4 +33,4 @@ export default [ }, }, }, -]; +]); diff --git a/examples/typescript/eslint.config.mjs b/examples/typescript/eslint.config.mjs index cdd969e2..eb8def8e 100644 --- a/examples/typescript/eslint.config.mjs +++ b/examples/typescript/eslint.config.mjs @@ -1,11 +1,12 @@ +import { defineConfig } from "eslint/config"; import js from "@eslint/js"; import markdown from "../../src/index.js"; import tseslint from "typescript-eslint"; -export default tseslint.config( +export default defineConfig( js.configs.recommended, - ...markdown.configs.processor, - ...tseslint.configs.recommended.map(config => ({ + markdown.configs.processor, + tseslint.configs.recommended.map(config => ({ ...config, files: ["**/*.ts"], })), diff --git a/jsr.json b/jsr.json index 9b54fbcf..68627b99 100644 --- a/jsr.json +++ b/jsr.json @@ -1,7 +1,7 @@ { "name": "@eslint/markdown", "version": "7.5.1", - "exports": "./dist/esm/index.js", + "exports": "./dist/index.js", "publish": { "include": [ "dist", diff --git a/package.json b/package.json index 74b25916..1778a1f8 100644 --- a/package.json +++ b/package.json @@ -8,12 +8,12 @@ "url": "https://github.com/btmills" }, "type": "module", - "main": "dist/esm/index.js", - "types": "dist/esm/index.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "exports": { ".": { - "types": "./dist/esm/index.d.ts", - "default": "./dist/esm/index.js" + "types": "./dist/index.d.ts", + "default": "./dist/index.js" } }, "files": [ @@ -62,9 +62,10 @@ "lint:unused": "knip", "fmt": "prettier --write .", "fmt:check": "prettier --check .", + "build": "npm run build:rules && npm run build:types && npm run build:update-rules-docs", "build:rules": "node tools/build-rules.js", + "build:types": "tsc", "build:update-rules-docs": "node tools/update-rules-docs.js", - "build": "npm run build:rules && tsc && npm run build:update-rules-docs", "prepare": "npm run build", "test": "mocha \"tests/**/*.test.js\" --timeout 30000", "test:coverage": "c8 npm test", diff --git a/tsconfig.json b/tsconfig.json index 9cd89cf8..2c2f7673 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "declaration": true, "allowJs": true, "checkJs": true, - "outDir": "dist/esm", + "outDir": "dist", "target": "ES2022", "moduleResolution": "NodeNext", "module": "NodeNext"