forked from radix-ui/primitives
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
32 lines (31 loc) · 858 Bytes
/
eslint.config.mjs
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
// @ts-check
import * as react from '@chance/eslint/react';
import * as js from '@chance/eslint';
import * as typescript from '@chance/eslint/typescript';
import storybook from 'eslint-plugin-storybook';
/** @type {import("eslint").Linter.Config[]} */
export default [
js.config,
typescript.config,
react.config,
...storybook.configs['flat/recommended'],
{
rules: {
'react/jsx-pascal-case': ['warn', { allowNamespace: true }],
// TODO: enable this and fix all the errors
'react/display-name': 'off',
'prefer-const': ['warn', { destructuring: 'all' }],
'jsx-a11y/label-has-associated-control': [
'warn',
{
controlComponents: ['Checkbox'],
depth: 3,
},
],
},
},
{
files: ['**/*.js', '**/*.mjs', '**/*.ts', '**/*.tsx'],
ignores: ['dist/**'],
},
];