File tree Expand file tree Collapse file tree 4 files changed +18
-31
lines changed Expand file tree Collapse file tree 4 files changed +18
-31
lines changed Original file line number Diff line number Diff line change 1- import react from "eslint-plugin-react" ;
2- import globals from "globals" ;
31import path from "node:path" ;
2+ import globals from "globals" ;
43import { fileURLToPath } from "node:url" ;
54import js from "@eslint/js" ;
65import { FlatCompat } from "@eslint/eslintrc" ;
@@ -13,13 +12,10 @@ const compat = new FlatCompat({
1312 allConfig : js . configs . all ,
1413} ) ;
1514
15+ // ESLint config for Preact project
1616export default [
17- ...compat . extends ( "eslint:recommended" , "plugin:react/recommended" ) ,
17+ ...compat . extends ( "eslint:recommended" ) ,
1818 {
19- plugins : {
20- react,
21- } ,
22-
2319 languageOptions : {
2420 globals : {
2521 ...globals . browser ,
@@ -29,15 +25,5 @@ export default [
2925 ecmaVersion : "latest" ,
3026 sourceType : "module" ,
3127 } ,
32-
33- settings : {
34- react : {
35- version : "18.2.0" ,
36- } ,
37- } ,
38-
39- rules : {
40- "react/prop-types" : "off" ,
41- } ,
4228 } ,
4329] ;
Original file line number Diff line number Diff line change 11{
2- "type" : " module" ,
3- "scripts" : {
4- "format" : " prettier --write . && eslint --fix" ,
5- "check" : " prettier --check . && eslint"
6- },
7- "devDependencies" : {
8- "eslint" : " ^9.13.0" ,
9- "eslint-plugin-react" : " ^7.37.1" ,
10- "prettier" : " ^3.3.3" ,
11- "bun-types" : " ^0.5.0"
12- },
132 "dependencies" : {
143 "@pyscript/core" : " ^0.6" ,
154 "@reactpy/client" : " ^0.3.2" ,
187 "preact" : " ^10.26.9" ,
198 "react" : " npm:@preact/compat@17.1.2" ,
209 "react-dom" : " npm:@preact/compat@17.1.2"
21- }
10+ },
11+ "devDependencies" : {
12+ "bun-types" : " ^0.5.0" ,
13+ "eslint" : " ^9.13.0" ,
14+ "eslint-config-preact" : " ^1.5.0" ,
15+ "prettier" : " ^3.3.3"
16+ },
17+ "eslintConfig" : {
18+ "extends" : " preact"
19+ },
20+ "scripts" : {
21+ "check" : " prettier --check . && eslint" ,
22+ "format" : " prettier --write . && eslint --fix"
23+ },
24+ "type" : " module"
2225}
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3- "allowImportingTsExtensions" : true ,
43 "allowJs" : true ,
54 "allowSyntheticDefaultImports" : true ,
65 "declaration" : true ,
1413 "module" : " Preserve" ,
1514 "moduleDetection" : " force" ,
1615 "moduleResolution" : " bundler" ,
17- "noEmit" : true ,
1816 "noEmitOnError" : true ,
1917 "noUnusedLocals" : true ,
2018 "paths" : {
You can’t perform that action at this time.
0 commit comments