-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy patheslint.config.js
70 lines (69 loc) · 1.79 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import babelParser from '@babel/eslint-parser';
import markdown from '@eslint/markdown';
import json from '@eslint/json';
import js from '@eslint/js';
import globals from 'globals';
import noOnlyTests from 'eslint-plugin-no-only-tests';
export default [
{
// https://github.com/eslint/eslint/discussions/18304#discussioncomment-9069706
ignores: [
'.greenwood/*',
'node_modules/*',
'public/*',
'reports/*',
'coverage/*',
// 'packages/plugin-graphql/README.md',
'www/**'
],
},
{
languageOptions: {
parser: babelParser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
plugins: ['@babel/plugin-syntax-import-assertions', '@babel/plugin-syntax-jsx'],
},
},
globals: {
...globals.browser,
...globals.mocha,
...globals.chai,
...globals.node,
},
},
rules: {
...js.configs.recommended.rules,
// turn this off for Prettier
'no-irregular-whitespace': 'off',
'no-only-tests/no-only-tests': 'error',
},
plugins: {
'no-only-tests': noOnlyTests,
},
},
{
// https://github.com/eslint/json#recommended-configuration
files: ['**/*.json'],
ignores: ['package-lock.json'],
language: 'json/json',
rules: json.configs.recommended.rules,
plugins: {
json,
},
},
{
// note: we can only lint code fences, _or_ the markdown files themselves
// so for now we will just lint the code fences
// https://github.com/eslint/markdown/blob/main/docs/processors/markdown.md#using-the-markdown-processor
files: ['**/*.md'],
processor: 'markdown/markdown',
plugins: {
markdown,
},
language: 'markdown/gfm',
},
];