Skip to content

Commit

Permalink
add eslint check before build
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed May 11, 2020
1 parent 43a16b6 commit 12df586
Show file tree
Hide file tree
Showing 143 changed files with 2,249 additions and 2,270 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source/m4q
source/template
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"es6": false
},
"extends": "eslint:recommended",
"globals": {
"$": "readonly",
"M4Q": "readonly",
"m4q": "readonly"
},
"parserOptions": {
"ecmaVersion": 5
},
"rules": {
}
}
13 changes: 11 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ module.exports = function(grunt) {

tasks = [
'concurrent:clean',
'concurrent:eslint',
'concurrent:compile_less',
'concurrent:postcss',
'concurrent:concat'];

if (develop) {
if (!develop) {
tasks.push('concurrent:remove_log');
}

Expand Down Expand Up @@ -68,6 +69,10 @@ module.exports = function(grunt) {
build: ['build/js', 'build/css', 'build/mif']
},

eslint: {
target: ['source/**/*.js']
},

concat: {
js: {
options: {
Expand Down Expand Up @@ -119,7 +124,10 @@ module.exports = function(grunt) {
uglify: {
options: {
banner: '<%= copyright %>',
stripBanners: false,
stripBanners: develop ? false : {
block: true,
line: true
},
sourceMap: true,
preserveComments: false
},
Expand Down Expand Up @@ -254,6 +262,7 @@ module.exports = function(grunt) {
clean: ['clean'],
compile_less: ['less:src', 'less:schemes'],
postcss: ['postcss'],
eslint: ['eslint'],
concat: ['concat:js', 'concat:css'],
remove_log: develop ? [] : ['removelogging'],
min: ['uglify', 'cssmin:src', 'cssmin:schemes'],
Expand Down
6 changes: 1 addition & 5 deletions build/css/metro-all.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:39
* Built at 11/05/2020 20:54:16
* Licensed under MIT
*/
*,
Expand Down Expand Up @@ -8045,7 +8045,6 @@ input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 1000px white inset;
background-color: #ffffff !important;
-webkit-transition: background-color 5000s ease-in-out 0s;
-o-transition: background-color 5000s ease-in-out 0s;
transition: background-color 5000s ease-in-out 0s;
}
::-webkit-input-placeholder {
Expand Down Expand Up @@ -29178,7 +29177,6 @@ input.input-small:-ms-input-placeholder {
opacity: 1;
color: #bebebe;
-webkit-transition: linear all 0.3s;
-o-transition: linear all 0.3s;
transition: linear all 0.3s;
}
.input-material .helper-button {
Expand Down Expand Up @@ -29240,7 +29238,6 @@ input.input-small:-ms-input-placeholder {
-webkit-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: linear all 0.2s;
-o-transition: linear all 0.2s;
transition: linear all 0.2s;
}
.input-material input:focus ~ .informer {
Expand All @@ -29265,7 +29262,6 @@ input.input-small:-ms-input-placeholder {
.input-material input:-webkit-autofill:focus,
.input-material input:-webkit-autofill:active {
-webkit-transition: background-color 5000s ease-in-out 0s;
-o-transition: background-color 5000s ease-in-out 0s;
transition: background-color 5000s ease-in-out 0s;
-webkit-text-fill-color: #fff !important;
}
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro-all.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/css/metro-animations.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.ani-spin,
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro-colors.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.bg-transparent {
Expand Down
3 changes: 1 addition & 2 deletions build/css/metro-common.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.button.primary,
Expand Down Expand Up @@ -7818,7 +7818,6 @@ input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 1000px white inset;
background-color: #ffffff !important;
-webkit-transition: background-color 5000s ease-in-out 0s;
-o-transition: background-color 5000s ease-in-out 0s;
transition: background-color 5000s ease-in-out 0s;
}
::-webkit-input-placeholder {
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro-common.min.css

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions build/css/metro-components.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.accordion {
Expand Down Expand Up @@ -7165,7 +7165,6 @@ input.input-small:-ms-input-placeholder {
opacity: 1;
color: #bebebe;
-webkit-transition: linear all 0.3s;
-o-transition: linear all 0.3s;
transition: linear all 0.3s;
}
.input-material .helper-button {
Expand Down Expand Up @@ -7227,7 +7226,6 @@ input.input-small:-ms-input-placeholder {
-webkit-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: linear all 0.2s;
-o-transition: linear all 0.2s;
transition: linear all 0.2s;
}
.input-material input:focus ~ .informer {
Expand All @@ -7252,7 +7250,6 @@ input.input-small:-ms-input-placeholder {
.input-material input:-webkit-autofill:focus,
.input-material input:-webkit-autofill:active {
-webkit-transition: background-color 5000s ease-in-out 0s;
-o-transition: background-color 5000s ease-in-out 0s;
transition: background-color 5000s ease-in-out 0s;
-webkit-text-fill-color: #fff !important;
}
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro-components.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/css/metro-icons.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
@font-face {
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro-reset.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
*,
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro-rtl.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.accordion.rtl.material > .frame > .heading,
Expand Down
6 changes: 1 addition & 5 deletions build/css/metro.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
*,
Expand Down Expand Up @@ -8045,7 +8045,6 @@ input:-webkit-autofill:active {
-webkit-box-shadow: 0 0 0 1000px white inset;
background-color: #ffffff !important;
-webkit-transition: background-color 5000s ease-in-out 0s;
-o-transition: background-color 5000s ease-in-out 0s;
transition: background-color 5000s ease-in-out 0s;
}
::-webkit-input-placeholder {
Expand Down Expand Up @@ -29178,7 +29177,6 @@ input.input-small:-ms-input-placeholder {
opacity: 1;
color: #bebebe;
-webkit-transition: linear all 0.3s;
-o-transition: linear all 0.3s;
transition: linear all 0.3s;
}
.input-material .helper-button {
Expand Down Expand Up @@ -29240,7 +29238,6 @@ input.input-small:-ms-input-placeholder {
-webkit-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: linear all 0.2s;
-o-transition: linear all 0.2s;
transition: linear all 0.2s;
}
.input-material input:focus ~ .informer {
Expand All @@ -29265,7 +29262,6 @@ input.input-small:-ms-input-placeholder {
.input-material input:-webkit-autofill:focus,
.input-material input:-webkit-autofill:active {
-webkit-transition: background-color 5000s ease-in-out 0s;
-o-transition: background-color 5000s ease-in-out 0s;
transition: background-color 5000s ease-in-out 0s;
-webkit-text-fill-color: #fff !important;
}
Expand Down
2 changes: 1 addition & 1 deletion build/css/metro.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/css/schemes/darcula.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.bg-scheme {
Expand Down
2 changes: 1 addition & 1 deletion build/css/schemes/red-alert.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.bg-scheme {
Expand Down
2 changes: 1 addition & 1 deletion build/css/schemes/red-dark.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.bg-scheme {
Expand Down
2 changes: 1 addition & 1 deletion build/css/schemes/red-mirohost.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.bg-scheme {
Expand Down
2 changes: 1 addition & 1 deletion build/css/schemes/sky-net.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Metro 4 Components Library v4.3.7 (https://metroui.org.ua)
* Copyright 2012-2020 Sergey Pimenov
* Built at 10/05/2020 23:09:28
* Built at 11/05/2020 20:54:06
* Licensed under MIT
*/
.bg-scheme {
Expand Down
Loading

0 comments on commit 12df586

Please sign in to comment.