From e8a7fbf7827b07b801004408b23da60bc73f9b02 Mon Sep 17 00:00:00 2001 From: Daniel <50356015+danny007in@users.noreply.github.com> Date: Tue, 18 May 2021 01:49:12 +0530 Subject: [PATCH] add lint in gulp --- .eslintignore | 4 +- .stylelintignore | 2 +- gulpfile.js | 282 +++++++++++++++++++++++++--------------------- package-lock.json | 143 +++++++++++++++++------ package.json | 9 +- 5 files changed, 269 insertions(+), 171 deletions(-) diff --git a/.eslintignore b/.eslintignore index 4fb106a4e..45991d4d5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,6 @@ **/*.min.js **/plugins/ -/dist/js/adminlte.js +/.temp/ +/dist/ /docs/ /docs_html/ -/.temp/ diff --git a/.stylelintignore b/.stylelintignore index e75972695..5d9a405e2 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,8 +1,8 @@ **/*.html **/*.md **/*.min.css +**/.temp/ **/dist/ **/docs_html/ **/plugins/ **/.cache/ -/.temp/ diff --git a/gulpfile.js b/gulpfile.js index 54d7de7ab..570e73260 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,15 +6,17 @@ const browserSync = require('browser-sync').create() const cleanCss = require('gulp-clean-css') const del = require('del') -const gulp = require('gulp') +const esbuild = require('esbuild') +const { ESLint } = require('eslint') +const { src, dest, lastRun, watch, series } = require('gulp') +const fileinclude = require('gulp-file-include') const npmDist = require('gulp-npm-dist') -const sass = require('gulp-sass') -const wait = require('gulp-wait') const postcss = require('gulp-postcss') const rename = require('gulp-rename') +const sass = require('gulp-sass') const sourcemaps = require('gulp-sourcemaps') -const fileinclude = require('gulp-file-include') -const esbuild = require('esbuild') +const gulpStylelint = require('gulp-stylelint') +const wait = require('gulp-wait') sass.compiler = require('sass') @@ -100,18 +102,28 @@ function postcssRtlOptions() { } // Compile SCSS -gulp.task('scss', () => { - return gulp.src(paths.src.scss + '/adminlte.scss') - .pipe(wait(500)) - .pipe(sourcemaps.init()) - .pipe(sass(sassOptions).on('error', sass.logError)) - .pipe(postcss(postcssOptions)) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.temp.css)) - .pipe(browserSync.stream()) -}) +const scss = () => { + return src(paths.src.scss + '/adminlte.scss') + .pipe(wait(500)) + .pipe(sourcemaps.init()) + .pipe(sass(sassOptions).on('error', sass.logError)) + .pipe(postcss(postcssOptions)) + .pipe(sourcemaps.write('.')) + .pipe(dest(paths.temp.css)) + .pipe(browserSync.stream()) +} + +// Lint SCSS +const lintScss = () => { + return src([paths.src.scss + '/**/*.scss'], { since: lastRun(lintScss) }) + .pipe(gulpStylelint({ + reporters: [ + { formatter: 'string', console: true } + ] + })) +} -gulp.task('ts', () => { +const ts = () => { return esbuild.build({ entryPoints: [paths.src.ts + '/adminlte.ts'], banner: { @@ -125,71 +137,81 @@ gulp.task('ts', () => { }).catch( error => console.error(error) ) -}) +} -gulp.task('index', () => { - return gulp.src([paths.src.base + '*.html']) - .pipe(fileinclude({ - prefix: '@@', - basepath: './src/partials/', - context: { - environment: 'development' - } - })) - .pipe(gulp.dest(paths.temp.base)) - .pipe(browserSync.stream()) -}) +// Lint TS +async function lintTs() { + const eslint = new ESLint() + const results = await eslint.lintFiles([paths.src.ts + '/**/*.ts']) + const formatter = await eslint.loadFormatter('stylish') + const resultText = formatter.format(results) + console.log(resultText) +} + +const index = () => { + return src([paths.src.base + '*.html']) + .pipe(fileinclude({ + prefix: '@@', + basepath: './src/partials/', + context: { + environment: 'development' + } + })) + .pipe(dest(paths.temp.base)) + .pipe(browserSync.stream()) +} -gulp.task('html', () => { - return gulp.src([paths.src.html]) - .pipe(fileinclude({ - prefix: '@@', - basepath: './src/partials/', - context: { - environment: 'development' - } - })) - .pipe(gulp.dest(paths.temp.html)) - .pipe(browserSync.stream()) -}) +const html = () => { + return src([paths.src.html]) + .pipe(fileinclude({ + prefix: '@@', + basepath: './src/partials/', + context: { + environment: 'development' + } + })) + .pipe(dest(paths.temp.html)) + .pipe(browserSync.stream()) +} -gulp.task('assets', () => { - return gulp.src([paths.src.assets]) - .pipe(gulp.dest(paths.temp.assets)) - .pipe(browserSync.stream()) -}) +const assets = () => { + return src([paths.src.assets]) + .pipe(dest(paths.temp.assets)) + .pipe(browserSync.stream()) +} -gulp.task('vendor', () => { - return gulp.src(npmDist(), { base: paths.src.node_modules }) - .pipe(gulp.dest(paths.temp.vendor)) -}) +const vendor = () => { + return src(npmDist({ copyUnminified: true }), { base: paths.src.node_modules }) + .pipe(dest(paths.temp.vendor)) +} -gulp.task('serve', gulp.series('scss', 'ts', 'html', 'index', 'assets', 'vendor', () => { +const serve = () => { browserSync.init({ server: paths.temp.base }) - gulp.watch([paths.src.scss], gulp.series('scss')) - gulp.watch([paths.src.ts], gulp.series('ts')) - gulp.watch([paths.src.html, paths.src.base + '*.html', paths.src.partials], gulp.series('html', 'index')) - gulp.watch([paths.src.assets], gulp.series('assets')) - gulp.watch([paths.src.vendor], gulp.series('vendor')) -})) + watch([paths.src.scss], series(scss)) + watch([paths.src.scss], series(lintScss)) + watch([paths.src.ts], series(ts)) + watch([paths.src.html, paths.src.base + '*.html', paths.src.partials], series(html, index)) + watch([paths.src.assets], series(assets)) + watch([paths.src.vendor], series(vendor)) +} // Minify CSS -gulp.task('minify:dist:css', () => { - return gulp.src([ +const minifyDistCss = () => { + return src([ paths.dist.css + '/**/*.css' ], { base: paths.dist.css }) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(cleanCss()) - .pipe(rename({ suffix: '.min' })) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.dist.css)) -}) + .pipe(sourcemaps.init({ loadMaps: true })) + .pipe(cleanCss()) + .pipe(rename({ suffix: '.min' })) + .pipe(sourcemaps.write('.')) + .pipe(dest(paths.dist.css)) +} // Minify JS -gulp.task('minify:dist:js', () => { +const minifyDistJs = () => { return esbuild.build({ entryPoints: [paths.dist.js + '/adminlte.js'], format: 'iife', @@ -200,55 +222,55 @@ gulp.task('minify:dist:js', () => { }).catch( error => console.error(error) ) -}) +} // Copy assets -gulp.task('copy:dist:assets', () => { - return gulp.src(paths.src.assets) - .pipe(gulp.dest(paths.dist.assets)) -}) +const copyDistAssets = () => { + return src(paths.src.assets) + .pipe(dest(paths.dist.assets)) +} // Clean -gulp.task('clean:dist', () => { +const cleanDist = () => { return del([paths.dist.base]) -}) +} // Compile and copy scss/css -gulp.task('copy:dist:css', () => { - return gulp.src([paths.src.scss + '/adminlte.scss']) - .pipe(wait(500)) - .pipe(sourcemaps.init()) - .pipe(sass(sassOptions).on('error', sass.logError)) - .pipe(postcss(postcssOptions)) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.dist.css)) -}) +const copyDistCss = () => { + return src([paths.src.scss + '/adminlte.scss']) + .pipe(wait(500)) + .pipe(sourcemaps.init()) + .pipe(sass(sassOptions).on('error', sass.logError)) + .pipe(postcss(postcssOptions)) + .pipe(sourcemaps.write('.')) + .pipe(dest(paths.dist.css)) +} -gulp.task('copy:dist:css:dark', () => { - return gulp.src([paths.src.scss + '/dark/*.scss']) - .pipe(wait(500)) - .pipe(sourcemaps.init()) - .pipe(sass(sassOptions).on('error', sass.logError)) - .pipe(postcss(postcssOptions)) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.dist.css + '/dark')) -}) +const copyDistCssDark = () => { + return src([paths.src.scss + '/dark/*.scss']) + .pipe(wait(500)) + .pipe(sourcemaps.init()) + .pipe(sass(sassOptions).on('error', sass.logError)) + .pipe(postcss(postcssOptions)) + .pipe(sourcemaps.write('.')) + .pipe(dest(paths.dist.css + '/dark')) +} -gulp.task('copy:dist:css:rtl', () => { - return gulp.src([ +const copyDistCssRtl = () => { + return src([ paths.dist.css + '/*.css', paths.dist.css + '/dark/*.css' ]) - .pipe(wait(500)) - .pipe(sourcemaps.init({ loadMaps: true })) - .pipe(postcss(postcssRtlOptions)) - .pipe(rename({ suffix: '.rtl' })) - .pipe(sourcemaps.write('.')) - .pipe(gulp.dest(paths.dist.css + '/rtl')) -}) + .pipe(wait(500)) + .pipe(sourcemaps.init({ loadMaps: true })) + .pipe(postcss(postcssRtlOptions)) + .pipe(rename({ suffix: '.rtl' })) + .pipe(sourcemaps.write('.')) + .pipe(dest(paths.dist.css + '/rtl')) +} // Compile and copy ts/js -gulp.task('copy:dist:js', () => { +const copyDistJs = () => { return esbuild.build({ entryPoints: [paths.src.ts + '/adminlte.ts'], banner: { @@ -262,41 +284,41 @@ gulp.task('copy:dist:js', () => { }).catch( error => console.error(error) ) -}) +} // Copy Html -gulp.task('copy:dist:html', () => { - return gulp.src([paths.src.html]) - .pipe(fileinclude({ - prefix: '@@', - basepath: './src/partials/', - context: { - environment: 'production' - } - })) - .pipe(gulp.dest(paths.dist.html)) -}) +const copyDistHtml = () => { + return src([paths.src.html]) + .pipe(fileinclude({ + prefix: '@@', + basepath: './src/partials/', + context: { + environment: 'production' + } + })) + .pipe(dest(paths.dist.html)) +} // Copy index -gulp.task('copy:dist:html:index', () => { - return gulp.src([paths.src.base + '*.html']) - .pipe(fileinclude({ - prefix: '@@', - basepath: './src/partials/', - context: { - environment: 'production' - } - })) - .pipe(gulp.dest(paths.dist.base)) -}) +const copyDistHtmlIndex = () => { + return src([paths.src.base + '*.html']) + .pipe(fileinclude({ + prefix: '@@', + basepath: './src/partials/', + context: { + environment: 'production' + } + })) + .pipe(dest(paths.dist.base)) +} // Copy node_modules to vendor -gulp.task('copy:dist:vendor', () => { - return gulp.src(npmDist(), { base: paths.src.node_modules }) - .pipe(gulp.dest(paths.dist.vendor)) -}) +const copyDistVendor = () => { + return src(npmDist({ copyUnminified: true }), { base: paths.src.node_modules }) + .pipe(dest(paths.dist.vendor)) +} -gulp.task('build', gulp.series('clean:dist', 'copy:dist:css', 'copy:dist:css:dark', 'copy:dist:css:rtl', 'minify:dist:css', 'copy:dist:js', 'minify:dist:js', 'copy:dist:html', 'copy:dist:html:index', 'copy:dist:assets', 'copy:dist:vendor')) +exports.build = series(lintScss, lintTs, cleanDist, copyDistCss, copyDistCssDark, copyDistCssRtl, minifyDistCss, copyDistJs, minifyDistJs, copyDistHtml, copyDistHtmlIndex, copyDistAssets, copyDistVendor) // Default -gulp.task('default', gulp.series('serve')) +exports.default = series(lintScss, scss, lintTs, ts, html, index, assets, vendor, serve) diff --git a/package-lock.json b/package-lock.json index d7cbcba8e..388afbe3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -618,13 +618,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.23.0.tgz", - "integrity": "sha512-tGK1y3KIvdsQEEgq6xNn1DjiFJtl+wn8JJQiETtCbdQxw1vzjXyAaIkEmO2l6Nq24iy3uZBMFQjZ6ECf1QdgGw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.24.0.tgz", + "integrity": "sha512-qbCgkPM7DWTsYQGjx9RTuQGswi+bEt0isqDBeo+CKV0953zqI0Tp7CZ7Fi9ipgFA6mcQqF4NOVNwS/f2r6xShw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.23.0", - "@typescript-eslint/scope-manager": "4.23.0", + "@typescript-eslint/experimental-utils": "4.24.0", + "@typescript-eslint/scope-manager": "4.24.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -634,55 +634,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.23.0.tgz", - "integrity": "sha512-WAFNiTDnQfrF3Z2fQ05nmCgPsO5o790vOhmWKXbbYQTO9erE1/YsFot5/LnOUizLzU2eeuz6+U/81KV5/hFTGA==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.24.0.tgz", + "integrity": "sha512-IwTT2VNDKH1h8RZseMH4CcYBz6lTvRoOLDuuqNZZoThvfHEhOiZPQCow+5El3PtyxJ1iDr6UXZwYtE3yZQjhcw==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.23.0", - "@typescript-eslint/types": "4.23.0", - "@typescript-eslint/typescript-estree": "4.23.0", + "@typescript-eslint/scope-manager": "4.24.0", + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/typescript-estree": "4.24.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.23.0.tgz", - "integrity": "sha512-wsvjksHBMOqySy/Pi2Q6UuIuHYbgAMwLczRl4YanEPKW5KVxI9ZzDYh3B5DtcZPQTGRWFJrfcbJ6L01Leybwug==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.24.0.tgz", + "integrity": "sha512-dj1ZIh/4QKeECLb2f/QjRwMmDArcwc2WorWPRlB8UNTZlY1KpTVsbX7e3ZZdphfRw29aTFUSNuGB8w9X5sS97w==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.23.0", - "@typescript-eslint/types": "4.23.0", - "@typescript-eslint/typescript-estree": "4.23.0", + "@typescript-eslint/scope-manager": "4.24.0", + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/typescript-estree": "4.24.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.23.0.tgz", - "integrity": "sha512-ZZ21PCFxPhI3n0wuqEJK9omkw51wi2bmeKJvlRZPH5YFkcawKOuRMQMnI8mH6Vo0/DoHSeZJnHiIx84LmVQY+w==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.24.0.tgz", + "integrity": "sha512-9+WYJGDnuC9VtYLqBhcSuM7du75fyCS/ypC8c5g7Sdw7pGL4NDTbeH38eJPfzIydCHZDoOgjloxSAA3+4l/zsA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.23.0", - "@typescript-eslint/visitor-keys": "4.23.0" + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/visitor-keys": "4.24.0" } }, "@typescript-eslint/types": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.23.0.tgz", - "integrity": "sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.24.0.tgz", + "integrity": "sha512-tkZUBgDQKdvfs8L47LaqxojKDE+mIUmOzdz7r+u+U54l3GDkTpEbQ1Jp3cNqqAU9vMUCBA1fitsIhm7yN0vx9Q==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.23.0.tgz", - "integrity": "sha512-5Sty6zPEVZF5fbvrZczfmLCOcby3sfrSPu30qKoY1U3mca5/jvU5cwsPb/CO6Q3ByRjixTMIVsDkqwIxCf/dMw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.24.0.tgz", + "integrity": "sha512-kBDitL/by/HK7g8CYLT7aKpAwlR8doshfWz8d71j97n5kUa5caHWvY0RvEUEanL/EqBJoANev8Xc/mQ6LLwXGA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.23.0", - "@typescript-eslint/visitor-keys": "4.23.0", + "@typescript-eslint/types": "4.24.0", + "@typescript-eslint/visitor-keys": "4.24.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -691,12 +691,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.23.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.23.0.tgz", - "integrity": "sha512-5PNe5cmX9pSifit0H+nPoQBXdbNzi5tOEec+3riK+ku4e3er37pKxMKDH5Ct5Y4fhWxcD4spnlYjxi9vXbSpwg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.24.0.tgz", + "integrity": "sha512-4ox1sjmGHIxjEDBnMCtWFFhErXtKA1Ec0sBpuz0fqf3P+g3JFGyTxxbF06byw0FRsPnnbq44cKivH7Ks1/0s6g==", "dev": true, "requires": { - "@typescript-eslint/types": "4.23.0", + "@typescript-eslint/types": "4.24.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -4872,6 +4872,81 @@ } } }, + "gulp-stylelint": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/gulp-stylelint/-/gulp-stylelint-13.0.0.tgz", + "integrity": "sha512-qFWBXnYDsGy6ttzqptctMZjJhhGc0FdFE+UNPlj/5fTyuUo5mfxcc7pzN4hIJnvB79BO1WikLtdtXuC/G2AhGA==", + "dev": true, + "requires": { + "chalk": "^3.0.0", + "fancy-log": "^1.3.3", + "plugin-error": "^1.0.1", + "source-map": "^0.7.3", + "strip-ansi": "^6.0.0", + "through2": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + } + } + }, "gulp-wait": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/gulp-wait/-/gulp-wait-0.0.2.tgz", diff --git a/package.json b/package.json index 48a814697..5892a088c 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,11 @@ "main": "dist/js/adminlte.min.js", "scripts": { "bundlewatch": "bundlewatch --config .bundlewatch.config.json", - "css-lint": "stylelint \"scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache", + "css-lint": "stylelint \"src/scss/**/*.scss\" --cache --cache-location .cache/.stylelintcache", "lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json", "ts:type-check": "tsc --noEmit", "js-lint": "eslint --ext=js,ts --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .", - "lint": "npm-run-all --continue-on-error --parallel css-lint js-lint lockfile-lint" + "lint": "npm-run-all --continue-on-error --parallel css-lint js-lint ts:type-check lockfile-lint" }, "keywords": [ "css", @@ -40,8 +40,8 @@ "bootstrap": "^5.0.1" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^4.23.0", - "@typescript-eslint/parser": "^4.23.0", + "@typescript-eslint/eslint-plugin": "^4.24.0", + "@typescript-eslint/parser": "^4.24.0", "autoprefixer": "^10.2.5", "browser-sync": "^2.26.14", "bundlewatch": "^0.3.2", @@ -60,6 +60,7 @@ "gulp-rename": "^2.0.0", "gulp-sass": "^4.1.0", "gulp-sourcemaps": "^3.0.0", + "gulp-stylelint": "^13.0.0", "gulp-wait": "0.0.2", "lockfile-lint": "^4.6.2", "npm-run-all": "^4.1.5",