Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 9 additions & 7 deletions eslint.config-content.js
Original file line number Diff line number Diff line change
@@ -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,
]);
7 changes: 4 additions & 3 deletions examples/react/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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: {
Expand All @@ -32,4 +33,4 @@ export default [
},
},
},
];
]);
7 changes: 4 additions & 3 deletions examples/typescript/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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(
Copy link
Member Author

Choose a reason for hiding this comment

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

tseslint.config() is now deprecated:

Image

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"],
})),
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eslint/markdown",
"version": "7.5.1",
"exports": "./dist/esm/index.js",
"exports": "./dist/index.js",
"publish": {
"include": [
"dist",
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"declaration": true,
"allowJs": true,
"checkJs": true,
"outDir": "dist/esm",
"outDir": "dist",
"target": "ES2022",
"moduleResolution": "NodeNext",
"module": "NodeNext"
Expand Down