autofix all violations

This commit is contained in:
spalger 2019-12-13 15:44:04 -07:00
parent a3553c924d
commit 8e9a8a84dc
4245 changed files with 87774 additions and 82935 deletions

View file

@ -21,28 +21,38 @@ import fs from 'fs';
import path from 'path';
export default function checkPlugins(grunt) {
grunt.registerTask('checkPlugins', 'Checks for plugins which may disrupt tests', function checkPlugins() {
const done = this.async();
const pluginsDir = path.resolve('./plugins/');
grunt.registerTask(
'checkPlugins',
'Checks for plugins which may disrupt tests',
function checkPlugins() {
const done = this.async();
const pluginsDir = path.resolve('./plugins/');
fs.readdir(pluginsDir, (err, files) => {
if (!files) {
return done();
}
fs.readdir(pluginsDir, (err, files) => {
if (!files) {
return done();
}
const plugins = files.filter(file => {
return fs.statSync(path.join(pluginsDir, file)).isDirectory();
});
if (plugins.length) {
grunt.log.error('===================================================================================================');
plugins.forEach(plugin => {
grunt.log.error(`The ${plugin} plugin may disrupt the test process. Consider removing it and re-running your tests.`);
const plugins = files.filter(file => {
return fs.statSync(path.join(pluginsDir, file)).isDirectory();
});
grunt.log.error('===================================================================================================');
}
done();
});
});
if (plugins.length) {
grunt.log.error(
'==================================================================================================='
);
plugins.forEach(plugin => {
grunt.log.error(
`The ${plugin} plugin may disrupt the test process. Consider removing it and re-running your tests.`
);
});
grunt.log.error(
'==================================================================================================='
);
}
done();
});
}
);
}