Skip to content

Commit

Permalink
PEAA-822: bump dependencies to fix vulnerability issues.
Browse files Browse the repository at this point in the history
Also, upgrade eslint to latest version and fix code style to comply with new rules.
  • Loading branch information
aleks-elkin committed Dec 6, 2021
1 parent c0829e9 commit e7fe09e
Show file tree
Hide file tree
Showing 18 changed files with 6,301 additions and 6,116 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 5
"ecmaVersion": 5,
"requireConfigFile": false
},
"extends": "tradeshift",
"root": true,
Expand Down
22 changes: 5 additions & 17 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global process */
const path = require('path');
const { Locale } = require('@tradeshift/g11n-langneg');

Expand Down Expand Up @@ -452,20 +451,10 @@ module.exports = function(grunt) {
}
},

asciify: {
banner: {
text: 'Tradeshift UI',
options: {
font: 'graffiti',
log: true
}
}
},

// serve, watch, generate concurrently
concurrent: {
docs: ['connect', 'watch', 'exec:docs_grunt'],
nodocs: ['connect', 'watch', 'asciify:banner'],
nodocs: ['connect', 'watch'],
// Build for CDN
cdn_generate_js: {
tasks: generateJsConcurrent('cdn')
Expand Down Expand Up @@ -534,7 +523,7 @@ module.exports = function(grunt) {
}

function compileAndMinifyLess(target = 'cdn') {
let out = [
const out = [
'exec:compile_less_to_css' // less -> css
];
if (target === 'cdn') {
Expand All @@ -549,7 +538,7 @@ module.exports = function(grunt) {
}

function build(target = 'cdn') {
let out = [
const out = [
`clean:${target}`, // remove files
'browserify', // transpiles commonjs-based dependencies into files readable by browsers
'concat:locales', // bundle locale files (synchronously BEFORE moment.js)
Expand All @@ -572,7 +561,7 @@ module.exports = function(grunt) {
}

function sizeReport(target = 'cdn') {
let out = [];
const out = [];
if (target === 'cdn') {
out.push('size_report:cdn_gzip_vs_normal');
out.push(`size_report:cdn_loaded`);
Expand Down Expand Up @@ -722,8 +711,7 @@ module.exports = function(grunt) {
function getlocalesprocessor(codes) {
return (src, file) => {
const code = file.match(/ts-lang-(.*)\.js/)[1];
let locale;

let locale = '';
try {
locale = Locale.parseStrict(code);
} catch (e) {
Expand Down
12 changes: 1 addition & 11 deletions docs/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ module.exports = function(grunt) {

concurrent: {
localdev: {
tasks: ['connect', 'watch', 'asciify:banner'],
tasks: ['connect', 'watch'],
options: {
logConcurrentOutput: true
}
Expand Down Expand Up @@ -312,16 +312,6 @@ module.exports = function(grunt) {
differs: 'screenshots/diffs/'
}
}
},

asciify: {
banner: {
text: 'Tradeshift UI',
options: {
font: 'graffiti',
log: true
}
}
}
});

Expand Down
66 changes: 0 additions & 66 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"cheerio": "^1.0.0-rc.10",
"es6-arrow-function": "^0.6.6",
"grunt": "^1.3.0",
"grunt-asciify": "^0.2.2",
"grunt-concurrent": "^3.0.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^1.0.1",
Expand Down
1 change: 1 addition & 0 deletions docs/tasks/shooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ class Out {
/**
* File system stuff.
*/
// eslint-disable-next-line no-redeclare
class File {
/**
* Don't use spaces in filename.
Expand Down
Loading

0 comments on commit e7fe09e

Please sign in to comment.