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,8 +30,18 @@ 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 {
@@ -43,6 +56,37 @@ export default defineConfig(
4356 }
4457 } ,
4558 eslintConfigPrettier ,
59+ {
60+ plugins : {
61+ "@stylistic" : stylistic
62+ } ,
63+ rules : {
64+ curly : [ "error" , "all" ] ,
65+ "@stylistic/object-curly-newline" : [
66+ "error" ,
67+ {
68+ ObjectExpression : {
69+ minProperties : 1
70+ }
71+ }
72+ ] ,
73+ "@stylistic/brace-style" : [
74+ "error" ,
75+ "1tbs" ,
76+ {
77+ allowSingleLine : false
78+ }
79+ ] ,
80+ "padding-line-between-statements" : [
81+ "error" ,
82+ {
83+ blankLine : "always" ,
84+ prev : "block-like" ,
85+ next : [ "if" , "while" , "for" , "do" ]
86+ }
87+ ]
88+ }
89+ } ,
4690 {
4791 files : [ "**/test/**/*.ts" ] ,
4892 plugins : vitest . configs . recommended . plugins ,
0 commit comments