Skip to content
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

Merged
merged 15 commits into from Dec 14, 2021
Merged

Update dependencies and cleanup #4425

merged 15 commits into from Dec 14, 2021

Conversation

thisisdano
Copy link
Member

See comments for more details

Comment on lines -4 to +3
"stylelint-prettier/recommended"
"@18f/identity-stylelint-config"
Copy link
Member Author

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");
Copy link
Member Author

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

Comment on lines -68 to -85
);

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());
});
Copy link
Member Author

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");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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).

Comment on lines +41 to +48
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);
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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);
Copy link
Member Author

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);
Copy link
Member Author

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}");
Copy link
Member Author

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

Comment on lines +1 to +2
@import "list";
@import "table";
Copy link
Member Author

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 */
Copy link
Member Author

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

@thisisdano thisisdano merged commit 16db446 into develop Dec 14, 2021
@thisisdano thisisdano deleted the dw-update-deps branch December 14, 2021 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants