File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { fixupConfigRules } from '@eslint/compat' ;
2+ import { FlatCompat } from '@eslint/eslintrc' ;
3+ import js from '@eslint/js' ;
4+ import prettier from 'eslint-plugin-prettier' ;
5+ import { defineConfig } from 'eslint/config' ;
6+ import path from 'node:path' ;
7+ import { fileURLToPath } from 'node:url' ;
8+
9+ const __filename = fileURLToPath ( import . meta. url ) ;
10+ const __dirname = path . dirname ( __filename ) ;
11+ const compat = new FlatCompat ( {
12+ baseDirectory : __dirname ,
13+ recommendedConfig : js . configs . recommended ,
14+ allConfig : js . configs . all ,
15+ } ) ;
16+
17+ export default defineConfig ( [
18+ {
19+ extends : fixupConfigRules ( compat . extends ( '@react-native' , 'prettier' ) ) ,
20+ plugins : { prettier } ,
21+ rules : {
22+ 'react/react-in-jsx-scope' : 'off' ,
23+ 'prettier/prettier' : [
24+ 'error' ,
25+ {
26+ quoteProps : 'consistent' ,
27+ singleQuote : true ,
28+ tabWidth : 2 ,
29+ trailingComma : 'es5' ,
30+ useTabs : false ,
31+ } ,
32+ ] ,
33+ } ,
34+ } ,
35+ {
36+ ignores : [ 'node_modules/' , 'lib/' ] ,
37+ } ,
38+ ] ) ;
You can’t perform that action at this time.
0 commit comments