-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.cjs
66 lines (66 loc) · 1.81 KB
/
.eslintrc.cjs
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
module.exports = {
env: {
node: true,
},
extends: ['prettier'],
overrides: [
{
files: ['src/**/*.d.ts', 'tsup.config.ts', 'vitest.config.ts', '*.stories.{ts,tsx}'],
rules: {
'import/no-default-export': 'off',
'react/no-multi-comp': 0,
},
},
],
parserOptions: {
extraFileExtensions: ['.cjs', '.mjs'],
project: 'tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
plugins: ['sort-keys'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
curly: ['error', 'multi-line'],
'import/no-default-export': 'error',
'import/no-extraneous-dependencies': 2,
'import/no-unresolved': 'off',
'import/order': [
'error',
{
alphabetize: {
caseInsensitive: true,
order: 'asc',
},
groups: ['builtin', 'external', 'type', 'internal', 'parent', 'sibling', 'index'],
},
],
'no-restricted-imports': [
'error',
{
paths: [
{
importNames: ['sx', 'style', 'recipe', 'vars', 'LocalThemeProvider'],
message: "Please import from 'features/theme' or directly e.g. '@vanilla-extract/css'.",
name: '@input-output-hk/lace-ui-toolkit',
},
],
},
],
'promise/avoid-new': 'off',
'react/jsx-curly-brace-presence': 2,
'react/jsx-handler-names': 'off',
'react/react-in-jsx-scope': 'off',
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
'sort-keys/sort-keys-fix': ['error', 'asc', { natural: true }],
'unicorn/no-null': 'off',
'unicorn/prefer-query-selector': 'off',
},
};