-
-
Notifications
You must be signed in to change notification settings - Fork 109
/
eslint.config.js
43 lines (40 loc) · 1.13 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
39
40
41
42
43
'use strict';
const jsPlugin = require('@eslint/js');
const prettierConfig = require('eslint-config-prettier');
const eslintPluginRecommendedConfig = require('eslint-plugin-eslint-plugin/configs/recommended');
const eslintPluginConfigs = [
eslintPluginRecommendedConfig,
{
rules: {
'eslint-plugin/prefer-message-ids': 'off', // TODO: enable
'eslint-plugin/require-meta-docs-description': ['error', { pattern: '^(Detects|Enforces|Requires|Disallows) .+\\.$' }],
'eslint-plugin/require-meta-docs-url': [
'error',
{
pattern: 'https://github.com/eslint-community/eslint-plugin-security/blob/main/docs/rules/{{name}}.md',
},
],
'eslint-plugin/require-meta-schema': 'off', // TODO: enable
'eslint-plugin/require-meta-type': 'off', // TODO: enable
},
},
];
module.exports = [
jsPlugin.configs.recommended,
prettierConfig,
...eslintPluginConfigs,
{
languageOptions: {
sourceType: 'commonjs',
},
},
{
files: ['test/**/*.js'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
},
},
},
];