1+ import typeScriptConfig from '@strv/eslint-config-typescript'
12import expoConfig from 'eslint-config-expo/flat.js'
23import { defineConfig , globalIgnores } from 'eslint/config'
3- import typeScriptPlugin from '@typescript-eslint/eslint-plugin'
4- import typeScriptParser from '@typescript-eslint/parser'
54
65/** Globally ignored */
76const ignores = globalIgnores ( [ '.expo/' , 'expo-env.d.ts' ] )
@@ -15,6 +14,9 @@ const common = {
1514 'import/no-duplicates' : 'off' ,
1615 // Handled by TypeScript
1716 'import/no-unresolved' : 'off' ,
17+ // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md
18+ "import/no-named-as-default" : "off" ,
19+ "import/no-named-as-default-member" : "off" ,
1820 // Handled by TypeScript. Enable noUnusedLocals in your tsconfig.json, see https://www.typescriptlang.org/tsconfig/#noUnusedLocals
1921 'no-unused-vars' : 'off' ,
2022 } ,
@@ -38,27 +40,30 @@ const react = {
3840}
3941
4042/** @type {import("eslint").Linter.Config } */
41- const typescript = {
43+ const typescript = defineConfig ( [ typeScriptConfig , {
4244 files : [ '**/*.ts' , '**/*.tsx' ] ,
43- languageOptions : {
44- parser : typeScriptParser ,
45- parserOptions : {
46- projectService : true ,
47- } ,
48- } ,
49- plugins : { '@typescript-eslint' : typeScriptPlugin } ,
5045 rules : {
5146 // Handled by TypeScript. Enable noUnusedLocals in your tsconfig.json, see https://www.typescriptlang.org/tsconfig/#noUnusedLocals
5247 '@typescript-eslint/no-unused-vars' : 'off' ,
5348 // Its common in React Native to import types using require syntax, see https://reactnative.dev/docs/images#static-image-resources
5449 '@typescript-eslint/no-require-imports' : 'off' ,
50+ // Very expensive check
51+ "@typescript-eslint/promise-function-async" : "off" ,
52+
53+ "@typescript-eslint/no-shadow" : "off" ,
54+ "@typescript-eslint/consistent-type-definitions" : "off" ,
55+ "@typescript-eslint/no-misused-promises" : "off" ,
56+ "@typescript-eslint/no-unsafe-assignment" : "off" ,
57+ "@typescript-eslint/no-unsafe-return" : "off" ,
58+ "@typescript-eslint/unbound-method" : "off" ,
59+ "@typescript-eslint/no-unsafe-member-access" : "off" ,
5560
5661 '@typescript-eslint/consistent-type-imports' : [
5762 'error' ,
5863 { prefer : 'type-imports' , fixStyle : 'inline-type-imports' } ,
5964 ] ,
6065 } ,
61- }
66+ } ] )
6267
6368export default defineConfig ( [
6469 expoConfig ,
0 commit comments