Skip to content

Update dependencies and cleanup#4425

Merged
thisisdano merged 15 commits into
developfrom
dw-update-deps
Dec 14, 2021
Merged

Update dependencies and cleanup#4425
thisisdano merged 15 commits into
developfrom
dw-update-deps

Conversation

@thisisdano

Copy link
Copy Markdown
Contributor

See comments for more details

Comment thread .stylelintrc.json
Comment on lines -4 to +3
"stylelint-prettier/recommended"
"@18f/identity-stylelint-config"

Copy link
Copy Markdown
Contributor 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

Comment thread config/gulp/javascript.js
const buffer = require("vinyl-buffer");
const browserify = require("browserify");
const childProcess = require("child_process");
const eslint = require("gulp-eslint");

Copy link
Copy Markdown
Contributor 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 thread config/gulp/javascript.js
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
Copy Markdown
Contributor 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

Comment thread config/gulp/sass.js
const filter = require("gulp-filter");
const gulp = require("gulp");
const gulpStylelint = require("gulp-stylelint");
const stylelint = require("stylelint");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor 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 thread config/gulp/sass.js
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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

// Dunno why I can't do this without an error...

@font-face {
font-family: unquote($display-name);

Copy link
Copy Markdown
Contributor 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

@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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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

}
}

/* stylelint-disable selector-class-pattern */

Copy link
Copy Markdown
Contributor 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.

2 participants