mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
feature(package) rm jscs, jshint
This commit is contained in:
parent
54a72bd714
commit
dfee961458
7 changed files with 14 additions and 72 deletions
|
|
@ -2,7 +2,6 @@
|
|||
"env": {
|
||||
"es6": true,
|
||||
"node": true,
|
||||
"browser": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
|
|
@ -11,6 +10,7 @@
|
|||
"rules": {
|
||||
"indent": ["error", 4],
|
||||
"semi": "error",
|
||||
"no-console": 0,
|
||||
"no-use-before-define": ["error", "nofunc"]
|
||||
},
|
||||
"extends": [
|
||||
|
|
|
|||
|
|
@ -1,20 +1,12 @@
|
|||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"rules": {
|
||||
"indent": ["error", 4],
|
||||
"semi": "error",
|
||||
"no-use-before-define": ["error", "nofunc"],
|
||||
'no-process-exit': 0
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
".eslintrc",
|
||||
"plugin:node/recommended"
|
||||
],
|
||||
"plugins": [
|
||||
|
|
|
|||
20
.jscsrc
20
.jscsrc
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"preset": "crockford",
|
||||
"requireSpaceAfterKeywords": false,
|
||||
"requireCapitalizedConstructors": false,
|
||||
"requireMultipleVarDecl": false,
|
||||
"disallowTrailingWhitespace": "ignoreEmptyLines",
|
||||
"disallowTrailingComma": false,
|
||||
"disallowDanglingUnderscores": false,
|
||||
"validateIndentation": false,
|
||||
"requireCurlyBraces": false,
|
||||
"requireVarDeclFirst": false,
|
||||
"requireSpacesInAnonymousFunctionExpression": {
|
||||
"beforeOpeningCurlyBrace": true
|
||||
},
|
||||
"excludeFiles": [
|
||||
"node_modules/**",
|
||||
"modules/**",
|
||||
"bower_components/**"
|
||||
]
|
||||
}
|
||||
24
.jshintrc
24
.jshintrc
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"esversion": 6,
|
||||
"unused" : true,
|
||||
"bitwise" : false,
|
||||
"browser" : true,
|
||||
"devel" : true,
|
||||
"eqeqeq" : true,
|
||||
"jquery" : false,
|
||||
"newcap" : false,
|
||||
"noarg" : true,
|
||||
"node" : true,
|
||||
"noempty" : true,
|
||||
"nonew" : true,
|
||||
"strict" : true,
|
||||
"undef" : true,
|
||||
"evil" : true,
|
||||
"expr" : true,
|
||||
"quotmark": "single",
|
||||
"validthis": true,
|
||||
"-W024": true,
|
||||
"-W120": true,
|
||||
"-W079": true,
|
||||
"-W138": true
|
||||
}
|
||||
|
|
@ -5,9 +5,10 @@ node_js:
|
|||
- 6
|
||||
|
||||
script:
|
||||
- npm run codestyle
|
||||
- npm run lint
|
||||
- npm run build
|
||||
- npm run coverage && npm run report
|
||||
- npm run coverage
|
||||
- npm run report
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
const exec = require('execon');
|
||||
|
||||
const Scope = typeof window !== 'undefined' ? window : global;
|
||||
|
||||
module.exports.getStrBigFirst = getStrBigFirst;
|
||||
module.exports.kebabToCamelCase = kebabToCamelCase;
|
||||
|
||||
|
|
@ -97,7 +95,7 @@ module.exports.findObjByNameInArr = (array, name) => {
|
|||
* @param name
|
||||
*/
|
||||
module.exports.time = (name) => {
|
||||
exec.ifExist(Scope.console, 'time', [name]);
|
||||
exec.ifExist(console, 'time', [name]);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -105,7 +103,7 @@ module.exports.time = (name) => {
|
|||
* @param name
|
||||
*/
|
||||
module.exports.timeEnd = (name) => {
|
||||
exec.ifExist(Scope.console, 'timeEnd', [name]);
|
||||
exec.ifExist(console, 'timeEnd', [name]);
|
||||
};
|
||||
|
||||
function getStrBigFirst(str) {
|
||||
|
|
|
|||
19
package.json
19
package.json
|
|
@ -40,7 +40,7 @@
|
|||
},
|
||||
"config": {
|
||||
"dirs": "bin/cloudcmd.js common server",
|
||||
"dirs_dev": "test bin/release.js webpack.config.js"
|
||||
"dirs_test": "test bin/release.js webpack.config.js"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node bin/cloudcmd.js",
|
||||
|
|
@ -48,21 +48,18 @@
|
|||
"build:start": "redrun build:client start",
|
||||
"build:start:dev": "redrun build:client:dev start:dev",
|
||||
"security": "nsp check",
|
||||
"codestyle": "redrun lint spell",
|
||||
"lint": "redrun lint:*",
|
||||
"lintjs": "redrun lint:client lint:server lint:test",
|
||||
"lint:server": "eslint -c .eslintrc.server $npm_package_config_dirs",
|
||||
"lint:test": "eslint $npm_package_config_dirs_test",
|
||||
"lint:client": "eslint --env browser client",
|
||||
"lint:css": "stylelint css/*.css",
|
||||
"lint:js": "redrun lint:js:*",
|
||||
"lint:server": "eslint --rule 'no-console:0' -c .eslintrc.server $npm_package_config_dirs",
|
||||
"lint:dev": "eslint --rule 'no-console:0' $npm_package_config_dirs_dev",
|
||||
"lint:js:jshint": "jshint bin client server",
|
||||
"lint:js:jscs": "jscs --esnext $npm_package_config_dirs",
|
||||
"lint:client": "eslint --rule 'no-console:0' --env browser client",
|
||||
"lint:md": "yaspeller .",
|
||||
"fix:lint:client": "redrun lint:client -- --fix",
|
||||
"fix:lint:dev": "redrun lint:dev -- --fix",
|
||||
"fix:lint:test": "redrun lint:test -- --fix",
|
||||
"fix:lint:server": "redrun lint:server -- --fix",
|
||||
"test": "tape 'test/**/*.js'",
|
||||
"test:client": "tape 'test/client/**/*.js'",
|
||||
"spell": "yaspeller .",
|
||||
"wisdom": "redrun build",
|
||||
"wisdom:type": "bin/release.js",
|
||||
"docker:pull:node": "docker pull node",
|
||||
|
|
@ -178,8 +175,6 @@
|
|||
"html-looks-like": "^1.0.2",
|
||||
"html-webpack-exclude-assets-plugin": "^0.0.5",
|
||||
"html-webpack-plugin": "^2.29.0",
|
||||
"jscs": "^3.0.1",
|
||||
"jshint": "^2.8.0",
|
||||
"limier": "^1.0.1",
|
||||
"minor": "^1.2.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue