Skip to content

Commit 2f014ef

Browse files
author
Guillaume Chau
committed
fix(generator): don't lint files
1 parent 86f79f8 commit 2f014ef

File tree

3 files changed

+70
-23
lines changed

3 files changed

+70
-23
lines changed

generator/index.js

+1-22
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ module.exports = (api, options, rootOptions) => {
140140
})
141141
}
142142

143-
// Linting
144143
const execa = require('execa')
145144

146145
if (api.hasPlugin('apollo')) {
@@ -150,31 +149,11 @@ module.exports = (api, options, rootOptions) => {
150149
'--output',
151150
api.resolve('./node_modules/.temp/graphql/schema'),
152151
], {
153-
stdio: ['inherit', 'inherit', 'inherit'],
154-
cleanup: true,
155-
shell: true,
152+
preferLocal: true,
156153
})
157154
} catch (e) {}
158155
}
159156

160-
// Lint generated/modified files
161-
try {
162-
const files = ['*.js', '.*.js', 'src']
163-
if (api.hasPlugin('apollo')) {
164-
files.push('apollo-server')
165-
}
166-
execa.sync('vue-cli-service', [
167-
'lint',
168-
...files,
169-
], {
170-
stdio: ['inherit', 'inherit', 'inherit'],
171-
cleanup: true,
172-
shell: true,
173-
})
174-
} catch (e) {
175-
// No ESLint vue-cli plugin
176-
}
177-
178157
api.exitLog(`Start dev server with ${chalk.cyan(`${hasYarn() ? 'yarn' : 'npm'} run ssr:serve`)}`, 'info')
179158
api.exitLog(`Build with ${chalk.cyan(`${hasYarn() ? 'yarn' : 'npm'} run ssr:build`)}`, 'info')
180159
api.exitLog(`Run in production with ${chalk.cyan(`${hasYarn() ? 'yarn' : 'npm'} run ssr:start`)}`, 'info')

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"clipboardy": "^2.1.0",
3434
"compression": "^1.7.4",
3535
"cross-env": "^6.0.3",
36+
"execa": "^3.2.0",
3637
"express": "^4.17.1",
3738
"fs-extra": "^8.1.0",
3839
"hash-sum": "^2.0.0",

yarn.lock

+68-1
Original file line numberDiff line numberDiff line change
@@ -3222,6 +3222,22 @@ execa@^1.0.0:
32223222
signal-exit "^3.0.0"
32233223
strip-eof "^1.0.0"
32243224

3225+
execa@^3.2.0:
3226+
version "3.2.0"
3227+
resolved "https://registry.yarnpkg.com/execa/-/execa-3.2.0.tgz#18326b79c7ab7fbd6610fd900c1b9e95fa48f90a"
3228+
integrity sha512-kJJfVbI/lZE1PZYDI5VPxp8zXPO9rtxOkhpZ0jMKha56AI9y2gGVC6bkukStQf0ka5Rh15BA5m7cCCH4jmHqkw==
3229+
dependencies:
3230+
cross-spawn "^7.0.0"
3231+
get-stream "^5.0.0"
3232+
human-signals "^1.1.1"
3233+
is-stream "^2.0.0"
3234+
merge-stream "^2.0.0"
3235+
npm-run-path "^4.0.0"
3236+
onetime "^5.1.0"
3237+
p-finally "^2.0.0"
3238+
signal-exit "^3.0.2"
3239+
strip-final-newline "^2.0.0"
3240+
32253241
expand-brackets@^0.1.4:
32263242
version "0.1.5"
32273243
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
@@ -3676,6 +3692,13 @@ get-stream@^4.0.0:
36763692
dependencies:
36773693
pump "^3.0.0"
36783694

3695+
get-stream@^5.0.0:
3696+
version "5.1.0"
3697+
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9"
3698+
integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
3699+
dependencies:
3700+
pump "^3.0.0"
3701+
36793702
get-value@^2.0.3, get-value@^2.0.6:
36803703
version "2.0.6"
36813704
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@@ -4080,6 +4103,11 @@ https-browserify@^1.0.0:
40804103
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
40814104
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
40824105

4106+
human-signals@^1.1.1:
4107+
version "1.1.1"
4108+
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
4109+
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
4110+
40834111
[email protected], iconv-lite@^0.4.24, iconv-lite@^0.4.4:
40844112
version "0.4.24"
40854113
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -4530,6 +4558,11 @@ is-stream@^1.0.0, is-stream@^1.1.0:
45304558
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
45314559
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
45324560

4561+
is-stream@^2.0.0:
4562+
version "2.0.0"
4563+
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
4564+
integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
4565+
45334566
is-svg@^2.0.0:
45344567
version "2.1.0"
45354568
resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
@@ -5230,6 +5263,11 @@ merge-source-map@^1.1.0:
52305263
dependencies:
52315264
source-map "^0.6.1"
52325265

5266+
merge-stream@^2.0.0:
5267+
version "2.0.0"
5268+
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
5269+
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
5270+
52335271
merge2@^1.2.3:
52345272
version "1.2.3"
52355273
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5"
@@ -5335,6 +5373,11 @@ mimic-fn@^1.0.0:
53355373
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
53365374
integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
53375375

5376+
mimic-fn@^2.1.0:
5377+
version "2.1.0"
5378+
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
5379+
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
5380+
53385381
min-document@^2.19.0:
53395382
version "2.19.0"
53405383
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
@@ -5698,6 +5741,13 @@ npm-run-path@^2.0.0:
56985741
dependencies:
56995742
path-key "^2.0.0"
57005743

5744+
npm-run-path@^4.0.0:
5745+
version "4.0.0"
5746+
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.0.tgz#d644ec1bd0569187d2a52909971023a0a58e8438"
5747+
integrity sha512-8eyAOAH+bYXFPSnNnKr3J+yoybe8O87Is5rtAQ8qRczJz1ajcsjg8l2oZqP+Ppx15Ii3S1vUTjQN2h4YO2tWWQ==
5748+
dependencies:
5749+
path-key "^3.0.0"
5750+
57015751
npmlog@^4.0.2:
57025752
version "4.1.2"
57035753
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
@@ -5820,6 +5870,13 @@ onetime@^2.0.0:
58205870
dependencies:
58215871
mimic-fn "^1.0.0"
58225872

5873+
onetime@^5.1.0:
5874+
version "5.1.0"
5875+
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5"
5876+
integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==
5877+
dependencies:
5878+
mimic-fn "^2.1.0"
5879+
58235880
only@~0.0.2:
58245881
version "0.0.2"
58255882
resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4"
@@ -5880,6 +5937,11 @@ p-finally@^1.0.0:
58805937
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
58815938
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
58825939

5940+
p-finally@^2.0.0:
5941+
version "2.0.1"
5942+
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561"
5943+
integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==
5944+
58835945
p-limit@^1.0.0, p-limit@^1.1.0:
58845946
version "1.3.0"
58855947
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
@@ -6044,7 +6106,7 @@ path-key@^2.0.0, path-key@^2.0.1:
60446106
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
60456107
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
60466108

6047-
path-key@^3.1.0:
6109+
path-key@^3.0.0, path-key@^3.1.0:
60486110
version "3.1.0"
60496111
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3"
60506112
integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==
@@ -7651,6 +7713,11 @@ strip-eof@^1.0.0:
76517713
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
76527714
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
76537715

7716+
strip-final-newline@^2.0.0:
7717+
version "2.0.0"
7718+
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad"
7719+
integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
7720+
76547721
strip-indent@^2.0.0:
76557722
version "2.0.0"
76567723
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"

0 commit comments

Comments
 (0)