Skip to content

Commit

Permalink
⚡ Nuke package-lock; update dev dependencies
Browse files Browse the repository at this point in the history
Includes replacement of styling with stylelint and a plugin for stylus. Pug and stylus code got a bit refactored due to the addition of new rules.
  • Loading branch information
CosmoMyzrailGorynych committed Jul 2, 2022
1 parent a6aeb08 commit 832e8cf
Show file tree
Hide file tree
Showing 33 changed files with 7,563 additions and 8,176 deletions.
37 changes: 37 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
plugins:
- stylelint-stylus
overrides:
- files:
- '*.stylus'
- '*.styl'
- '**/*.stylus'
- '**/*.styl'
customSyntax: 'postcss-styl'
rules:
color-no-invalid-hex: true
font-family-no-duplicate-names: true
named-grid-areas-no-invalid: true
function-calc-no-unspaced-operator: true
function-linear-gradient-no-nonstandard-direction: true
string-no-newline: true
unit-no-unknown: true
keyframe-declaration-no-important: true
keyframe-block-no-duplicate-selectors: true
declaration-block-no-duplicate-properties: true
declaration-block-no-shorthand-property-overrides: true
declaration-block-no-duplicate-custom-properties: true
block-no-empty: true
media-feature-name-no-unknown: true
comment-no-empty: true
no-duplicate-at-import-rules: true
no-empty-source: true
alpha-value-notation: 'number'
length-zero-no-unit: true
declaration-block-single-line-max-declarations: 1
selector-attribute-quotes: always
selector-id-pattern: 'the[A-Z][a-zA-Z]*'
no-irregular-whitespace: true

stylus/pythonic: 'always'
stylus/semicolon: 'never'
stylus/property-no-unknown: true
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"electron-packager": "^15.0.0",
"execa": "^5.1.1",
"extract-zip": "^2.0.1",
"fs-extra": "^9.0.1",
"fs-extra": "^10.1.0",
"fuse.js": "^3.6.1",
"google-closure-compiler": "^20191111.0.0",
"highlight.js": "^10.4.1",
Expand Down
21 changes: 14 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,20 @@ const watch = () => {
};

const lintStylus = () => {
const stylint = require('gulp-stylint');
return gulp.src(['./src/styl/**/*.styl', '!./src/styl/3rdParty/**/*.styl'])
.pipe(stylint())
.pipe(stylint.reporter())
.pipe(stylint.reporter('fail', {
failOnWarning: true
}));
const stylelint = require('stylelint');
return stylelint.lint({
files: [
'./src/styl/**/*.styl',
'!./src/styl/3rdParty/**/*.styl'
],
formatter: 'string'
}).then(lintResults => {
if (lintResults.errored) {
console.log(lintResults.output);
} else {
console.log('✔ Cheff\'s kiss! 😙👌');
}
});
};

const lintJS = () => {
Expand Down
Loading

0 comments on commit 832e8cf

Please sign in to comment.