2021-12-23 09:22:22 -05:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const build = require('@microsoft/sp-build-web');
|
|
|
|
|
|
|
|
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
|
|
|
|
|
|
|
|
var getTasks = build.rig.getTasks;
|
|
|
|
build.rig.getTasks = function () {
|
|
|
|
var result = getTasks.call(build.rig);
|
|
|
|
|
|
|
|
result.set('serve', result.get('serve-deprecated'));
|
|
|
|
|
|
|
|
return result;
|
|
|
|
};
|
|
|
|
|
2022-07-27 23:41:57 -04:00
|
|
|
// disable tslint
|
|
|
|
build.tslintCmd.enabled = false;
|
|
|
|
|
|
|
|
// add eslint
|
|
|
|
const eslint = require('gulp-eslint');
|
|
|
|
const eslintSubTask = build.subTask('eslint-subTask', function (gulp, buildOptions, done) {
|
|
|
|
return gulp.src(['src/**/*.{ts,tsx}'])
|
|
|
|
.pipe(eslint('./config/eslint.json'))
|
|
|
|
.pipe(eslint.format())
|
|
|
|
.pipe(eslint.failAfterError());
|
|
|
|
});
|
|
|
|
build.rig.addPreBuildTask(build.task('eslint', eslintSubTask));
|
|
|
|
|
2021-12-23 09:22:22 -05:00
|
|
|
build.initialize(require('gulp'));
|