-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.js
69 lines (63 loc) · 1.47 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
import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import { configs as lit } from 'eslint-plugin-lit';
import eslintConfigPrettier from 'eslint-config-prettier';
import json from '@eslint/json';
import markdown from '@eslint/markdown';
import storybook from 'eslint-plugin-storybook';
import litA11y from 'eslint-plugin-lit-a11y';
/** @type {import('eslint').Linter.Config[]} */
export default [
{ languageOptions: { globals: globals.browser } },
eslintConfigPrettier,
...storybook.configs['flat/recommended'],
// lint JSON files
{
files: ['**/*.json'],
language: 'json/json',
...json.configs.recommended,
rules: {
'json/no-duplicate-keys': 'error',
'no-irregular-whitespace': 'off',
},
},
// lint MD files
...markdown.configs.recommended,
{
files: ['**/*.md'],
rules: {
'no-irregular-whitespace': 'off',
},
},
// lint JS/TS files
...tseslint.configs.recommended,
{
files: ['**/*.{js,mjs,cjs,ts}'],
...lit['flat/recommended'],
...js.configs.recommended,
rules: {},
},
{
plugins: {
'lit-a11y': litA11y,
},
},
{
ignores: [
'.vscode/*',
'cdn/*',
'dist/*',
'eslint/*',
'plop-templates/*',
'public/*',
'react/*',
'types/*',
'custom-elements.json',
'vscode.css-custom-data.json',
'vscode.html-custom-data.json',
'web-types.json',
'tsconfig.json',
],
},
];