-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy patheslint.config.js
More file actions
49 lines (48 loc) · 1.65 KB
/
Copy patheslint.config.js
File metadata and controls
49 lines (48 loc) · 1.65 KB
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
import { defineConfig } from 'eslint/config';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import reactHooks from 'eslint-plugin-react-hooks';
import eslintConfigPrettier from 'eslint-config-prettier';
export default defineConfig(
{
ignores: [
'**/dist/**',
'**/node_modules/**',
// NOTE: `.storybook/` is deliberately NOT ignored. It holds the shared
// decorators, the color-scheme context and the react-scan gate — real
// code that the story files import, and that lint has to see.
// Build output — companion to `3a1b045 chore: gitignore storybook-static/`,
// which added the artifact dir to .gitignore but missed the eslint
// config. Linting bundled JS produces tens of thousands of false-
// positive errors against minified code.
'**/storybook-static/**',
// Stryker mutation-audit working copy + report output (one-off audit,
// see packages/engine/stryker.conf.json).
'**/.stryker-tmp/**',
'**/reports/mutation/**',
],
},
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
plugins: {
'react-hooks': reactHooks,
},
rules: {
...reactHooks.configs.recommended.rules,
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
},
eslintConfigPrettier
);