mirror of
https://github.com/google/blockly.git
synced 2026-05-01 17:40:11 +02:00
chore(docs): switch to eslint for mdx linting/formatting
Due to poor Prettier support https://github.com/orgs/mdx-js/discussions/2127
This commit is contained in:
Generated
+1877
-443
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
# Generated API reference docs
|
||||
docs/reference/
|
||||
# Markdown/MDX (linted by ESLint + eslint-plugin-mdx instead)
|
||||
*.md
|
||||
*.mdx
|
||||
|
||||
# Build artifacts
|
||||
build/
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import * as mdx from 'eslint-plugin-mdx';
|
||||
|
||||
export default [
|
||||
{
|
||||
...mdx.flat,
|
||||
files: ['**/*.mdx'],
|
||||
rules: {
|
||||
...mdx.flat.rules,
|
||||
'mdx/remark': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
...mdx.flat,
|
||||
files: ['**/*.md'],
|
||||
...mdx.flatCodeBlocks,
|
||||
rules: {
|
||||
...mdx.flat.rules,
|
||||
...mdx.flatCodeBlocks.rules,
|
||||
'mdx/remark': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['docs/reference/**', 'build/**', '.docusaurus/**', 'node_modules/**'],
|
||||
},
|
||||
];
|
||||
@@ -14,7 +14,9 @@
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check ."
|
||||
"format:check": "prettier --check .",
|
||||
"lint": "eslint 'docs/**/*.mdx'",
|
||||
"lint:fix": "eslint 'docs/**/*.mdx' --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.9.2",
|
||||
@@ -32,6 +34,8 @@
|
||||
"@docsearch/core": "^4.5.2",
|
||||
"@docusaurus/module-type-aliases": "3.9.2",
|
||||
"@docusaurus/types": "3.9.2",
|
||||
"eslint": "^10.1.0",
|
||||
"eslint-plugin-mdx": "^3.7.0",
|
||||
"gh-pages": "^6.3.0",
|
||||
"prettier": "^3.8.1"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user