import { sync as resolve } from 'resolve' ; import { getParseOnlyBabelConfig } from '@reskript/config-babel' ; const config = { extends : [ resolve ( '@ecomfe/eslint-config/strict' ) , resolve ( '@ecomfe/eslint-config/react/strict' ) , resolve ( '@ecomfe/eslint-config/typescript' ) , ] , parserOptions : { babelOptions : getParseOnlyBabelConfig ( { mode : 'development' } ) , } , plugins : [ 'jest' , '@reskript' ] , settings : { react : { version : '17.0' , } , } , env : { 'jest' : true , } , globals : { $features : true , $build : true , } , rules : { 'operator-linebreak' : [ 'error' , 'before' , { overrides : { '=' : 'after' , } , } , ] , camelcase : [ 'error' , { allow : [ '^UNSAFE_' ] } ] , 'react-hooks/exhaustive-deps' : 'warn' , 'consistent-return' : 'off' , 'no-param-reassign' : [ 'warn' , { ignorePropertyModificationsFor : [ 'current' ] } ] , 'react/require-default-props' : 'off' , '@reskript/import-order' : 'error' , '@reskript/hooks-deps-new-line' : 'warn' , '@reskript/no-excessive-hook' : 'warn' , '@reskript/spell-check' : 'warn' , '@typescript-eslint/naming-convention' : 'off' , '@typescript-eslint/await-thenable' : 'off' , '@typescript-eslint/no-var-requires' : 'off' , '@typescript-eslint/no-require-imports' : 'off' , } , ignorePatterns : [ '*.d.ts' , ] , overrides : [ { files : [ '*.ts' , '*.tsx' ] , rules : { '@typescript-eslint/no-misused-promises' : [ 'warn' , { checksVoidReturn : false } ] , } , } , ] , } ; export default config ;