-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependencies and cleanup #4425
Conversation
- Update packages - Don't use gulp-eslint - Don't use gulp-stylelint - Use login's stylelint config
No longer relevant per stylelint
fixes per stylelint - remove strunquote - use if not instead of if == null
Remove stray strunquote
"stylelint-prettier/recommended" | ||
"@18f/identity-stylelint-config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated to login.gov's stylelint config, as it simplifies conforming to TTS CSS/Sass coding standards
@@ -2,7 +2,6 @@ | |||
const buffer = require("vinyl-buffer"); | |||
const browserify = require("browserify"); | |||
const childProcess = require("child_process"); | |||
const eslint = require("gulp-eslint"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed gulp-eslint as it wasn't working properly and we don't need gulp to run eslint
); | ||
|
||
gulp.task("eslint", (done) => { | ||
if (!cFlags.test) { | ||
dutil.logMessage("eslint", "Skipping linting of JavaScript files."); | ||
return done(); | ||
} | ||
|
||
return gulp | ||
.src(["src/js/**/*.js", "spec/**/*.js"]) | ||
.pipe( | ||
eslint({ | ||
fix: true, | ||
}) | ||
) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failAfterError()); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed eslint task, moved to an npm script
@@ -4,7 +4,7 @@ const csso = require("postcss-csso"); | |||
const discardComments = require("postcss-discard-comments"); | |||
const filter = require("gulp-filter"); | |||
const gulp = require("gulp"); | |||
const gulpStylelint = require("gulp-stylelint"); | |||
const stylelint = require("stylelint"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed gulp-stylelint
per https://github.com/18F/identity-style-guide/pull/276/files#r765819043
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gulp-stylelint
may be abandoned, as it doesn't support the newest major release of Stylelint released early in the year, and the maintainer hasn't been active in related issues (olegskl/gulp-stylelint#132).
gulp.task('stylelint', async function (callback) { | ||
const { errored, output } = await stylelint.lint({ | ||
files: [`${PROJECT_SASS_SRC}/**/*.scss`, `!${PROJECT_SASS_SRC}/uswds/**/*.scss`], | ||
formatter: 'string', | ||
}); | ||
|
||
callback(errored ? new Error(output) : null); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored task per https://github.com/18F/identity-style-guide/pull/276/files#diff-25789e3ba4c2adf4a68996260eb693a441b4a834c38b76167a120f0b51b969f7R111-R118
Removes gulp-stylelint
requirement
@@ -1,13 +1,11 @@ | |||
// Output the @font-face rule | |||
@mixin at-font-face($display-name, $file-path, $font-weight, $font-style) { | |||
$file-path: unquote($file-path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer necessary per stylelint
// TODO: If $theme-use-rails-pipeline use font-url() statements | ||
// instead of url() | ||
// Dunno why I can't do this without an error... | ||
|
||
@font-face { | ||
font-family: unquote($display-name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer necessary per stylelint
@@ -31,7 +31,7 @@ loop | |||
// utility-feature? utility-property | |||
@mixin add-utility-declaration($declaration, $utility-type, $important) { | |||
@each $ext-prop, $ext-value in map-get($declaration, $utility-type) { | |||
#{strunquote($ext-prop)}: unquote("#{strunquote($ext-value)}#{$important}"); | |||
#{$ext-prop}: unquote("#{$ext-value}#{$important}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer necessary per stylelint
@import "list"; | ||
@import "table"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed filetype per stylelint
@mixin table-button-sorted-descending-styles { | ||
@include table-button-default-styles; | ||
.usa-icon > g.descending { | ||
fill: $table-sorted-header-text-color; | ||
} | ||
} | ||
|
||
/* stylelint-disable selector-class-pattern */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some stylelint disables for come class names that don't pass its BEM test but that we will not change in this release
See comments for more details