Add eslint & stylelint tests (fix a few things) and move dependencies to dev

This commit is contained in:
Thomas Citharel 2016-10-04 12:14:28 +02:00
parent f440e28281
commit 9f7d154e34
No known key found for this signature in database
GPG Key ID: 5780691F5FE48FB5
14 changed files with 96 additions and 82 deletions

View File

@ -95,4 +95,4 @@ script:
- if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then phpunit -v ; fi;
- if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
- if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;
- if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt; fi;
- if [[ $ASSETS = build ]]; then ./node_modules/grunt-cli/bin/grunt tests; fi;

View File

@ -198,6 +198,13 @@ module.exports = function (grunt) {
src: ['./<%= releaseDir %>/*'],
}
},
eslint: {
target: ['<%= appDir %>/themes/material/js/init.js', '<%= appDir %>/themes/baggy/js/init.js']
},
stylelint: {
target: ['<%= appDir %>/themes/material/css/*.css', '<%= appDir %>/themes/baggy/css/*.css']
}
});
grunt.registerTask(
@ -223,4 +230,10 @@ module.exports = function (grunt) {
'Compiles the stylesheets.',
['clean:css', 'concat:cssMaterial', 'concat:cssBaggy', 'postcss']
);
grunt.registerTask(
'tests',
'Test css and js style conformity',
['eslint', 'stylelint']
)
};

View File

@ -907,7 +907,8 @@ a.add-to-wallabag-link-after::after {
.icon-image {
background-size: 16px 16px;
background: no-repeat center;
background-repeat: no-repeat;
background-position: center;
padding-right: 1em !important;
padding-left: 1em !important;
}

View File

@ -3,7 +3,6 @@ require('jquery.cookie');
require('jquery-ui-browserify');
const annotator = require('annotator');
import { savePercent, retrievePercent } from '../../_global/js/tools.js';
import { split, extractLast } from './autoCompleteTags.js';
import { toggleSaveLinkForm } from './uiTools.js';

View File

@ -87,8 +87,9 @@
}
.icon-image {
background-size: 16px 16px;
background: no-repeat center;
background-size: 16px;
background-repeat: no-repeat;
background-position: center;
padding-right: 1em !important;
padding-left: 1em !important;
}
@ -124,7 +125,6 @@
background-image: url("../../_global/img/icons/shaarli.png");
}
body {
display: flex;
min-height: 100vh;
@ -464,8 +464,9 @@ main ul.row {
color: #fff;
}
.quickstart .card .card-action a, .quickstart .card .card-action a:hover {
color: #fff !important;
.quickstart .card .card-action a,
.quickstart .card .card-action a:hover {
color: #fff !important;
}
.settings .div_tabs {

View File

@ -7,42 +7,6 @@
"directories": {
"doc": "docs"
},
"dependencies": {
"annotator": "git://github.com/wallabag/annotator.git#0f076c7d371ed25eb0793346f46982d90f2c4c85",
"autoprefixer": "^6.3.6",
"babel-preset-es2015": "^6.14.0",
"babelify": "^7.3.0",
"browserify": "^13.0.0",
"browserify-shim": "^3.8.12",
"cssnano": "^3.5.2",
"es6-promise": "^3.2.1",
"grunt": ">=0.4.0",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-symlink": "^1.0.0",
"grunt-contrib-uglify": "^1.0.0",
"grunt-postcss": "^0.8.0",
"hammerjs": "^2.0.6",
"icomoon-free-npm": "0.0.0",
"jquery": "^2.2.4",
"jquery-ui-browserify": "^1.11.0-pre-seelio",
"jquery.cookie": "^1.4.1",
"jquery.tinydot": "^0.2.1",
"load-grunt-tasks": "^3.4.1",
"material-design-icons-iconfont": "^3.0.0",
"materialize-css": "0.97.5",
"npm": "^3.8.3",
"pickadate": "^3.5.6",
"pixrem": "^3.0.0",
"postcss-cssnext": "^2.5.1",
"prismjs": "^1.4.1",
"ptsans-npm-webfont": "0.0.4",
"roboto-fontface": "^0.6.0",
"through": "^2.3.8"
},
"engines": {
"node": ">0.12"
},
@ -93,10 +57,46 @@
"url": "https://github.com/wallabag/wallabag/issues"
},
"devDependencies": {
"annotator": "git://github.com/wallabag/annotator.git#0f076c7d371ed25eb0793346f46982d90f2c4c85",
"autoprefixer": "^6.3.6",
"babel-eslint": "^6.1.2",
"babel-preset-es2015": "^6.14.0",
"babelify": "^7.3.0",
"browserify": "^13.0.0",
"browserify-shim": "^3.8.12",
"cssnano": "^3.5.2",
"es6-promise": "^3.2.1",
"eslint": "^2.13.1",
"eslint-config-airbnb": "^9.0.1",
"grunt": ">=0.4.0",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-symlink": "^1.0.0",
"grunt-contrib-uglify": "^1.0.0",
"grunt-eslint": "^19.0.0",
"grunt-postcss": "^0.8.0",
"grunt-stylelint": "^0.6.0",
"hammerjs": "^2.0.6",
"icomoon-free-npm": "0.0.0",
"jquery": "^2.2.4",
"jquery-ui-browserify": "^1.11.0-pre-seelio",
"jquery.cookie": "^1.4.1",
"jquery.tinydot": "^0.2.1",
"load-grunt-tasks": "^3.4.1",
"material-design-icons-iconfont": "^3.0.0",
"materialize-css": "0.97.5",
"npm": "^3.8.3",
"pickadate": "^3.5.6",
"pixrem": "^3.0.0",
"postcss-cssnext": "^2.5.1",
"prismjs": "^1.4.1",
"ptsans-npm-webfont": "0.0.4",
"roboto-fontface": "^0.6.0",
"stylelint": "^7.3.1",
"stylelint-config-standard": "^13.0.2"
"stylelint-config-standard": "^13.0.2",
"through": "^2.3.8"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long