Skip to content

Commit

Permalink
feat: add stylelint to blueprint per RFC ember-cli#814
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Jan 10, 2023
1 parent aa330bf commit c20d83a
Show file tree
Hide file tree
Showing 24 changed files with 124 additions and 1 deletion.
2 changes: 2 additions & 0 deletions blueprints/addon/files/npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
/.gitignore
/.prettierignore
/.prettierrc.js
/.stylelintignore
/.stylelintrc.js
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
Expand Down
1 change: 1 addition & 0 deletions blueprints/app/files/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',<% if (blueprint !== 'app') { %>
'./index.js',<% } %>
Expand Down
25 changes: 25 additions & 0 deletions blueprints/app/files/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
5 changes: 5 additions & 0 deletions blueprints/app/files/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
extends: ['stylelint-config-standard', 'stylelint-prettier/recommended'],
};
6 changes: 6 additions & 0 deletions blueprints/app/files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -65,6 +67,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
},
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/addon/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand Down
8 changes: 7 additions & 1 deletion tests/fixtures/addon/defaults-travis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -62,7 +64,11 @@
"loader.js": "^4.7.0",
"prettier": "^2.3.0",
"qunit": "^2.15.0",
"qunit-dom": "^1.6.0"
"qunit-dom": "^1.6.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0"
},
"engines": {
"node": "14.* || 16.* || >= 18"
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/addon/defaults/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -62,6 +64,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"webpack": "^5.75.0"
},
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/addon/typescript/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/addon/yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -63,6 +65,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"webpack": "^5.75.0"
},
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/defaults/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -59,6 +61,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
},
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/embroider-no-welcome/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -61,6 +63,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
},
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/embroider-yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -62,6 +64,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
},
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/embroider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -62,6 +64,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
},
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/nested-project/actual-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -56,6 +58,10 @@
"eslint-plugin-qunit": "^7.0.0",
"loader.js": "^4.7.0",
"prettier": "^2.2.1",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"qunit": "^2.14.1",
"qunit-dom": "^1.6.0"
},
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/npm-travis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -59,6 +61,10 @@
"prettier": "^2.3.0",
"qunit": "^2.15.0",
"qunit-dom": "^1.6.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0"
},
"engines": {
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -58,6 +60,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
},
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/app/typescript-embroider/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/app/typescript/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./testem.js',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -58,6 +60,10 @@
"prettier": "^2.2.1",
"qunit": "^2.14.1",
"qunit-dom": "^1.6.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0"
},
"engines": {
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/yarn-travis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -60,6 +62,10 @@
"prettier": "^2.3.0",
"qunit": "^2.15.0",
"qunit-dom": "^1.6.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0"
},
"engines": {
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/app/yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"scripts": {
"build": "ember build --environment=production",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:css": "stylelint \"**/*.{css}\"",
"lint:css:fix": "concurrently \"npm:lint:css\" --fix",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
Expand Down Expand Up @@ -59,6 +61,10 @@
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"stylelint": "^14.16.1",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-standard": "^29.0.0",
"stylelint-prettier": "^2.0.0",
"tracked-built-ins": "^3.1.0",
"webpack": "^5.75.0"
},
Expand Down

0 comments on commit c20d83a

Please sign in to comment.