-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Enable Prettier * Disable Prettier for Markdown * Fix Markdown
- Loading branch information
Showing
43 changed files
with
5,215 additions
and
4,883 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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
name: Add to Triage | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/add-to-project@v0.4.0 | ||
with: | ||
project-url: https://github.com/orgs/eslint/projects/3 | ||
github-token: ${{ secrets.PROJECT_BOT_TOKEN }} | ||
labeled: "triage:no" | ||
label-operator: NOT | ||
name: Add to Triage | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
|
||
jobs: | ||
add-to-project: | ||
name: Add issue to project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/add-to-project@v0.4.0 | ||
with: | ||
project-url: https://github.com/orgs/eslint/projects/3 | ||
github-token: ${{ secrets.PROJECT_BOT_TOKEN }} | ||
labeled: "triage:no" | ||
label-operator: NOT |
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,56 +1,73 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install Packages | ||
run: npm install | ||
env: | ||
CI: true | ||
- name: Lint | ||
run: npm run lint | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install Packages | ||
run: npm install | ||
env: | ||
CI: true | ||
- name: Lint | ||
run: npm run lint | ||
|
||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
eslint: [9] | ||
node: [22.x, 21.x, 20.x, 18.x, "18.18.0"] | ||
include: | ||
- os: windows-latest | ||
eslint: 9 | ||
node: 20 | ||
- os: macOS-latest | ||
eslint: 9 | ||
node: 20 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install Packages | ||
run: npm install | ||
env: | ||
CI: true | ||
- name: Install ESLint@${{ matrix.eslint }} | ||
run: npm install eslint@${{ matrix.eslint }} | ||
- name: Test | ||
run: npm run test | ||
format: | ||
name: File Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
- name: Install Packages | ||
run: npm install | ||
env: | ||
CI: true | ||
- name: Prettier Check | ||
run: npm run fmt:check | ||
|
||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
eslint: [9] | ||
node: [22.x, 21.x, 20.x, 18.x, "18.18.0"] | ||
include: | ||
- os: windows-latest | ||
eslint: 9 | ||
node: 20 | ||
- os: macOS-latest | ||
eslint: 9 | ||
node: 20 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install Packages | ||
run: npm install | ||
env: | ||
CI: true | ||
- name: Install ESLint@${{ matrix.eslint }} | ||
run: npm install eslint@${{ matrix.eslint }} | ||
- name: Test | ||
run: npm run test |
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,41 +1,41 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
name: release-please | ||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
id-token: write | ||
steps: | ||
- uses: googleapis/release-please-action@v4 | ||
id: release | ||
- uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
registry-url: https://registry.npmjs.org | ||
if: ${{ steps.release.outputs.release_created }} | ||
- run: | | ||
npm install | ||
npm run build --if-present | ||
npm publish --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
if: ${{ steps.release.outputs.release_created }} | ||
- 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/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 }} | ||
MASTODON_HOST: ${{ secrets.MASTODON_HOST }} | ||
release-please: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
id-token: write | ||
steps: | ||
- uses: googleapis/release-please-action@v4 | ||
id: release | ||
- uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
registry-url: https://registry.npmjs.org | ||
if: ${{ steps.release.outputs.release_created }} | ||
- run: | | ||
npm install | ||
npm run build --if-present | ||
npm publish --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
if: ${{ steps.release.outputs.release_created }} | ||
- 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/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 }} | ||
MASTODON_HOST: ${{ secrets.MASTODON_HOST }} |
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,4 @@ | ||
dist | ||
CHANGELOG.md | ||
jsr.json | ||
**/*.md |
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,9 +1,9 @@ | ||
import markdown from "./src/index.js"; | ||
|
||
export default [ | ||
{ | ||
name: "markdown/content/ignores", | ||
ignores: ["**/*.js", "**/.cjs", "**/.mjs"] | ||
}, | ||
...markdown.configs.recommended | ||
{ | ||
name: "markdown/content/ignores", | ||
ignores: ["**/*.js", "**/.cjs", "**/.mjs"], | ||
}, | ||
...markdown.configs.recommended, | ||
]; |
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,71 +1,69 @@ | ||
import globals from "globals"; | ||
import eslintConfigESLint from "eslint-config-eslint"; | ||
import eslintConfigESLintFormatting from "eslint-config-eslint/formatting"; | ||
import markdown from "./src/index.js"; | ||
|
||
export default [ | ||
...eslintConfigESLint, | ||
eslintConfigESLintFormatting, | ||
{ | ||
name: "markdown/plugins", | ||
plugins: { | ||
markdown | ||
} | ||
}, | ||
{ | ||
name: "markdown/ignores", | ||
ignores: [ | ||
"**/examples", | ||
"**/coverage", | ||
"**/tests/fixtures", | ||
"dist", | ||
"src/build/" | ||
] | ||
}, | ||
{ | ||
name: "markdown/tools", | ||
files: ["tools/**/*.js"], | ||
rules: { | ||
"no-console": "off" | ||
} | ||
}, | ||
{ | ||
name: "markdown/tests", | ||
files: ["tests/**/*.js"], | ||
languageOptions: { | ||
globals: { | ||
...globals.mocha | ||
} | ||
}, | ||
rules: { | ||
"no-underscore-dangle": "off" | ||
} | ||
}, | ||
{ | ||
name: "markdown/code-blocks", | ||
files: ["**/*.md"], | ||
processor: "markdown/markdown" | ||
}, | ||
{ | ||
name: "markdown/code-blocks/js", | ||
files: ["**/*.md/*.js"], | ||
languageOptions: { | ||
sourceType: "module", | ||
parserOptions: { | ||
ecmaFeatures: { | ||
impliedStrict: true | ||
} | ||
} | ||
}, | ||
rules: { | ||
"lines-around-comment": "off", | ||
"n/no-missing-import": "off", | ||
"no-var": "off", | ||
"padding-line-between-statements": "off", | ||
"no-console": "off", | ||
"no-alert": "off", | ||
"@eslint-community/eslint-comments/require-description": "off", | ||
"jsdoc/require-jsdoc": "off" | ||
} | ||
} | ||
...eslintConfigESLint, | ||
{ | ||
name: "markdown/plugins", | ||
plugins: { | ||
markdown, | ||
}, | ||
}, | ||
{ | ||
name: "markdown/ignores", | ||
ignores: [ | ||
"**/examples", | ||
"**/coverage", | ||
"**/tests/fixtures", | ||
"dist", | ||
"src/build/", | ||
], | ||
}, | ||
{ | ||
name: "markdown/tools", | ||
files: ["tools/**/*.js"], | ||
rules: { | ||
"no-console": "off", | ||
}, | ||
}, | ||
{ | ||
name: "markdown/tests", | ||
files: ["tests/**/*.js"], | ||
languageOptions: { | ||
globals: { | ||
...globals.mocha, | ||
}, | ||
}, | ||
rules: { | ||
"no-underscore-dangle": "off", | ||
}, | ||
}, | ||
{ | ||
name: "markdown/code-blocks", | ||
files: ["**/*.md"], | ||
processor: "markdown/markdown", | ||
}, | ||
{ | ||
name: "markdown/code-blocks/js", | ||
files: ["**/*.md/*.js"], | ||
languageOptions: { | ||
sourceType: "module", | ||
parserOptions: { | ||
ecmaFeatures: { | ||
impliedStrict: true, | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
"lines-around-comment": "off", | ||
"n/no-missing-import": "off", | ||
"no-var": "off", | ||
"padding-line-between-statements": "off", | ||
"no-console": "off", | ||
"no-alert": "off", | ||
"@eslint-community/eslint-comments/require-description": "off", | ||
"jsdoc/require-jsdoc": "off", | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.