Skip to content

Commit

Permalink
chore: use react linting option from @antfu/eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Dec 6, 2023
1 parent b4e5831 commit c9e08ab
Show file tree
Hide file tree
Showing 14 changed files with 1,987 additions and 1,716 deletions.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"serve": "vitepress serve"
},
"devDependencies": {
"@iconify-json/carbon": "^1.1.21",
"unocss": "^0.57.7",
"@iconify-json/carbon": "^1.1.24",
"unocss": "^0.58.0",
"vitepress": "1.0.0-rc.29"
}
}
8 changes: 3 additions & 5 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import antfu from '@antfu/eslint-config'

export default antfu(
{
ignores: ['**/tsconfig.json'],
},
)
export default await antfu({
ignores: ['**/tsconfig.json'],
})
34 changes: 8 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "0.10.2",
"private": true,
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"scripts": {
"build": "pnpm -r --filter=./packages/** run build",
"dev:prepare": "pnpm -r --filter=./packages/** run dev:prepare",
Expand All @@ -18,33 +18,15 @@
"prepare": "pnpm run dev:prepare"
},
"devDependencies": {
"@antfu/eslint-config": "^2.1.0",
"@types/node": "^20.9.4",
"@antfu/eslint-config": "^2.3.4",
"@types/node": "^20.10.3",
"bumpp": "^9.2.0",
"eslint": "^8.54.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint": "^8.55.0",
"happy-dom": "^12.10.3",
"typescript": "^5.2.2",
"typescript": "^5.3.2",
"unbuild": "^2.0.0",
"vite": "^5.0.2",
"vitest": "^1.0.0-beta.5",
"vue-tsc": "^1.8.22"
},
"pnpm": {
"overrides": {
"array-includes": "npm:@nolyfill/array-includes@latest",
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@latest",
"array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@latest",
"array.prototype.tosorted": "npm:@nolyfill/array.prototype.tosorted@latest",
"es-iterator-helpers": "npm:@nolyfill/es-iterator-helpers@latest",
"has": "npm:@nolyfill/has@latest",
"object.assign": "npm:@nolyfill/object.assign@latest",
"object.entries": "npm:@nolyfill/object.entries@latest",
"object.fromentries": "npm:@nolyfill/object.fromentries@latest",
"object.hasown": "npm:@nolyfill/object.hasown@latest",
"object.values": "npm:@nolyfill/object.values@latest",
"string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@latest"
}
"vite": "^5.0.5",
"vitest": "^1.0.1",
"vue-tsc": "^1.8.25"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@unlazy/core",
"type": "module",
"version": "0.10.2",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"description": "Universal lazy loading library for placeholder images leveraging native browser APIs",
"author": "Johann Schopplich <[email protected]>",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@unlazy/nuxt",
"version": "0.10.2",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"description": "Nuxt lazy loading module for placeholder images",
"author": "Johann Schopplich <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -52,9 +52,9 @@
"devDependencies": {
"@nuxt/module-builder": "^0.5.4",
"@nuxt/schema": "^3.8.2",
"@types/node": "^20.9.4",
"@unocss/nuxt": "^0.57.7",
"@unocss/reset": "^0.57.7",
"@types/node": "^20.10.3",
"@unocss/nuxt": "^0.58.0",
"@unocss/reset": "^0.58.0",
"nuxt": "^3.8.2"
}
}
24 changes: 5 additions & 19 deletions packages/react/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
import antfu from '@antfu/eslint-config'
import reactPlugin from 'eslint-plugin-react'
import hooksPlugin from 'eslint-plugin-react-hooks'

export default antfu(
{
vue: false,
ignores: ['tsconfig.json'],
},
{
files: ['**/*.ts', '**/*.tsx'],
plugins: {
'react': reactPlugin,
'react-hooks': hooksPlugin,
},
rules: {
...reactPlugin.configs['jsx-runtime'].rules,
...hooksPlugin.configs.recommended.rules,
},
},
)
export default await antfu({
vue: false,
react: true,
ignores: ['tsconfig.json'],
})
11 changes: 7 additions & 4 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@unlazy/react",
"type": "module",
"version": "0.10.2",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"description": "React lazy loading library for placeholder images",
"author": "Johann Schopplich <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -48,10 +48,13 @@
"unlazy": "workspace:*"
},
"devDependencies": {
"@types/node": "^20.9.4",
"@types/react": "^18.2.38",
"@types/node": "^20.10.3",
"@types/react": "^18.2.42",
"@types/react-dom": "^18.2.17",
"@vitejs/plugin-react": "^4.2.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import solidPlugin from 'eslint-plugin-solid'
import * as tsParser from '@typescript-eslint/parser'
import antfu from '@antfu/eslint-config'

export default antfu(
export default await antfu(
{
vue: false,
ignores: ['tsconfig.json'],
Expand Down
6 changes: 3 additions & 3 deletions packages/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@unlazy/solid",
"type": "module",
"version": "0.10.2",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"description": "Solid lazy loading library for placeholder images",
"author": "Johann Schopplich <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -55,9 +55,9 @@
"unlazy": "workspace:*"
},
"devDependencies": {
"@types/node": "^20.9.4",
"@types/node": "^20.10.3",
"eslint-plugin-solid": "^0.13.0",
"solid-js": "^1.8.6",
"solid-js": "^1.8.7",
"tsup": "^8.0.1",
"tsup-preset-solid": "^2.1.0",
"vite-plugin-solid": "^2.7.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as svelteParser from 'svelte-eslint-parser'
import * as tsParser from '@typescript-eslint/parser'
import antfu from '@antfu/eslint-config'

export default antfu(
export default await antfu(
{
vue: false,
ignores: ['.svelte-kit', 'tsconfig.json'],
Expand Down
8 changes: 4 additions & 4 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@unlazy/svelte",
"type": "module",
"version": "0.10.2",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"description": "Svelte lazy loading library for placeholder images",
"author": "Johann Schopplich <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -56,11 +56,11 @@
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.1.1",
"@sveltejs/kit": "^1.27.6",
"@sveltejs/kit": "^1.27.7",
"@sveltejs/package": "^2.2.3",
"eslint-plugin-svelte": "^2.35.1",
"svelte": "^4.2.7",
"svelte-check": "^3.6.1",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"tslib": "^2.6.2"
}
}
2 changes: 1 addition & 1 deletion packages/unlazy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "unlazy",
"type": "module",
"version": "0.10.2",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"description": "Universal lazy loading library for placeholder images leveraging native browser APIs",
"author": "Johann Schopplich <[email protected]>",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@unlazy/vue",
"type": "module",
"version": "0.10.2",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"description": "Vue lazy loading library for placeholder images",
"author": "Johann Schopplich <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -59,8 +59,8 @@
"unlazy": "workspace:*"
},
"devDependencies": {
"@types/node": "^20.9.4",
"@vitejs/plugin-vue": "^4.5.0",
"vue": "^3.3.8"
"@types/node": "^20.10.3",
"@vitejs/plugin-vue": "^4.5.1",
"vue": "^3.3.10"
}
}
Loading

0 comments on commit c9e08ab

Please sign in to comment.