Skip to content

Commit

Permalink
chore: update eslintignore for iceworks (alibaba#1813)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenbin92 authored and imsobear committed Apr 15, 2019
1 parent 225d5bc commit 298be2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
6 changes: 2 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,5 @@ packages/ice-skin-loader
packages/ice-template-builder
packages/iceworks-scaffolder

# 忽略 tools 部分包
# tools/ice-devtools
# tools/ice-scripts
tools/iceworks
# tools
tools/iceworks/renderer/public/
9 changes: 4 additions & 5 deletions tools/iceworks/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint camelcase:0, array-callback-return:0, space-before-function-paren:0 */
const cleancss = require('gulp-clean-css');
const co = require('co');
const es = require('event-stream');
Expand All @@ -18,9 +19,7 @@ const rp = require('request-promise');

const colors = gutil.colors;
const isMac = process.platform === 'darwin';
// eslint-disable-next-line
const isWin32_x64 = process.platform === 'win32' && process.arch === 'x64';
// eslint-disable-next-line
const isLinux_x64 = process.platform === 'linux' && process.arch === 'x64';

const appPkg = require('./app/package.json');
Expand Down Expand Up @@ -142,7 +141,7 @@ async function getUpload2oss() {

return co(iceworksStore.put(paths.join('/'), file))
.then((object = {}) => {
if (object.res && object.res.status == 200) {
if (object.res && object.res.status === 200) {
gutil.log(colors.green('上传成功'), object.url);
return 0;
}
Expand Down Expand Up @@ -258,7 +257,7 @@ gulp.task('dist:mac', (done) => {
}
);
ls.on('close', (code) => {
if (code == 0) {
if (code === 0) {
gutil.log(colors.green('dmg 打包完成'));
} else {
gutil.log(colors.red('dmg 打包失败'));
Expand All @@ -272,7 +271,7 @@ gulp.task('electron-rebuild', (done) => {
stdio: 'inherit',
});
ls.on('close', (code) => {
if (code == 0) {
if (code === 0) {
gutil.log(colors.green('rebuild 打包完成'));
} else {
gutil.log(colors.red('rebuild 打包失败'));
Expand Down
13 changes: 7 additions & 6 deletions tools/iceworks/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint indent:0 */
const autoprefixer = require('autoprefixer');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
Expand All @@ -11,7 +12,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const outputDir = 'out/renderer';

// npm scripts target
const isDev = process.env.NODE_ENV == 'development';
const isDev = process.env.NODE_ENV === 'development';
let cssLoaderBasic = [];

if (isDev) {
Expand Down Expand Up @@ -208,35 +209,35 @@ const homeConfig = merge({}, commonConfig, {
}),
new HtmlWebpackPlugin({
title: '',
excludeChunks: Object.keys(etnry).filter((n) => n != 'index'),
excludeChunks: Object.keys(etnry).filter((n) => n !== 'index'),
NODE_ENV: process.env.NODE_ENV,
filename: 'index.html',
template: 'renderer/public/index.html',
}),
new HtmlWebpackPlugin({
title: '',
excludeChunks: Object.keys(etnry).filter((n) => n != 'status'),
excludeChunks: Object.keys(etnry).filter((n) => n !== 'status'),
NODE_ENV: process.env.NODE_ENV,
filename: 'status.html',
template: 'renderer/public/view.html',
}),
new HtmlWebpackPlugin({
title: '',
excludeChunks: Object.keys(etnry).filter((n) => n != 'updater'),
excludeChunks: Object.keys(etnry).filter((n) => n !== 'updater'),
NODE_ENV: process.env.NODE_ENV,
filename: 'updater.html',
template: 'renderer/public/view.html',
}),
new HtmlWebpackPlugin({
title: '',
excludeChunks: Object.keys(etnry).filter((n) => n != 'about'),
excludeChunks: Object.keys(etnry).filter((n) => n !== 'about'),
NODE_ENV: process.env.NODE_ENV,
filename: 'about.html',
template: 'renderer/public/view.html',
}),
new HtmlWebpackPlugin({
title: '',
excludeChunks: Object.keys(etnry).filter((n) => n != 'preview'),
excludeChunks: Object.keys(etnry).filter((n) => n !== 'preview'),
NODE_ENV: process.env.NODE_ENV,
filename: 'preview.html',
template: 'renderer/public/view.html',
Expand Down

0 comments on commit 298be2b

Please sign in to comment.