Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviergonz committed Sep 22, 2024
1 parent 5e18679 commit dc0ee0f
Show file tree
Hide file tree
Showing 11 changed files with 2,356 additions and 2,051 deletions.
448 changes: 224 additions & 224 deletions .yarn/releases/yarn-4.4.0.cjs → .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ nmHoistingLimits: workspaces

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.4.0.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs
2 changes: 1 addition & 1 deletion apps/site/docs/examples/todoList/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const App = observer(() => {
})

export const TodoListView = observer(({ list }: { list: TodoList }) => {
const [newTodo, setNewTodo] = React.useState("")
const [newTodo, setNewTodo] = useState("")

const renderTodo = (todo: Todo) => (
<TodoView
Expand Down
6 changes: 3 additions & 3 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@docusaurus/core": "^3.5.2",
"@docusaurus/preset-classic": "^3.5.2",
"@easyops-cn/docusaurus-search-local": "^0.44.5",
"@iframe-resizer/child": "^5.3.0",
"@iframe-resizer/react": "^5.3.0",
"@iframe-resizer/child": "^5.3.1",
"@iframe-resizer/react": "^5.3.1",
"bootstrap-icons": "^1.11.3",
"bufferutil": "^4.0.8",
"mobx-keystone": "workspace:packages/lib",
Expand All @@ -37,7 +37,7 @@
"@docusaurus/module-type-aliases": "^3.5.2",
"@docusaurus/tsconfig": "^3.5.2",
"@svgr/webpack": "^8.1.0",
"@types/react": "^18.3.5",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10.0.0",
"raw-loader": "^4.0.2",
Expand Down
11 changes: 5 additions & 6 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FlatCompat } from "@eslint/eslintrc"
import eslint from "@eslint/js"
import eslintConfigPrettier from "eslint-config-prettier"
import pluginImportX from "eslint-plugin-import-x"
import eslintPluginImportX from "eslint-plugin-import-x"
import eslintPluginReactConfigsJsxRuntime from "eslint-plugin-react/configs/jsx-runtime.js"
import eslintPluginReactConfigsRecommended from "eslint-plugin-react/configs/recommended.js"
import globals from "globals"
Expand Down Expand Up @@ -54,6 +54,7 @@ export default tseslint.config(
},
ecmaVersion: "latest",
warnOnUnsupportedTypeScriptVersion: true,
sourceType: "module",
},
globals: {
...globals.browser,
Expand All @@ -64,16 +65,14 @@ export default tseslint.config(
},
},
},
...compat.config(pluginImportX.configs.recommended),
pluginImportX.configs.typescript,
eslintPluginImportX.flatConfigs.recommended,
eslintPluginImportX.flatConfigs.typescript,
eslintPluginReactConfigsRecommended,
eslintPluginReactConfigsJsxRuntime,
...compat.extends("plugin:react-hooks/recommended"),
{
rules: {
// does not get along with flat configs for now, but TS takes care of this I think
"import-x/namespace": "off",
// "import/no-cycle": ["error", { ignoreExternal: true }],
// "import-x/no-cycle": ["error", { ignoreExternal: true }],
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unused-vars": [
Expand Down
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.10.0",
"@eslint/js": "^9.11.0",
"codecov": "^3.8.3",
"eslint": "^8.57.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import-x": "^4.2.1",
"eslint-plugin-react": "^7.35.2",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import-x": "^4.3.0",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react-hooks": "^4.6.2",
"globals": "^15.9.0",
"netlify-cli": "^17.36.0",
"netlify-cli": "^17.36.2",
"prettier": "^3.3.3",
"prettier-plugin-organize-imports": "^4.0.0",
"turbo": "^2.1.1",
"prettier-plugin-organize-imports": "^4.1.0",
"turbo": "^2.1.2",
"typescript": "^5.6.2",
"typescript-eslint": "^8.5.0"
"typescript-eslint": "8.5.0"
},
"packageManager": "yarn@4.4.0"
"packageManager": "yarn@4.5.0"
}
8 changes: 4 additions & 4 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
"@babel/plugin-proposal-decorators": "^7.24.7",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@swc/core": "^1.7.24",
"@swc/core": "^1.7.26",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@types/jest": "^29.5.13",
"@types/node": "^22.5.5",
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"mobx-v4": "npm:mobx@^4.15.7",
Expand All @@ -87,7 +87,7 @@
"ts-node": "^10.9.2",
"typedoc": "^0.26.7",
"typescript": "^5.6.2",
"vite": "^5.4.3"
"vite": "^5.4.7"
},
"dependencies": {
"fast-deep-equal": "^3.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/src/ref/rootRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface RootRefOptions<T extends object> {
*/
export const rootRef: <T extends object>(
modelTypeId: string,
options?: RootRefOptions<T> | undefined
options?: RootRefOptions<T>
) => RefConstructor<T> = action(
"rootRef",
<T extends object>(modelTypeId: string, options?: RootRefOptions<T>): RefConstructor<T> => {
Expand Down
8 changes: 4 additions & 4 deletions packages/lib/src/standardActions/arrayActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export const arrayActions = {

copyWithin: standaloneAction(
`${namespace}::copyWithin`,
<T>(array: T[], target: number, start: number, end?: number | undefined): T[] => {
<T>(array: T[], target: number, start: number, end?: number): T[] => {
return array.copyWithin(target, start, end)
}
),

fill: standaloneAction(
`${namespace}::fill`,
<T>(array: T[], value: T, start?: number | undefined, end?: number | undefined): T[] => {
<T>(array: T[], value: T, start?: number, end?: number): T[] => {
return array.fill(value, start, end)
}
),
Expand All @@ -63,14 +63,14 @@ export const arrayActions = {

slice: standaloneAction(
`${namespace}::slice`,
<T>(array: T[], start?: number | undefined, end?: number | undefined): T[] => {
<T>(array: T[], start?: number, end?: number): T[] => {
return array.slice(start, end)
}
),

sort: standaloneAction(
`${namespace}::sort`,
<T>(array: T[], compareFn?: ((a: T, b: T) => number) | undefined): T[] => {
<T>(array: T[], compareFn?: (a: T, b: T) => number): T[] => {
return array.sort(compareFn)
}
),
Expand Down
6 changes: 3 additions & 3 deletions packages/mobx-keystone-yjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"@babel/plugin-proposal-decorators": "^7.24.7",
"@babel/preset-env": "^7.25.4",
"@babel/preset-typescript": "^7.24.7",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.4",
"@types/jest": "^29.5.13",
"@types/node": "^22.5.5",
"babel-jest": "^29.7.0",
"jest": "^29.7.0",
"mobx-keystone": "workspace:packages/lib",
Expand All @@ -80,7 +80,7 @@
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.6.2",
"vite": "^5.4.3"
"vite": "^5.4.7"
},
"dependencies": {
"tslib": "^2.7.0"
Expand Down
Loading

0 comments on commit dc0ee0f

Please sign in to comment.