|
| 1 | +import tsParser from '@typescript-eslint/parser' |
1 | 2 | import { configs } from 'eslint-plugin-devup' |
| 3 | +import jsonc from 'eslint-plugin-jsonc' |
| 4 | +import * as mdx from 'eslint-plugin-mdx' |
| 5 | +import jsonParser from 'jsonc-eslint-parser' |
2 | 6 |
|
3 | | -export default configs.recommended |
| 7 | +export default [ |
| 8 | + ...configs.recommended, |
| 9 | + { |
| 10 | + files: ['**/*.{json,json5,jsonc}'], |
| 11 | + languageOptions: { parser: jsonParser }, |
| 12 | + plugins: { jsonc }, |
| 13 | + rules: { |
| 14 | + 'prettier/prettier': 'off', |
| 15 | + 'eol-last': ['error', 'never'], |
| 16 | + 'no-multiple-empty-lines': ['error', { max: 0, maxEOF: 0 }], |
| 17 | + }, |
| 18 | + }, |
| 19 | + { |
| 20 | + ...mdx.flat, |
| 21 | + files: ['**/*.{md,mdx}'], |
| 22 | + processor: mdx.createRemarkProcessor({ |
| 23 | + lintCodeBlocks: true, |
| 24 | + }), |
| 25 | + }, |
| 26 | + { |
| 27 | + ...mdx.flatCodeBlocks, |
| 28 | + files: ['**/*.{md,mdx}/*.{js,jsx,ts,tsx}'], |
| 29 | + languageOptions: { parser: tsParser }, |
| 30 | + rules: { |
| 31 | + ...mdx.flatCodeBlocks.rules, |
| 32 | + 'react/jsx-no-undef': 'off', |
| 33 | + semi: ['error', 'never'], |
| 34 | + quotes: ['error', 'single', { avoidEscape: true }], |
| 35 | + 'react/jsx-tag-spacing': ['error', { beforeClosing: 'never' }], |
| 36 | + }, |
| 37 | + }, |
| 38 | +] |
0 commit comments