Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

Commit f06e8e0

Browse files
committed
fix lint
1 parent ff46d48 commit f06e8e0

File tree

2 files changed

+41
-21
lines changed

2 files changed

+41
-21
lines changed

.eslintrc.cjs

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
module.exports = {
22
root: true,
3-
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:ssr-friendly/recommended', 'plugin:storybook/recommended', 'plugin:prettier/recommended'],
3+
extends: [
4+
'plugin:@typescript-eslint/recommended',
5+
'plugin:react-hooks/recommended',
6+
'plugin:ssr-friendly/recommended',
7+
'plugin:storybook/recommended',
8+
'plugin:prettier/recommended',
9+
],
410
parser: '@typescript-eslint/parser',
511
parserOptions: {
612
ecmaFeatures: {
@@ -16,16 +22,19 @@ module.exports = {
1622
* Allow empty arrow functions `() => {}`, while keeping other empty functions restricted
1723
* @see https://eslint.org/docs/latest/rules/no-empty-function#allow-arrowfunctions
1824
*/
19-
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
25+
'@typescript-eslint/no-empty-function': [
26+
'error',
27+
{allow: ['arrowFunctions']},
28+
],
2029
'@typescript-eslint/ban-ts-comment': 1,
2130
'no-const-assign': 'error',
2231
/** Restrict imports from devDependencies since they are not included in library build. peerDependencies are ok */
2332
'import/no-extraneous-dependencies': [
2433
'error',
2534
{
2635
devDependencies: false,
27-
peerDependencies: true
28-
}
36+
peerDependencies: true,
37+
},
2938
],
3039
/**
3140
* Enforce import order with empty lines between import group
@@ -38,16 +47,16 @@ module.exports = {
3847
'builtin',
3948
'external',
4049
'internal',
41-
['parent', 'sibling', 'index']
50+
['parent', 'sibling', 'index'],
4251
],
4352
pathGroups: [
4453
{
4554
pattern: '@/**',
46-
group: 'internal'
47-
}
55+
group: 'internal',
56+
},
4857
],
49-
'newlines-between': 'always'
50-
}
58+
'newlines-between': 'always',
59+
},
5160
],
5261
/**
5362
* Disallow combined module and type imports like this `import React, {FC} from 'react'`.
@@ -56,27 +65,37 @@ module.exports = {
5665
*/
5766
'@typescript-eslint/consistent-type-imports': 'error',
5867
'import/no-cycle': 'error',
59-
'prettier/prettier': ['error', {
60-
"semi": true,
61-
"singleQuote": true,
62-
"jsxSingleQuote": false,
63-
"trailingComma": "es5",
64-
"bracketSpacing": false,
65-
"jsxBracketSameLine": true,
66-
"arrowParens": "avoid"
67-
}]
68+
'prettier/prettier': [
69+
'error',
70+
{
71+
semi: true,
72+
singleQuote: true,
73+
jsxSingleQuote: false,
74+
trailingComma: 'es5',
75+
bracketSpacing: false,
76+
jsxBracketSameLine: true,
77+
arrowParens: 'avoid',
78+
},
79+
],
6880
},
6981
overrides: [
7082
{
7183
/* Allow devDependencies imports for tests and config files */
72-
files: ['*.js'],
84+
files: ['*.js', '*.cjs'],
7385
rules: {
7486
'@typescript-eslint/no-var-requires': 0,
7587
},
7688
},
7789
{
7890
/* Allow devDependencies imports for tests and config files */
79-
files: ['**/*.spec.*', '**/testUtils/*.*', '**/*.js', '**/setupTests.ts', '**/*.stories.*'],
91+
files: [
92+
'**/*.spec.*',
93+
'**/testUtils/*.*',
94+
'**/*.js',
95+
'**/*.cjs',
96+
'**/setupTests.ts',
97+
'**/*.stories.*',
98+
],
8099
rules: {
81100
'import/no-extraneous-dependencies': [
82101
'error',

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
},
2323
"include": [
2424
"src",
25-
"**.js"
25+
"**.js",
26+
"**.cjs"
2627
]
2728
}

0 commit comments

Comments
 (0)