Skip to content

Commit ea4aeef

Browse files
author
Guillaume Chau
committed
Revert "fix(generator): don't lint files"
This reverts commit 2f014ef.
1 parent 0f2040d commit ea4aeef

File tree

3 files changed

+23
-70
lines changed

3 files changed

+23
-70
lines changed

generator/index.js

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

143+
// Linting
143144
const execa = require('execa')
144145

145146
if (api.hasPlugin('apollo')) {
@@ -149,11 +150,31 @@ module.exports = (api, options, rootOptions) => {
149150
'--output',
150151
api.resolve('./node_modules/.temp/graphql/schema'),
151152
], {
152-
preferLocal: true,
153+
stdio: ['inherit', 'inherit', 'inherit'],
154+
cleanup: true,
155+
shell: true,
153156
})
154157
} catch (e) {}
155158
}
156159

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+
157178
api.exitLog(`Start dev server with ${chalk.cyan(`${hasYarn() ? 'yarn' : 'npm'} run ssr:serve`)}`, 'info')
158179
api.exitLog(`Build with ${chalk.cyan(`${hasYarn() ? 'yarn' : 'npm'} run ssr:build`)}`, 'info')
159180
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,7 +33,6 @@
3333
"clipboardy": "^2.1.0",
3434
"compression": "^1.7.4",
3535
"cross-env": "^6.0.3",
36-
"execa": "^3.2.0",
3736
"express": "^4.17.1",
3837
"fs-extra": "^8.1.0",
3938
"hash-sum": "^2.0.0",

yarn.lock

+1-68
Original file line numberDiff line numberDiff line change
@@ -3213,22 +3213,6 @@ execa@^1.0.0:
32133213
signal-exit "^3.0.0"
32143214
strip-eof "^1.0.0"
32153215

3216-
execa@^3.2.0:
3217-
version "3.2.0"
3218-
resolved "https://registry.yarnpkg.com/execa/-/execa-3.2.0.tgz#18326b79c7ab7fbd6610fd900c1b9e95fa48f90a"
3219-
integrity sha512-kJJfVbI/lZE1PZYDI5VPxp8zXPO9rtxOkhpZ0jMKha56AI9y2gGVC6bkukStQf0ka5Rh15BA5m7cCCH4jmHqkw==
3220-
dependencies:
3221-
cross-spawn "^7.0.0"
3222-
get-stream "^5.0.0"
3223-
human-signals "^1.1.1"
3224-
is-stream "^2.0.0"
3225-
merge-stream "^2.0.0"
3226-
npm-run-path "^4.0.0"
3227-
onetime "^5.1.0"
3228-
p-finally "^2.0.0"
3229-
signal-exit "^3.0.2"
3230-
strip-final-newline "^2.0.0"
3231-
32323216
expand-brackets@^0.1.4:
32333217
version "0.1.5"
32343218
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
@@ -3683,13 +3667,6 @@ get-stream@^4.0.0:
36833667
dependencies:
36843668
pump "^3.0.0"
36853669

3686-
get-stream@^5.0.0:
3687-
version "5.1.0"
3688-
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9"
3689-
integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==
3690-
dependencies:
3691-
pump "^3.0.0"
3692-
36933670
get-value@^2.0.3, get-value@^2.0.6:
36943671
version "2.0.6"
36953672
resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28"
@@ -4101,11 +4078,6 @@ https-browserify@^1.0.0:
41014078
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
41024079
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=
41034080

4104-
human-signals@^1.1.1:
4105-
version "1.1.1"
4106-
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3"
4107-
integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==
4108-
41094081
[email protected], iconv-lite@^0.4.24, iconv-lite@^0.4.4:
41104082
version "0.4.24"
41114083
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -4563,11 +4535,6 @@ is-stream@^1.0.0, is-stream@^1.1.0:
45634535
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
45644536
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
45654537

4566-
is-stream@^2.0.0:
4567-
version "2.0.0"
4568-
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
4569-
integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==
4570-
45714538
is-svg@^2.0.0:
45724539
version "2.1.0"
45734540
resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
@@ -5268,11 +5235,6 @@ merge-source-map@^1.1.0:
52685235
dependencies:
52695236
source-map "^0.6.1"
52705237

5271-
merge-stream@^2.0.0:
5272-
version "2.0.0"
5273-
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
5274-
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
5275-
52765238
merge2@^1.2.3:
52775239
version "1.2.3"
52785240
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5"
@@ -5378,11 +5340,6 @@ mimic-fn@^1.0.0:
53785340
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
53795341
integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==
53805342

5381-
mimic-fn@^2.1.0:
5382-
version "2.1.0"
5383-
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
5384-
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
5385-
53865343
min-document@^2.19.0:
53875344
version "2.19.0"
53885345
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
@@ -5746,13 +5703,6 @@ npm-run-path@^2.0.0:
57465703
dependencies:
57475704
path-key "^2.0.0"
57485705

5749-
npm-run-path@^4.0.0:
5750-
version "4.0.0"
5751-
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.0.tgz#d644ec1bd0569187d2a52909971023a0a58e8438"
5752-
integrity sha512-8eyAOAH+bYXFPSnNnKr3J+yoybe8O87Is5rtAQ8qRczJz1ajcsjg8l2oZqP+Ppx15Ii3S1vUTjQN2h4YO2tWWQ==
5753-
dependencies:
5754-
path-key "^3.0.0"
5755-
57565706
npmlog@^4.0.2:
57575707
version "4.1.2"
57585708
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
@@ -5875,13 +5825,6 @@ onetime@^2.0.0:
58755825
dependencies:
58765826
mimic-fn "^1.0.0"
58775827

5878-
onetime@^5.1.0:
5879-
version "5.1.0"
5880-
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5"
5881-
integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==
5882-
dependencies:
5883-
mimic-fn "^2.1.0"
5884-
58855828
only@~0.0.2:
58865829
version "0.0.2"
58875830
resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4"
@@ -5942,11 +5885,6 @@ p-finally@^1.0.0:
59425885
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
59435886
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=
59445887

5945-
p-finally@^2.0.0:
5946-
version "2.0.1"
5947-
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561"
5948-
integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==
5949-
59505888
p-limit@^1.0.0, p-limit@^1.1.0:
59515889
version "1.3.0"
59525890
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
@@ -6111,7 +6049,7 @@ path-key@^2.0.0, path-key@^2.0.1:
61116049
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
61126050
integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
61136051

6114-
path-key@^3.0.0, path-key@^3.1.0:
6052+
path-key@^3.1.0:
61156053
version "3.1.0"
61166054
resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3"
61176055
integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg==
@@ -7713,11 +7651,6 @@ strip-eof@^1.0.0:
77137651
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
77147652
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
77157653

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-
77217654
strip-indent@^2.0.0:
77227655
version "2.0.0"
77237656
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"

0 commit comments

Comments
 (0)