Skip to content

Commit

Permalink
feat: config eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Apr 10, 2023
1 parent d4af87a commit f586949
Show file tree
Hide file tree
Showing 25 changed files with 286 additions and 1,457 deletions.
File renamed without changes.
30 changes: 0 additions & 30 deletions apps/docs/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions apps/docs/next-env.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions apps/docs/next.config.js

This file was deleted.

27 changes: 0 additions & 27 deletions apps/docs/package.json

This file was deleted.

10 changes: 0 additions & 10 deletions apps/docs/pages/index.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/docs/tsconfig.json

This file was deleted.

4 changes: 0 additions & 4 deletions apps/web/.eslintrc.js

This file was deleted.

30 changes: 0 additions & 30 deletions apps/web/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions apps/web/next-env.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions apps/web/next.config.js

This file was deleted.

27 changes: 0 additions & 27 deletions apps/web/package.json

This file was deleted.

10 changes: 0 additions & 10 deletions apps/web/pages/index.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions apps/web/tsconfig.json

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions apps/zhi-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@types/minimist": "^1.2.2",
"@types/node": "^18.15.11",
"esbuild": "^0.16.9",
"eslint-config-custom": "workspace:*",
"minimist": "^1.2.8",
"ts-node": "^10.9.1",
"tsconfig": "workspace:*"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "zhi",
"version": "1.0.0",
"private": true,
"type": "module",
"workspaces": [
"apps/*",
"packages/*"
Expand Down
27 changes: 27 additions & 0 deletions packages/eslint-config-custom/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "turbo", "prettier"],

// pnpm add eslint-plugin-react -D
// pnpm add eslint-config-next -D
// extends: ["next", "turbo", "prettier"],
// rules: {
// "@next/next/no-html-link-for-pages": "off",
// },

// parser: "vue-eslint-parser",
// parser: "@typescript-eslint/parser",
rules: {
// Note: you must disable the base rule as it can report incorrect errors
semi: "off",
quotes: "off",
"@typescript-eslint/no-this-alias": "off",
"prettier/prettier": "error",
},
parserOptions: {
// 下面一行next项目可用,参考web
// babelOptions: {
// presets: [require.resolve("next/babel")],
// },
},
plugins: ["@typescript-eslint", "prettier"],
}
11 changes: 0 additions & 11 deletions packages/eslint-config-custom/index.js

This file was deleted.

8 changes: 4 additions & 4 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "eslint-config-custom",
"version": "0.0.0",
"main": "index.js",
"main": "index.cjs",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.57.1",
"eslint": "^7.23.0",
"eslint-config-next": "13.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "7.31.8",
"eslint-config-turbo": "latest"
"eslint-config-turbo": "latest",
"eslint-plugin-prettier": "^4.2.1"
},
"devDependencies": {
"typescript": "^4.7.4"
Expand Down
4 changes: 0 additions & 4 deletions packages/ui/Button.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions packages/ui/index.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions packages/ui/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/ui/tsconfig.json

This file was deleted.

Loading

0 comments on commit f586949

Please sign in to comment.