11import eslint from "@eslint/js" ;
2+ import stylistic from "@stylistic/eslint-plugin" ;
23import { defineConfig } from "eslint/config" ;
34import eslintConfigPrettier from "eslint-config-prettier" ;
45import vitest from "@vitest/eslint-plugin" ;
56import tseslint from "typescript-eslint" ;
67
78export default defineConfig (
8- { ignores : [ "**/dist/" , "**/node_modules/" , ".agents/" , "example/" , "**/expo-plugin/" , "**/react-native.config.*" ] } ,
9+ {
10+ ignores : [ "**/dist/" , "**/node_modules/" , ".agents/" , "example/" , "**/expo-plugin/" , "**/react-native.config.*" ]
11+ } ,
912 eslint . configs . recommended ,
1013 {
1114 extends : tseslint . configs . recommendedTypeChecked ,
@@ -27,11 +30,52 @@ export default defineConfig(
2730 "@typescript-eslint/no-duplicate-type-constituents" : "off" ,
2831 "@typescript-eslint/restrict-plus-operands" : "off" ,
2932 "@typescript-eslint/no-unused-vars" : "error" ,
30- "@typescript-eslint/no-unused-expressions" : [ "error" , { allowShortCircuit : true } ] ,
31- "@typescript-eslint/no-misused-promises" : [ "error" , { checksVoidReturn : false } ]
33+ "@typescript-eslint/no-unused-expressions" : [
34+ "error" ,
35+ {
36+ allowShortCircuit : true
37+ }
38+ ] ,
39+ "@typescript-eslint/no-misused-promises" : [
40+ "error" ,
41+ {
42+ checksVoidReturn : false
43+ }
44+ ]
3245 }
3346 } ,
3447 eslintConfigPrettier ,
48+ {
49+ plugins : {
50+ "@stylistic" : stylistic
51+ } ,
52+ rules : {
53+ curly : [ "error" , "all" ] ,
54+ "@stylistic/object-curly-newline" : [
55+ "error" ,
56+ {
57+ ObjectExpression : {
58+ minProperties : 1
59+ }
60+ }
61+ ] ,
62+ "@stylistic/brace-style" : [
63+ "error" ,
64+ "1tbs" ,
65+ {
66+ allowSingleLine : false
67+ }
68+ ] ,
69+ "padding-line-between-statements" : [
70+ "error" ,
71+ {
72+ blankLine : "always" ,
73+ prev : "block-like" ,
74+ next : [ "if" , "while" , "for" , "do" ]
75+ }
76+ ]
77+ }
78+ } ,
3579 {
3680 files : [ "**/test/**/*.ts" ] ,
3781 plugins : vitest . configs . recommended . plugins ,
0 commit comments