File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
packages/eslint-config-react-native Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ import expoConfig from 'eslint-config-expo/flat'
2+ import { defineConfig } from 'eslint/config'
3+
4+ /**
5+ * Common rules
6+ * @type {import("eslint").Linter.Config }
7+ */
8+ const common = {
9+ ignores : [ '.expo' , 'node_modules' ] ,
10+ rules : { } ,
11+ }
12+
13+ /**
14+ * React specific rules
15+ * @type {import("eslint").Linter.Config }
16+ */
17+ const react = {
18+ rules : {
19+ 'react/jsx-sort-props' : [
20+ 'warn' ,
21+ {
22+ multiline : 'first' ,
23+ reservedFirst : [ 'key' ] ,
24+ callbacksLast : true ,
25+ shorthandLast : true ,
26+ } ,
27+ ] ,
28+ 'react/display-name' : 'off' ,
29+ } ,
30+ }
31+
32+ /**
33+ * TypeScript specific rules
34+ * @type {import("eslint").Linter.Config }
35+ */
36+ const typescript = {
37+ rules : {
38+ '@typescript-eslint/consistent-type-imports' : [
39+ 'warn' ,
40+ { prefer : 'type-imports' , fixStyle : 'inline-type-imports' } ,
41+ ] ,
42+ '@typescript-eslint/no-require-imports' : 'off' ,
43+ } ,
44+ }
45+
46+ export default defineConfig ( [
47+ expoConfig ,
48+ common ,
49+ typescript ,
50+ react ,
51+ ] )
You can’t perform that action at this time.
0 commit comments