pfaffman
(Jay Pfaffman)
7 Settembre 2020, 3:27pm
1
Ho due plugin che falliscono i test di Travis. Sembra che non abbiano file ES6 e che eslint si senta escluso?
Running linters/prettyfiers
eslint yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/eslint -v
v6.8.0
Done in 0.32s.
prettier yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/prettier -v
2.1.1
Done in 0.28s.
[2020-09-07 01:34:21] bundle exec rubocop --parallel plugins/discourse-allow-pm-to-staff
Inspecting 2 files
..
2 files inspected, no offenses detected
[2020-09-07 01:34:22] bundle exec ruby script/i18n_lint.rb plugins/discourse-allow-pm-to-staff/config/locales/{client,server}.en.yml
[2020-09-07 01:34:23] yarn eslint --global I18n --ext .es6 plugins/discourse-allow-pm-to-staff
yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/eslint --global I18n --ext .es6 plugins/discourse-allow-pm-to-staff
Oops! Something went wrong! :(
ESLint: 6.8.0.
No files matching the pattern "plugins/discourse-allow-pm-to-staff" were found.
Please check for typing mistakes in the pattern.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Listing prettier offenses in discourse-allow-pm-to-staff:
pfaffman
(Jay Pfaffman)
10 Settembre 2020, 4:39pm
2
Sì, eslint non ama rimanere senza lavoro. Questo lo fa sentire più utile.
mkdir -p assets/javascripts/discourse
touch assets/javascripts/discourse/eslint.js.es6
git add assets/javascripts/discourse/eslint.js.es6
git commit -m 'proviamo a far sentire eslint meno escluso'
git push
Ah, ma credo che questa sia la soluzione vera:
https://github.com/discourse/discourse/compare/master...pfaffman:patch-5
merefield
(Robert)
10 Settembre 2020, 4:43pm
3
Ah, ma come farai a pubblicare quella PR senza che eslint si lamenti?
pfaffman
(Jay Pfaffman)
10 Settembre 2020, 4:45pm
4
Capisco così poco di ciò che sta succedendo qui che quasi non ho colto la tua battuta!
j.jaffeux
(Joffrey Jaffeux)
10 Settembre 2020, 6:04pm
5
Sì, ho spinto questa correzione per GitHub Actions l’altro giorno:
committed 06:01PM - 04 Sep 20 UTC
Quindi, fondamentalmente, la nuova versione di eslint non accetta quando non corrisponde a nulla. Ho anche approfittato dell’occasione per semplificare i comandi e applicherò la stessa cosa al nostro task rake, nessun problema.
j.jaffeux
(Joffrey Jaffeux)
10 Settembre 2020, 6:18pm
6
Questo dovrebbe risolvere il problema:
committed 06:17PM - 10 Sep 20 UTC
The recent upgrade of eslint fails if no files is found for the defined patterns… .
Fammi sapere come va
pfaffman
(Jay Pfaffman)
10 Settembre 2020, 6:45pm
7
2 file esaminati, nessun reato rilevato
[2020-09-10 18:43:13] bundle exec ruby script/i18n_lint.rb plugins/discourse-topic-default-tag/config/locales/{client,server}.en.yml
[2020-09-10 18:43:13] yarn eslint --global I18n --ext .es6 plugins/discourse-topic-default-tag
yarn run v1.22.5
$ /var/www/discourse/node_modules/.bin/eslint --global I18n --ext .es6 plugins/discourse-topic-default-tag
Ops! Qualcosa è andato storto :(
ESLint: 6.8.0.
Nessun file corrispondente al modello "plugins/discourse-topic-default-tag" trovato.
Controlla eventuali errori di digitazione nel modello.
Errore: comando fallito con codice di uscita 2.
Per informazioni visita https://yarnpkg.com/en/docs/cli/run per la documentazione su questo comando.
Elenco dei reati di prettier in discourse-topic-default-tag:
Ops. Mia colpa.
j.jaffeux
(Joffrey Jaffeux)
10 Settembre 2020, 7:11pm
8
Ah giusto, sì, sta usando le funzionalità di discourse-plugin-ci; se leggi il codice, vedrai:
E il mio commit non è ancora stato incluso in tests-passed