From 3425d31497b3f7f341dee9024db18c661e4cc314 Mon Sep 17 00:00:00 2001 From: i5ting Date: Thu, 24 Dec 2020 13:53:23 +0800 Subject: [PATCH] refactor: remove umi app_root/*. files --- example/.editorconfig => .editorconfig | 0 .gitignore | 20 ++++++++++++++++++-- .prettierignore | 9 +++++++++ .prettierrc | 11 ++++++++++- example/.gitignore | 20 -------------------- example/.prettierignore | 8 -------- example/.prettierrc | 11 ----------- example/package.json | 24 ------------------------ 8 files changed, 37 insertions(+), 66 deletions(-) rename example/.editorconfig => .editorconfig (100%) delete mode 100644 example/.gitignore delete mode 100644 example/.prettierignore delete mode 100644 example/.prettierrc delete mode 100644 example/package.json diff --git a/example/.editorconfig b/.editorconfig similarity index 100% rename from example/.editorconfig rename to .editorconfig diff --git a/.gitignore b/.gitignore index 221eeb9..3324dbe 100644 --- a/.gitignore +++ b/.gitignore @@ -2,12 +2,28 @@ .vscode .eslintcache .size-snapshot.json -npm-debug.log -yarn-error.log +npm-debug.log* +yarn-error.log* lerna-debug.log node_modules coverage lib es +# production dist + +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +yarn.lock package-lock.json + +# misc +.DS_Store + +# umi +example/node_modules +example/src/.umi +example/src/.umi-production +example/src/.umi-test +example/.env.local diff --git a/.prettierignore b/.prettierignore index 58d06c3..5423e7a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,3 +2,12 @@ package.json package-lock.json public + +**/*.md +**/*.svg +**/*.ejs +**/*.html + +example/.umi +example/.umi-production +example/.umi-test diff --git a/.prettierrc b/.prettierrc index e65ef34..06f7aff 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,5 +4,14 @@ "singleQuote": true, "tabWidth": 2, "printWidth": 100, - "trailingComma": "es5" + "trailingComma": "es5", + "singleQuote": true, + "trailingComma": "all", + "printWidth": 80, + "overrides": [ + { + "files": ".prettierrc", + "options": { "parser": "json" } + } + ] } diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index bee1cf6..0000000 --- a/example/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/npm-debug.log* -/yarn-error.log -/yarn.lock -/package-lock.json - -# production -/dist - -# misc -.DS_Store - -# umi -/src/.umi -/src/.umi-production -/src/.umi-test -/.env.local diff --git a/example/.prettierignore b/example/.prettierignore deleted file mode 100644 index 0d4222f..0000000 --- a/example/.prettierignore +++ /dev/null @@ -1,8 +0,0 @@ -**/*.md -**/*.svg -**/*.ejs -**/*.html -package.json -.umi -.umi-production -.umi-test diff --git a/example/.prettierrc b/example/.prettierrc deleted file mode 100644 index 94beb14..0000000 --- a/example/.prettierrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "singleQuote": true, - "trailingComma": "all", - "printWidth": 80, - "overrides": [ - { - "files": ".prettierrc", - "options": { "parser": "json" } - } - ] -} diff --git a/example/package.json b/example/package.json deleted file mode 100644 index 53f9e8b..0000000 --- a/example/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "private": true, - "name": "example", - "scripts": { - "start": "umi dev", - "build": "umi build", - "postinstall": "umi generate tmp", - "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", - "test": "umi-test", - "test:coverage": "umi-test --coverage" - }, - "gitHooks": { - "pre-commit": "lint-staged" - }, - "lint-staged": { - "*.{js,jsx,less,md,json}": [ - "prettier --write" - ], - "*.ts?(x)": [ - "prettier --parser=typescript --write" - ] - }, - "dependencies": {} -}