Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from ice-lab/fix-lint
Browse files Browse the repository at this point in the history
chore: fix lint
  • Loading branch information
imsobear committed Jul 13, 2019
2 parents 5d78780 + 2e68796 commit 23d4539
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ coverage/
**/*-min.js
**/*.min.js

templates

# 忽略 packages 部分包

# 有较多的模板(ejs)语法
packages/ice-react-material-template/template
packages/ice-vue-material-template/template
packages/ice-angular-material-template/template
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ const { eslint, deepmerge } = require('@ice/spec');

module.exports = deepmerge(eslint, {
rules: {
'global-require': 1,
},
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"private": true,
"scripts": {
"lint": "eslint --cache --ext .js,.jsx ./",
"ci": "npm run ci"
"ci": "npm run lint"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-push": "npm run lint"
}
},
"dependencies": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
'./src/**/*.e2e-spec.ts',
],
capabilities: {
'browserName': 'chrome'
'browserName': 'chrome',
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
print() {},
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
project: require('path').join(__dirname, './tsconfig.e2e.json'),
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ module.exports = function (config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage/ng-t'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
port: 9876,
Expand All @@ -27,6 +27,6 @@ module.exports = function (config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
restartOnFileChange: true,
});
};
2 changes: 1 addition & 1 deletion packages/ice-devtools/lib/clear.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const chalk = require('chalk');
const pkg = require('../utils/pkg-json');
const token = require('../utils/token');
const chalk = require('chalk');

module.exports = async function clear(cwd) {
const pkgJSON = pkg.getPkgJSON(cwd);
Expand Down
6 changes: 3 additions & 3 deletions packages/ice-devtools/utils/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ const ora = require('ora');
const existsSync = require('fs').existsSync;
const rimraf = require('rimraf');
const mkdirp = require('mkdirp');

const logger = require('./logger');
const getPkgJSON = require('./pkg-json').getPkgJSON;
const {
getLatestVersion,
getNpmRegistry,
} = require('ice-npm-utils');

const logger = require('./logger');
const getPkgJSON = require('./pkg-json').getPkgJSON;

const Parser = tar.Parse;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
presets: [[
'@vue/app',
{ useBuiltIns: 'entry' }
]]
{ useBuiltIns: 'entry' },
]],
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const headerMenuConfig = [
name: '关于',
path: '/about',
icon: 'about',
}
},
];

const asideMenuConfig = [];
Expand Down

0 comments on commit 23d4539

Please sign in to comment.