Some default steps to follow when I start a new Ember app. Most of this is taken from Sergio Arbeo's post on the Dockyard blog, but this is a bit more streamlined and suited to my usage:
-
Remove unnecessary packages:
npm uninstall --save-dev \ ember-welcome-page \ ember-data \ ember-cli-eslint \ ember-cli-template-lint
-
Add lower level packages:
npm i --save-dev \ ember-template-lint \ eslint \ prettier \ eslint-plugin-prettier \ eslint-config-prettier \ husky \ lint-staged \ concurrently
-
Add configs to package.json:
{ ...<other stuff>... "prettier": { "printWidth": 100, "singleQuote": true, "useTabs": false }, "husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "*.js": ["eslint —fix"], "*.hbs": ["ember-template-lint"] } }
-
Remove
render from application.hbs -
Update .eslintrc to use the prettier plugin and extend from its rules
-
Update .eslintrc to use
plugin:ember/octane
instead ofplugin:ember/recommended
.