Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Rename to @eslint/markdown #265

Merged
merged 8 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
- run: 'npx @humanwhocodes/tweet "eslint-plugin-markdown v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released: ${{ steps.release.outputs.html_url }}"'
- run: 'npx @humanwhocodes/tweet "eslint/markdown v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released: ${{ steps.release.outputs.html_url }}"'
if: ${{ steps.release.outputs.release_created }}
env:
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
- run: 'npx @humanwhocodes/toot "eslint-plugin-markdown v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released: ${{ steps.release.outputs.html_url }}"'
- run: 'npx @humanwhocodes/toot "eslint/markdown v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released: ${{ steps.release.outputs.html_url }}"'
if: ${{ steps.release.outputs.release_created }}
env:
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright JS Foundation and other contributors, https://js.foundation
Copyright OpenJS Foundation and other contributors, https://openjsf.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# eslint-plugin-markdown
# ESLint Markdown Language Plugins

mdjermanovic marked this conversation as resolved.
Show resolved Hide resolved
[![npm Version](https://img.shields.io/npm/v/eslint-plugin-markdown.svg)](https://www.npmjs.com/package/eslint-plugin-markdown)
[![Downloads](https://img.shields.io/npm/dm/eslint-plugin-markdown.svg)](https://www.npmjs.com/package/eslint-plugin-markdown)
[![Build Status](https://github.com/eslint/eslint-plugin-markdown/workflows/CI/badge.svg)](https://github.com/eslint/eslint-plugin-markdown/actions)
[![npm Version](https://img.shields.io/npm/v/@eslint/markdown.svg)](https://www.npmjs.com/package/@eslint/markdown)
[![Downloads](https://img.shields.io/npm/dm/@eslint/markdown.svg)](https://www.npmjs.com/package/@eslint/markdown)
[![Build Status](https://github.com/eslint/markdown/workflows/CI/badge.svg)](https://github.com/eslint/markdown/actions)

Lint JS, JSX, TypeScript, and more inside Markdown.

Expand All @@ -20,16 +20,16 @@ Lint JS, JSX, TypeScript, and more inside Markdown.
Install the plugin alongside ESLint v8 or greater:

```sh
npm install --save-dev eslint eslint-plugin-markdown
npm install --save-dev eslint @eslint/markdown
```

### Configuring

In your `eslint.config.js` file, import `eslint-plugin-markdown` and include the recommended config to enable the Markdown processor on all `.md` files:
In your `eslint.config.js` file, import `@eslint/markdown` and include the recommended config to enable the Markdown processor on all `.md` files:

```js
// eslint.config.js
import markdown from "eslint-plugin-markdown";
import markdown from "@eslint/markdown";

export default [
...markdown.configs.recommended
Expand Down Expand Up @@ -59,7 +59,7 @@ Here's an example:

```js
// eslint.config.js
import markdown from "eslint-plugin-markdown";
import markdown from "@eslint/markdown";

export default [
{
Expand Down Expand Up @@ -102,7 +102,7 @@ Use glob patterns to disable more rules just for Markdown code blocks:

```js
// / eslint.config.js
import markdown from "eslint-plugin-markdown";
import markdown from "@eslint/markdown";

export default [
{
Expand Down Expand Up @@ -271,15 +271,15 @@ console.log("This code block is linted normally.");

The [`linter-eslint`](https://atom.io/packages/linter-eslint) package allows for linting within the [Atom IDE](https://atom.io/).

In order to see `eslint-plugin-markdown` work its magic within Markdown code blocks in your Atom editor, you can go to `linter-eslint`'s settings and within "List of scopes to run ESLint on...", add the cursor scope "source.gfm".
In order to see `@eslint/markdown` work its magic within Markdown code blocks in your Atom editor, you can go to `linter-eslint`'s settings and within "List of scopes to run ESLint on...", add the cursor scope "source.gfm".

However, this reports a problem when viewing Markdown which does not have configuration, so you may wish to use the cursor scope "source.embedded.js", but note that `eslint-plugin-markdown` configuration comments and skip directives won't work in this context.
However, this reports a problem when viewing Markdown which does not have configuration, so you may wish to use the cursor scope "source.embedded.js", but note that `@eslint/markdown` configuration comments and skip directives won't work in this context.

## Contributing

```sh
$ git clone https://github.com/eslint/eslint-plugin-markdown.git
$ cd eslint-plugin-markdown
$ git clone https://github.com/eslint/markdown.git
$ cd markdown
$ npm install
nzakas marked this conversation as resolved.
Show resolved Hide resolved
$ npm test
```
Expand Down
19 changes: 8 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-markdown",
"name": "@eslint/markdown",
"version": "5.1.0",
"description": "An ESLint plugin to lint JavaScript in Markdown code fences.",
"description": "The official ESLint language plugin for Markdown",
"license": "MIT",
"author": {
"name": "Brandon Mills",
Expand All @@ -17,11 +17,14 @@
"files": [
"src"
],
"repository": "eslint/eslint-plugin-markdown",
"publishConfig": {
"access": "public"
},
"repository": "eslint/markdown",
mdjermanovic marked this conversation as resolved.
Show resolved Hide resolved
"bugs": {
"url": "https://github.com/eslint/eslint-plugin-markdown/issues"
"url": "https://github.com/eslint/markdown/issues"
},
"homepage": "https://github.com/eslint/eslint-plugin-markdown#readme",
"homepage": "https://github.com/eslint/markdown#readme",
"keywords": [
"eslint",
"eslintplugin",
Expand All @@ -32,11 +35,6 @@
"scripts": {
"lint": "eslint .",
"prepare": "node ./npm-prepare.cjs",
"release:generate:latest": "eslint-generate-release",
"release:generate:alpha": "eslint-generate-prerelease alpha",
"release:generate:beta": "eslint-generate-prerelease beta",
"release:generate:rc": "eslint-generate-prerelease rc",
"release:publish": "eslint-publish-release",
"test": "c8 mocha \"tests/**/*.test.js\" --timeout 30000"
},
"devDependencies": {
Expand All @@ -46,7 +44,6 @@
"chai": "^5.1.1",
"eslint": "^9.4.0",
"eslint-config-eslint": "^11.0.0",
"eslint-release": "^3.1.2",
"globals": "^15.1.0",
"mocha": "^10.6.0"
},
Expand Down
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
* @author Brandon Mills
*/

//-----------------------------------------------------------------------------
// Imports
//-----------------------------------------------------------------------------

import { processor } from "./processor.js";


nzakas marked this conversation as resolved.
Show resolved Hide resolved

Check failure on line 13 in src/index.js

View workflow job for this annotation

GitHub Actions / Lint

More than 2 blank lines not allowed
const rulesConfig = {

// The Markdown parser automatically trims trailing
Expand All @@ -30,7 +36,7 @@

const plugin = {
meta: {
name: "eslint-plugin-markdown",
name: "@eslint/markdown",
nzakas marked this conversation as resolved.
Show resolved Hide resolved
version: "5.1.0" // x-release-please-version
},
processors: {
Expand Down
2 changes: 1 addition & 1 deletion src/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ function postprocess(messages, filename) {

export const processor = {
meta: {
name: "eslint-plugin-markdown/markdown",
name: "@eslint/markdown/markdown",
nzakas marked this conversation as resolved.
Show resolved Hide resolved
version: "5.1.0" // x-release-please-version
},
preprocess,
Expand Down
Loading