Skip to content

Commit

Permalink
v7.26.0 - Autofix for SCSS files added to compilation (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleynolan authored and DamianMullins committed Sep 3, 2018
1 parent 4ee6134 commit e2b4be4
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 150 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


v7.26.0
------------------------------
*September 1, 2018*

### Added
- `gulp-stylelint` plugin replaces postcss for the SCSS compilation so that the task can autofix any issues (as the postcss plugin isn't capable of doing this).

### Changed
- Updated `eslint-config-fozzie` dependency to remove warnings coming from airbnb-base config.
- Update a bunch of minor dependencies.


v7.25.0
------------------------------
*August 24, 2018*
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Runs the following tasks

Lint all SCSS files in the source directory — this runs before the [`css:bundle`](#cssbundle) task.

This task will also automatically fix any errors that it can (through stylelint's autofix setting).

- #### `css:lint`

Lint all CSS files in the dist directory — this runs after the [`css:bundle`](#cssbundle) task.
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justeat/gulp-build-fozzie",
"version": "7.25.0",
"version": "7.26.0",
"description": "Gulp build tasks for use across Fozzie modules",
"main": "index.js",
"author": "Damian Mullins <[email protected]> (http://www.damianmullins.com)",
Expand All @@ -27,19 +27,19 @@
"release-major": "release-it major --non-interactive -p"
},
"dependencies": {
"@justeat/eslint-config-fozzie": "2.1.0",
"@justeat/f-copy-assets": "^0.6.0",
"@justeat/eslint-config-fozzie": "2.2.0",
"@justeat/f-copy-assets": "^1.1.0",
"@justeat/f-templates-loader": "0.1.0",
"@justeat/gulp-gh-pages": "^1.0.3",
"@justeat/stylelint-config-fozzie": "^2.0.1",
"assemble": "^0.24.3",
"autoprefixer": "^9.1.0",
"babelify": "^8.0.0",
"browser-sync": "^2.24.6",
"browser-sync": "^2.24.7",
"browserify": "^16.1.1",
"cssnano": "^4.0.5",
"cssnano": "^4.1.0",
"del": "^3.0.0",
"eslint": "^5.2.0",
"eslint": "^5.5.0",
"eslint-plugin-import": "^2.9.0",
"event-stream": "^3.3.4",
"exorcist": "^1.0.1",
Expand All @@ -57,16 +57,17 @@
"gulp-imagemin": "^4.1.0",
"gulp-newer": "^1.4.0",
"gulp-plumber": "^1.2.0",
"gulp-postcss": "^7.0.1",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^1.4.0",
"gulp-rev": "^8.1.1",
"gulp-sass": "^4.0.1",
"gulp-sass-variables": "^1.1.1",
"gulp-size": "^3.0.0",
"gulp-sourcemaps": "^2.6.4",
"gulp-strip-debug": "^3.0.0",
"gulp-stylelint": "^7.0.0",
"gulp-svgmin": "^1.2.4",
"gulp-svgstore": "^6.1.1",
"gulp-svgstore": "^7.0.0",
"gulp-tap": "^1.0.1",
"gulp-uglify-es": "^1.0.4",
"gulp-util": "^3.0.8",
Expand All @@ -78,8 +79,7 @@
"lodash.union": "^4.6.0",
"merge-stream": "^1.0.1",
"postcss-assets": "^5.0.0",
"postcss-reporter": "^5.0.0",
"postcss-scss": "^2.0.0",
"postcss-reporter": "^6.0.0",
"require-dir": "^1.0.0",
"run-sequence": "^2.2.1",
"stylelint": "^9.4.0",
Expand All @@ -89,9 +89,9 @@
"vinyl-source-stream": "^2.0.0"
},
"devDependencies": {
"concurrently": "^3.6.1",
"concurrently": "^4.0.1",
"coveralls": "^3.0.0",
"danger": "3.8.3",
"danger": "3.8.8",
"lodash.clonedeep": "^4.5.0",
"release-it": "^7.4.8"
},
Expand Down
22 changes: 11 additions & 11 deletions tasks/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const eyeglass = require('eyeglass');
const cssnano = require('cssnano');
const sourcemaps = require('gulp-sourcemaps');
const postcss = require('gulp-postcss');
const scss = require('postcss-scss');
const assets = require('postcss-assets');
const stylelint = require('stylelint');
const gulpStylelint = require('gulp-stylelint');
const reporter = require('postcss-reporter');
const autoprefixer = require('autoprefixer');
const path = require('path');
Expand Down Expand Up @@ -57,16 +57,16 @@ gulp.task('scss:lint', () => gulp.src([`${pathBuilder.scssSrcDir}/**/*.scss`, ..
plumber(config.gulp.onError)
))

.pipe(postcss(
[
stylelint(),
reporter({
clearMessages: true,
throwError: true
})
],
{ syntax: scss }
)));
.pipe(gulpStylelint({
fix: true,
reporters: [
{
formatter: 'string',
console: true
}
]
}))
.pipe(gulp.dest(file => file.base)));


/**
Expand Down
Loading

0 comments on commit e2b4be4

Please sign in to comment.