-
-
Notifications
You must be signed in to change notification settings - Fork 185
/
eslint.config.js
38 lines (37 loc) · 1.25 KB
/
eslint.config.js
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
const { configs: eslintConfigs } = require('@eslint/js');
const eslintPluginN = require('eslint-plugin-n');
const eslintPluginEslintComments = require('@eslint-community/eslint-plugin-eslint-comments');
const eslintPluginEslintPluginRecommended = require('eslint-plugin-eslint-plugin/configs/recommended');
const eslintPluginMdx = require('eslint-plugin-mdx');
const eslintPluginPrettierRecommended = require('./recommended');
module.exports = [
eslintConfigs.recommended,
eslintPluginN.configs['flat/recommended'],
// eslint-community/eslint-comments does not expose a reusable flat config,
// so create one from its legacy config
{
plugins: {
'@eslint-community/eslint-comments': eslintPluginEslintComments,
},
rules: eslintPluginEslintComments.configs.recommended.rules,
},
eslintPluginEslintPluginRecommended,
eslintPluginMdx.flat,
eslintPluginMdx.flatCodeBlocks,
eslintPluginPrettierRecommended,
{
rules: {
'eslint-plugin/report-message-format': ['error', '^[^a-z].*\\.$'],
},
},
// Global ignores
// If a config block only contains an `ignores` key, then the globs are
// ignored globally
{
ignores: [
'CHANGELOG.md',
'.github/ISSUE_TEMPLATE.md',
'test/fixtures/**/*',
],
},
];