Commit 8a573a2c authored by Romain OZDEN's avatar Romain OZDEN

Initialisation du projet

parent 0eadebd0
'use strict';
/*
* Lancement dans un terminal dédié (laisser le tourner indéfiniment) :
* node_modules/.bin/gulp
*
* la tâche 'lint' vérifie la syntaxe des fichiers js au lancement et à chaque
* modification d'un fichier.
*
*/
var gulp = require('gulp'),
cache = require('gulp-cached'),
eslint = require('gulp-eslint');
var inputPaths = ['./**/*.js', '!./node_modules/**'];
gulp.task('lint', function () {
return gulp
.src(inputPaths)
.pipe(cache('lint'))
.pipe(eslint({
'extends': 'eslint:recommended',
'envs': [
'es6',
'node',
],
'parserOptions': {'ecmaVersion': 2018},
// documentation des règles eslint :
// http://eslint.org/docs/rules
'rules': {
'no-warning-comments': ['warn', {terms: ['todo', 'fixme', 'xxx'], location: 'anywhere'}],
'no-console': 'off',
'strict': ['error', 'global'],
'indent': ['error', 4, {'SwitchCase': 1}],
'brace-style': ['error', 'stroustrup'],
'semi': ['error', 'always'],
'no-extra-semi': 'error',
'semi-spacing': ['error', {'before': false, 'after': true}],
'keyword-spacing': ['error', {'before': true, 'after': true}],
'no-trailing-spaces': 'error',
'no-lonely-if': 'error',
'key-spacing': 'error',
'comma-spacing': 'error',
'comma-dangle': ['error', 'always-multiline'],
'space-infix-ops': ['error', {'int32Hint': true}],
'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': 'error',
'space-before-function-paren': ['error', {'anonymous': 'always', 'named': 'never'}],
'wrap-iife': ['error', 'outside'],
'no-implied-eval': 'error',
'quotes': ['error', 'single', {'avoidEscape': true}],
'vars-on-top': 'error',
/*'no-undef': 'error',*/
'no-unused-vars': 'error',
'eqeqeq': 'error',
'no-plusplus': 'error',
'no-constant-condition': ['error', {'checkLoops': false}],
'no-eval': 'error',
'no-extra-bind': 'error',
},
}))
.pipe(eslint.format());
});
gulp.task('watch', function (done) {
gulp.watch(inputPaths, gulp.series('lint'));
done();
});
gulp.task('default', gulp.series('watch', 'lint'));
// vim:set et sw=4:
This diff is collapsed.
{
"name": "projetweb",
"version": "1.0.0",
"description": "A great projet for saving the annales",
"main": "serveur.js",
"scripts": {
"test": "node ./node_modules/gulp/bin/gulp.js",
"start": "node ./node_modules/nodemon/bin/nodemon.js --exec node app.js"
},
"repository": {
"type": "git",
"url": "https://gitlab.univ-nantes.fr/E19B438X/projet-de-web.git"
},
"keywords": [
"projet"
],
"author": "DESGRANGES-OZDEN-WILLEMOT",
"license": "ISC",
"dependencies": {
"alasql": "^0.6.1",
"express": "^4.17.1",
"gulp": "^4.0.1",
"gulp-cached": "^1.1.1",
"gulp-eslint": "^6.0.0",
"gulp-watch": "^5.0.1",
"nodemon": "^2.0.4"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment