-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update deps and use flat-config of ESLint
- Loading branch information
1 parent
7856f24
commit 90326a7
Showing
54 changed files
with
5,201 additions
and
4,921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ permissions: | |
on: | ||
push: | ||
tags: | ||
- "v*" | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,13 @@ | ||
import js from "@eslint/js"; | ||
import pluginTypeScript from "@typescript-eslint/eslint-plugin"; | ||
import parserTypeScript from "@typescript-eslint/parser"; | ||
import configPrettier from "eslint-config-prettier"; | ||
import { defineFlatConfig } from "eslint-define-config"; | ||
import * as pluginImport from "eslint-plugin-import"; | ||
import pluginNodeImport from "eslint-plugin-node-import"; | ||
import pluginPrettier from "eslint-plugin-prettier"; | ||
import antfu from "@antfu/eslint-config"; | ||
|
||
export default defineFlatConfig([ | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: true, | ||
}, | ||
}, | ||
{ | ||
...js.configs.recommended, | ||
plugins: { | ||
prettier: pluginPrettier, | ||
}, | ||
rules: { | ||
...configPrettier.rules, | ||
...pluginPrettier.configs.recommended.rules, | ||
}, | ||
}, | ||
{ | ||
plugins: { | ||
import: pluginImport, | ||
}, | ||
rules: { | ||
// https://github.com/import-js/eslint-plugin-import/issues/2556 | ||
// ...pluginImport.configs.recommended.rules, | ||
"import/first": "error", | ||
"import/no-duplicates": "error", | ||
"import/no-mutable-exports": "error", | ||
"import/no-named-default": "error", | ||
"import/no-self-import": "error", | ||
"import/no-webpack-loader-syntax": "error", | ||
"import/order": ["error", { "newlines-between": "always" }], | ||
"import/newline-after-import": "error", | ||
}, | ||
}, | ||
{ | ||
plugins: { | ||
"node-import": pluginNodeImport, | ||
}, | ||
rules: { | ||
"node-import/prefer-node-protocol": 2, | ||
}, | ||
}, | ||
{ | ||
files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"], | ||
languageOptions: { | ||
parser: parserTypeScript, | ||
}, | ||
plugins: { | ||
"@typescript-eslint": pluginTypeScript, | ||
}, | ||
rules: { | ||
...pluginTypeScript.configs.strict.rules, | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
}, | ||
}, | ||
{ | ||
ignores: [ | ||
"*.min.*", | ||
"*.d.ts", | ||
"CHANGELOG.md", | ||
"dist", | ||
"build", | ||
"LICENSE*", | ||
"output", | ||
"out", | ||
"coverage", | ||
"public", | ||
"temp", | ||
"package-lock.json", | ||
"pnpm-lock.yaml", | ||
"yarn.lock", | ||
"__snapshots__", | ||
"*.css", | ||
"*.png", | ||
"*.ico", | ||
"*.toml", | ||
"*.patch", | ||
"*.txt", | ||
"*.crt", | ||
"*.key", | ||
"Dockerfile", | ||
"!.github", | ||
"!.vscode", | ||
], | ||
}, | ||
]); | ||
export default antfu({ | ||
rules: { | ||
"style/quotes": ["error", "double"], | ||
"style/semi": ["error", "always"], | ||
"style/indent": ["error", "tab"], | ||
"jsonc/indent": ["error", "tab"], | ||
"style/no-tabs": "off", | ||
"style/jsx-indent-props": ["error", "tab"], | ||
"style/no-mixed-spaces-and-tabs": ["error", "smart-tabs"], | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,56 @@ | ||
{ | ||
"name": "@condorhero/monorepo", | ||
"type": "module", | ||
"version": "2.1.1", | ||
"private": true, | ||
"type": "module", | ||
"license": "MIT", | ||
"packageManager": "[email protected]", | ||
"author": "Condor Hero", | ||
"packageManager": "[email protected]", | ||
"description": "A fake server plugin for Vite.", | ||
"author": "Condor Hero", | ||
"license": "MIT", | ||
"homepage": "https://github.com/condorheroblog/vite-plugin-fake-server/blob/main/README.md", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/condorheroblog/vite-plugin-fake-server.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/condorheroblog/vite-plugin-fake-server/issues" | ||
}, | ||
"homepage": "https://github.com/condorheroblog/vite-plugin-fake-server/blob/main/README.md", | ||
"scripts": { | ||
"postinstall": "simple-git-hooks", | ||
"prepublishOnly": "nr build", | ||
"dev": "esno index.ts", | ||
"lint": "eslint .", | ||
"lint:fix": "eslint . --fix", | ||
"format": "prettier --write .", | ||
"test": "vitest", | ||
"build": "nr -r build", | ||
"build:watch": "nr -r build:watch", | ||
"typecheck": "tsc --noEmit", | ||
"release": "bumpp -r && pnpm -r publish --access public" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.25.2", | ||
"@rollup/plugin-json": "^6.1.0", | ||
"@types/node": "^22.3.0", | ||
"bumpp": "^9.5.1", | ||
"esbuild": "^0.23.0", | ||
"eslint": "^9.9.0", | ||
"esno": "^4.7.0", | ||
"lint-staged": "^15.2.9", | ||
"rimraf": "^5.0.10", | ||
"rollup": "^4.20.0", | ||
"rollup-plugin-dts": "^6.1.1", | ||
"rollup-plugin-esbuild": "^6.1.1", | ||
"rollup-plugin-node-externals": "^7.1.2", | ||
"simple-git-hooks": "^2.11.1", | ||
"typescript": "^5.5.4", | ||
"vitest": "^2.0.5" | ||
}, | ||
"simple-git-hooks": { | ||
"pre-commit": "npx lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*.{ts,js,mjs,cjs,cts,mts,json}": [ | ||
"eslint --fix", | ||
"prettier --write" | ||
], | ||
"*.md": [ | ||
"*.{ts,js,mjs,cjs,cts,mts,json,md}": [ | ||
"eslint --fix" | ||
], | ||
"*.vue": [ | ||
"prettier --write" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@eslint/js": "^8.56.0", | ||
"@rollup/plugin-json": "^6.1.0", | ||
"@types/node": "^20.11.0", | ||
"@typescript-eslint/eslint-plugin": "^6.18.1", | ||
"@typescript-eslint/parser": "^6.18.1", | ||
"bumpp": "^9.2.1", | ||
"esbuild": "^0.19.11", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-define-config": "^2.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-mdx": "^3.1.5", | ||
"eslint-plugin-node-import": "^1.0.4", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"esno": "^4.0.0", | ||
"lint-staged": "^15.2.0", | ||
"prettier": "^3.2.2", | ||
"rimraf": "^5.0.5", | ||
"rollup": "^4.9.5", | ||
"rollup-plugin-dts": "^6.1.0", | ||
"rollup-plugin-esbuild": "^6.1.0", | ||
"rollup-plugin-node-externals": "^6.1.2", | ||
"simple-git-hooks": "^2.9.0", | ||
"typescript": "^5.3.3", | ||
"vitest": "^1.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
{ | ||
"name": "http2-sample", | ||
"private": true, | ||
"version": "2.1.1", | ||
"type": "module", | ||
"version": "2.1.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vue-tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"vue": "^3.4.13" | ||
"vue": "^3.4.38" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-basic-ssl": "^1.0.2", | ||
"@vitejs/plugin-vue": "^5.0.3", | ||
"typescript": "^5.3.3", | ||
"vite": "^5.0.11", | ||
"@vitejs/plugin-basic-ssl": "^1.1.0", | ||
"@vitejs/plugin-vue": "^5.1.2", | ||
"typescript": "^5.5.4", | ||
"vite": "^5.4.1", | ||
"vite-plugin-fake-server": "workspace:^", | ||
"vue-tsc": "^1.8.27" | ||
"vue-tsc": "^2.0.29" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"jsx": "preserve", | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"useDefineForClassFields": true, | ||
"module": "ESNext", | ||
"lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
"skipLibCheck": true, | ||
|
||
/* Bundler mode */ | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "preserve", | ||
"paths": { | ||
"@/*": ["./fake/*"] | ||
}, | ||
"resolveJsonModule": true, | ||
"allowImportingTsExtensions": true, | ||
|
||
/* Linting */ | ||
"strict": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true | ||
"noEmit": true, | ||
"isolatedModules": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], | ||
"references": [{ "path": "./tsconfig.node.json" }] | ||
"references": [{ "path": "./tsconfig.node.json" }], | ||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"composite": true, | ||
"skipLibCheck": true, | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"allowSyntheticDefaultImports": true | ||
"allowSyntheticDefaultImports": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["vite.config.ts"] | ||
} |
Oops, something went wrong.