-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.js
50 lines (49 loc) · 1004 Bytes
/
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
import { svelte } from '@reuters-graphics/yaks-eslint';
import reactPlugin from 'eslint-plugin-react';
import * as mdx from 'eslint-plugin-mdx';
/**
* @type {import("eslint").Linter.Config[]}
*/
export default [
{
files: ['src/**/*.{js,ts,svelte,jsx,tsx,mdx}', '.storybook/**/*'],
},
{
ignores: [
'node_modules/',
'docs/',
'dist/',
'.storybook/svelte-highlighting.js',
'bin/css-to-js/',
'bin/newComponent/',
'.svelte-kit/',
],
},
...svelte,
reactPlugin.configs.flat.recommended,
{
settings: { react: { version: '18.2' } },
rules: {
'react/prop-types': [
'error',
{
skipUndeclared: true,
},
],
},
},
{
...mdx.flat,
processor: mdx.createRemarkProcessor({
lintCodeBlocks: true,
}),
},
{
...mdx.flatCodeBlocks,
rules: {
...mdx.flatCodeBlocks.rules,
'no-undef': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
];