-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.cjs
More file actions
41 lines (40 loc) · 1.03 KB
/
eslint.config.cjs
File metadata and controls
41 lines (40 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
const js = require("@eslint/js");
const docusaurus = require("@docusaurus/eslint-plugin");
const mdx = require("eslint-plugin-mdx");
const prettierPlugin = require("eslint-plugin-prettier");
const prettierConfig = require("eslint-config-prettier");
const typescriptEslint = require("typescript-eslint");
module.exports = [
js.configs.recommended,
...typescriptEslint.configs.recommended.map(config => ({ ...config, files: ['**/*.{ts,tsx}']})),
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: typescriptEslint.parser,
parserOptions: {
project: true,
},
},
},
{
files: ["**/*.{js,jsx,ts,tsx,md,mdx}"],
plugins: {
"@docusaurus": docusaurus,
"prettier": prettierPlugin,
},
rules: {
...docusaurus.configs.recommended.rules,
"prettier/prettier": "error",
},
},
{
...mdx.flat,
processor: mdx.createRemarkProcessor({
lintCodeBlocks: false,
}),
},
prettierConfig,
{
ignores: [".docusaurus/", "build/", "node_modules/"],
},
];