Skip to content

Commit

Permalink
Add ESLint React and React Hooks plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviergonz committed Mar 16, 2024
1 parent 225435a commit fbabaa3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 52 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module.exports = {
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
],

rules: {
Expand Down
2 changes: 1 addition & 1 deletion apps/site/docs/examples/clientServer/appInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function initAppInstance() {

let serverAction = false
const runServerActionLocally = (actionCall: SerializedActionCallWithModelIdOverrides) => {
let wasServerAction = serverAction
const wasServerAction = serverAction
serverAction = true
try {
// in clients we use the sync new model ids version to make sure that
Expand Down
4 changes: 2 additions & 2 deletions apps/site/docs/examples/todoList/logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const LogsView = observer((props: { rootStore: TodoList }) => {
},
})
return disposer
}, [props.rootStore])
}, [data, props.rootStore])

useEffect(() => {
// also it is possible to get a list of changes in the form of patches,
Expand Down Expand Up @@ -76,7 +76,7 @@ function ActionCallToText(props: { actionCall: ExtendedActionCall }) {

const args = actionCall.args.map((arg) => JSON.stringify(arg)).join(", ")
const path = actionCall.targetPath.join("/")
let text = `[${path}] ${actionCall.actionName}(${args})`
const text = `[${path}] ${actionCall.actionName}(${args})`
if (actionCall.cancelled) {
return (
<>
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"netlify-cli": "^17.19.3",
Expand Down
49 changes: 1 addition & 48 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4410,13 +4410,6 @@ __metadata:
languageName: node
linkType: hard

"@pkgr/core@npm:^0.1.0":
version: 0.1.1
resolution: "@pkgr/core@npm:0.1.1"
checksum: 10c0/3f7536bc7f57320ab2cf96f8973664bef624710c403357429fbf680a5c3b4843c1dbd389bb43daa6b1f6f1f007bb082f5abcb76bb2b5dc9f421647743b71d3d8
languageName: node
linkType: hard

"@pnpm/config.env-replace@npm:^1.1.0":
version: 1.1.0
resolution: "@pnpm/config.env-replace@npm:1.1.0"
Expand Down Expand Up @@ -10228,26 +10221,6 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^5.1.3":
version: 5.1.3
resolution: "eslint-plugin-prettier@npm:5.1.3"
dependencies:
prettier-linter-helpers: "npm:^1.0.0"
synckit: "npm:^0.8.6"
peerDependencies:
"@types/eslint": ">=8.0.0"
eslint: ">=8.0.0"
eslint-config-prettier: "*"
prettier: ">=3.0.0"
peerDependenciesMeta:
"@types/eslint":
optional: true
eslint-config-prettier:
optional: true
checksum: 10c0/f45d5fc1fcfec6b0cf038a7a65ddd10a25df4fe3f9e1f6b7f0d5100e66f046a26a2492e69ee765dddf461b93c114cf2e1eb18d4970aafa6f385448985c136e09
languageName: node
linkType: hard

"eslint-plugin-react-hooks@npm:^4.6.0":
version: 4.6.0
resolution: "eslint-plugin-react-hooks@npm:4.6.0"
Expand Down Expand Up @@ -10805,7 +10778,7 @@ __metadata:
languageName: node
linkType: hard

"fast-diff@npm:^1.1.2, fast-diff@npm:^1.2.0":
"fast-diff@npm:^1.2.0":
version: 1.3.0
resolution: "fast-diff@npm:1.3.0"
checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29
Expand Down Expand Up @@ -18505,15 +18478,6 @@ __metadata:
languageName: node
linkType: hard

"prettier-linter-helpers@npm:^1.0.0":
version: 1.0.0
resolution: "prettier-linter-helpers@npm:1.0.0"
dependencies:
fast-diff: "npm:^1.1.2"
checksum: 10c0/81e0027d731b7b3697ccd2129470ed9913ecb111e4ec175a12f0fcfab0096516373bf0af2fef132af50cafb0a905b74ff57996d615f59512bb9ac7378fcc64ab
languageName: node
linkType: hard

"prettier-plugin-organize-imports@npm:^3.2.4":
version: 3.2.4
resolution: "prettier-plugin-organize-imports@npm:3.2.4"
Expand Down Expand Up @@ -19856,7 +19820,6 @@ __metadata:
eslint: "npm:^8.57.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-plugin-import: "npm:^2.29.1"
eslint-plugin-prettier: "npm:^5.1.3"
eslint-plugin-react: "npm:^7.34.1"
eslint-plugin-react-hooks: "npm:^4.6.0"
mobx: "npm:^6.12.0"
Expand Down Expand Up @@ -21349,16 +21312,6 @@ __metadata:
languageName: node
linkType: hard

"synckit@npm:^0.8.6":
version: 0.8.8
resolution: "synckit@npm:0.8.8"
dependencies:
"@pkgr/core": "npm:^0.1.0"
tslib: "npm:^2.6.2"
checksum: 10c0/c3d3aa8e284f3f84f2f868b960c9f49239b364e35f6d20825a448449a3e9c8f49fe36cdd5196b30615682f007830d46f2ea354003954c7336723cb821e4b6519
languageName: node
linkType: hard

"system-architecture@npm:^0.1.0":
version: 0.1.0
resolution: "system-architecture@npm:0.1.0"
Expand Down

0 comments on commit fbabaa3

Please sign in to comment.