From 106999746fd85657418fc4e540ee9b780a7a29b6 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Wed, 8 Jun 2022 14:05:56 -0700 Subject: [PATCH] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20Update=20docs=20fo?= =?UTF-8?q?r=20yarn=20scripts=20(#1101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/README.md | 11 +++++++++-- addons/api/package.json | 3 ++- addons/auth/README.md | 4 +++- addons/auth/package.json | 6 +++--- addons/core/README.md | 8 +++++++- .../core/addon/components/form/authenticate/index.hbs | 2 ++ addons/core/package.json | 7 +++++-- addons/rose/README.md | 7 ++++++- addons/rose/package.json | 3 ++- 9 files changed, 39 insertions(+), 12 deletions(-) diff --git a/addons/api/README.md b/addons/api/README.md index 66ee38911..cfa454441 100644 --- a/addons/api/README.md +++ b/addons/api/README.md @@ -47,21 +47,28 @@ List of available project commands. `yarn run ` | build:development | Builds the dummy app in development mode. | | build | Builds the dummy app for production. | | lint | Runs all lint commands. | +| lint:fix | Runs automatic lint fixes for all type of file. | +| lint:hbs | Runs lint for `hbs` template files. | +| lint:hbs:fix | Runs automatic lint fixes for `hbs` template files. | | lint:js | Lints `js` files. | +| lint:js:fix | Runs automatic lint fixes for `js` files. | | format | Runs all auto-formatters. | | format:js | Auto-formats `js` files using Prettier. | | start | Runs the dummy app local server. | | test | Runs all tests. | -| test:all | Runs tests across multiple Ember versions with ember-try. | +| test:ember-compatibility | Runs tests across multiple Ember versions with ember-try. | +| precommit | Runs all lint and format. | | doc:toc | Automatically generates a table of contents for this README file. | Additional commands in the monorepo package may affect this projects. ## Linting +* `yarn lint:fix` * `yarn lint:hbs` +* `yarn lint:hbs:fix` * `yarn lint:js` -* `yarn lint:js --fix` +* `yarn lint:js:fix` ## Formatting diff --git a/addons/api/package.json b/addons/api/package.json index 03cb7d670..d8787e6b3 100644 --- a/addons/api/package.json +++ b/addons/api/package.json @@ -16,11 +16,12 @@ "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint .", "lint:js:fix": "eslint . --fix", - "format": "npm run format:js", + "format": "yarn run format:js", "format:js": "prettier --write '{addon,app,config,stories,tests,mirage}/**/*.js' *.js", "start": "ember serve", "test": "ember test", "test:ember-compatibility": "ember try:each", + "precommit": "yarn lint && yarn format && yarn test", "doc:toc": "doctoc README.md" }, "dependencies": { diff --git a/addons/auth/README.md b/addons/auth/README.md index 80621c93c..3f0c437d2 100644 --- a/addons/auth/README.md +++ b/addons/auth/README.md @@ -34,19 +34,21 @@ List of available project commands. `yarn run ` | Command | Description | | ------- | ----------- | | lint | Runs all lint commands. | +| lint:fix | Runs automatic lint fixes for all files. | | lint:js | Lints `js` files. | +| lint:js:fix | Runs automatic lint fixes for `js` files. | | format | Runs all auto-formatters. | | format:js | Auto-formats `js` files using Prettier. | | start | Runs the dummy app local server. | | test | Runs all tests. | | test:all | Runs tests across multiple Ember versions with ember-try. | +| precommit | Runs all lint, format and tests. | | doc:toc | Automatically generates a table of contents for this README file. | Additional commands in the monorepo package may affect this projects. ## Linting -* `yarn lint:hbs` * `yarn lint:js` * `yarn lint:js --fix` diff --git a/addons/auth/package.json b/addons/auth/package.json index 0a9867d1f..9aeffc884 100644 --- a/addons/auth/package.json +++ b/addons/auth/package.json @@ -10,14 +10,14 @@ "scripts": { "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", - "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint .", - "format": "npm run format:js", - "format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js", "lint:js:fix": "eslint . --fix", + "format": "yarn run format:js", + "format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js", "start": "ember serve", "test": "ember test", "test:ember-compatibility": "ember try:each", + "precommit": "yarn lint && yarn format && yarn test", "doc:toc": "doctoc README.md" }, "dependencies": { diff --git a/addons/core/README.md b/addons/core/README.md index af424bc68..e92ca36b8 100644 --- a/addons/core/README.md +++ b/addons/core/README.md @@ -154,11 +154,16 @@ List of available project commands. `yarn run ` | build | Builds the dummy app for production. | | lint | Runs all lint commands. | | lint:js | Lints `js` files. | +| lint:js:fix | Runs automatic lint fixes for `js` files. | +| lint:hbs | Runs lint for `hbs` template files. | +| lint:hbs:fix | Runs automatic lint fixes for `hbs` template files. | | format | Runs all auto-formatters. | | format:js | Auto-formats `js` files using Prettier. | +| format:hbs | Auto-formats `hbs` files using Prettier. | | start | Runs the dummy app local server. | | test | Runs all tests. | -| test:all | Runs tests across multiple Ember versions with ember-try. | +| test:ember-compatibility | Runs tests across multiple Ember versions with ember-try. | +| precommit | Runs all lint, format and tests. | | doc:toc | Automatically generates a table of contents for this README file. | Additional commands in the monorepo package may affect this projects. @@ -166,6 +171,7 @@ Additional commands in the monorepo package may affect this projects. ## Linting * `yarn lint:hbs` +* `yarn lint:hbs --fix` * `yarn lint:js` * `yarn lint:js --fix` diff --git a/addons/core/addon/components/form/authenticate/index.hbs b/addons/core/addon/components/form/authenticate/index.hbs index e7ca752c2..e87376970 100644 --- a/addons/core/addon/components/form/authenticate/index.hbs +++ b/addons/core/addon/components/form/authenticate/index.hbs @@ -1,3 +1,5 @@ +{{!-- //TODO fix the issue and delete disabling the rule --}} +{{!-- template-lint-disable no-passed-in-event-handlers --}} {{#if @model.type}} {{component (concat "form/authenticate/" @model.type) submit=@submit diff --git a/addons/core/package.json b/addons/core/package.json index 79fe33447..61d06898a 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -17,14 +17,17 @@ "build": "ember build --environment=production", "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", + "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint .", - "format": "npm run format:js", - "format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js", "lint:js:fix": "eslint . --fix", + "format": "npm-run-all format:*", + "format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js", + "format:hbs": "prettier --write '{addon,app,tests}/**/*.hbs'", "start": "ember serve", "test": "ember test", "test:ember-compatibility": "ember try:each", + "precommit": "yarn lint && yarn format && yarn test", "doc:toc": "doctoc README.md" }, "dependencies": { diff --git a/addons/rose/README.md b/addons/rose/README.md index 03c01e1d9..a17a811b5 100644 --- a/addons/rose/README.md +++ b/addons/rose/README.md @@ -40,16 +40,21 @@ List of available project commands. `yarn run ` | build:development | Builds the dummy app in development mode. | | build | Builds the dummy app for production. | | lint | Runs all lint commands. | +| lint:fix | Runs automatic lint fixes for all files. | | lint:hbs | Lints template `hbs` files. | +| lint:hbs:fix | Runs automatic lint fixes for `hbs` files. | | lint:js | Lints `js` files. | +| lint:js:fix | Runs automatic lint fixes for `js` files. | | lint:sass | Lints `scss` files. | | format | Runs all auto-formatters. | | format:js | Auto-formats `js` files using Prettier. | +| format:hbs | Auto-formats `hbs` files using Prettier. | | format:sass | Auto-formats `scss` files using Prettier. | | start | Runs the dummy app local server. | | storybook | Runs the Storybook local server on port 6006. Be sure to start the standard server (see above) in a separate terminal. | | test | Runs all tests. | -| test:all | Runs tests across multiple Ember versions with ember-try. | +| test:ember-compatibility | Runs tests across multiple Ember versions with ember-try. | +| precommit | Runs all lint, format and tests. | | doc:toc | Automatically generates a table of contents for this README file. | Additional commands in the monorepo package may affect this projects. diff --git a/addons/rose/package.json b/addons/rose/package.json index c8789f964..03a53ed04 100644 --- a/addons/rose/package.json +++ b/addons/rose/package.json @@ -15,18 +15,19 @@ "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint .", + "lint:js:fix": "eslint . --fix", "lint:sass": "sass-lint -v -q", "format": "npm-run-all format:*", "format:hbs": "prettier --write '{addon,tests}/**/*.hbs'", "format:js": "prettier --write '{addon,app,config,stories,tests}/**/*.js' *.js", "format:sass": "prettier --write addon/**/*.scss", - "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "ember test", "test:ember-compatibility": "ember try:each", "prestorybook": "yarn build && yarn storybook:build", "storybook": "start-storybook -p 6006 -s dist", "storybook:build": "build-storybook -s dist && sb extract", + "precommit": "yarn lint && yarn format && yarn test", "doc:toc": "doctoc README.md" }, "dependencies": {