11import stylistic from '@stylistic/eslint-plugin' ;
2- import tseslint from 'typescript-eslint'
2+ import tseslint from 'typescript-eslint' ;
33import js from '@eslint/js' ;
4- import react from 'eslint-plugin-react'
4+ import react from 'eslint-plugin-react' ;
55import reactHooks from 'eslint-plugin-react-hooks' ;
6- import reactRefresh from 'eslint-plugin-react-refresh' ;
7- import globals from 'globals'
6+ import globals from 'globals' ;
87
98export default tseslint . config ( {
10- files : [ 'packages/*/src/**/*.{ts?(x),js?(x)}' ] ,
11- ignores : [ "**/*.test.ts" ] ,
12- extends : [
13- js . configs . recommended ,
14- ...tseslint . configs . recommended ,
15- ] ,
9+ files : [ 'packages/*/{src,__tests__}/**/*.{ts?(x),js?(x)}' ] ,
10+ ignores : [ '**/*.test.ts' ] ,
11+ extends : [ js . configs . recommended , ...tseslint . configs . recommended ] ,
1612 plugins : {
1713 '@stylistic' : stylistic ,
1814 react,
1915 'react-hooks' : reactHooks ,
20- 'react-refresh' : reactRefresh
2116 } ,
2217 languageOptions : {
2318 parserOptions : {
@@ -28,18 +23,22 @@ export default tseslint.config({
2823 globals : {
2924 ...globals . browser ,
3025 ...globals . nodeBuiltin ,
31- ...globals . jest
26+ ...globals . jest ,
3227 } ,
3328 } ,
3429 rules : {
3530 '@stylistic/indent' : [ 'error' , 2 ] ,
3631 '@stylistic/indent-binary-ops' : [ 'error' , 2 ] ,
37- '@stylistic/max-len' : [ 'error' , { tabWidth : 2 , " ignoreStrings" : true } ] ,
32+ '@stylistic/max-len' : [ 'error' , { code : 100 , tabWidth : 2 , ignoreStrings : true , ignoreComments : true } ] ,
3833 '@stylistic/no-tabs' : 'error' ,
3934 '@stylistic/quotes' : [ 'error' , 'single' ] ,
4035 '@stylistic/jsx-pascal-case' : [ 2 ] ,
4136 '@stylistic/jsx-indent' : [ 2 , 2 , { checkAttributes : true , indentLogicalExpressions : true } ] ,
4237 '@stylistic/semi' : [ 'error' , 'always' ] ,
38+ '@stylistic/eol-last' : [ 'error' , 'always' ] ,
39+ '@stylistic/jsx-quotes' : [ 'error' , 'prefer-double' ] ,
40+
41+ "@typescript-eslint/ban-ts-comment" : [ "error" , { 'ts-expect-error' : 'allow-with-description' } ] ,
4342
4443 'react/jsx-no-undef' : 'error' ,
4544 'react/jsx-uses-vars' : 'error' ,
@@ -50,7 +49,5 @@ export default tseslint.config({
5049
5150 'react-hooks/rules-of-hooks' : 'error' , // Checks rules of Hooks
5251 'react-hooks/exhaustive-deps' : 'warn' , // Checks effect dependencies
53-
54- 'react-refresh/only-export-components' : 'warn' ,
5552 } ,
56- } )
53+ } ) ;
0 commit comments