Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/scripts/holiday_closure_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const dateNow = new Date();

const formatDate = (openingDay: NextOpeningDate) =>
openingDay.open
? new Date(openingDay.open).toUTCString().slice(0, 11) + '\n'
? `${new Date(openingDay.open).toUTCString().slice(0, 11)}\n`
: '';

const compareDates = (library: NextOpeningDate, deepstore: NextOpeningDate) => {
Expand Down
2 changes: 1 addition & 1 deletion common/services/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const formatter = format.combine(
format.printf(({ level, message, timestamp, stack }) => {
let log = `${timestamp} ${level.toUpperCase()} - ${message}`;
if (stack) {
log += '\n' + stack;
log += `\n${stack}`;
}
return log;
})
Expand Down
15 changes: 11 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const eslint = require('@eslint/js');
const eslintConfigPrettier = require('eslint-config-prettier');
const eslintPluginImport = require('eslint-plugin-import');
const importXPlugin = require('eslint-plugin-import-x');
const eslintPluginJest = require('eslint-plugin-jest');
const eslintPluginPrettier = require('eslint-plugin-prettier');
const globals = require('globals');
const tseslint = require('typescript-eslint');

const sharedRules = {
'eol-last': 'error',
'import/order': [
'import-x/order': [
'warn',
{
groups: [
Expand Down Expand Up @@ -42,6 +42,9 @@ const sharedRules = {
"JSXElement.children > [expression.callee.property.name='stringify']",
],
'no-return-assign': 'off',
'object-shorthand': ['warn', 'always'],
'prefer-arrow-callback': 'warn',
'prefer-template': 'warn',
'prettier/prettier': 'error',
'sort-imports': [
'error',
Expand Down Expand Up @@ -89,7 +92,7 @@ module.exports = [
},
},
plugins: {
import: eslintPluginImport,
'import-x': importXPlugin,
jest: eslintPluginJest,
prettier: eslintPluginPrettier,
},
Expand Down Expand Up @@ -119,7 +122,7 @@ module.exports = [
},
plugins: {
'@typescript-eslint': tseslint.plugin,
import: eslintPluginImport,
'import-x': importXPlugin,
jest: eslintPluginJest,
prettier: eslintPluginPrettier,
},
Expand All @@ -135,6 +138,10 @@ module.exports = [
'error',
{ ignoreRestSiblings: true },
],
'@typescript-eslint/no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
'jest/no-standalone-expect': [
'error',
{ additionalTestBlockFunctions: ['each.test'] },
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
},
"devDependencies": {
"@babel/eslint-parser": "^8.0.1",
"@eslint/js": "^9.39.1",
"@eslint/js": "^10.0.1",
"@tsconfig/node24": "24.0.4",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"eslint": "^9.39.1",
"eslint": "^10.6.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-jest": "^29.16.0",
"eslint-plugin-jest-playwright": "^0.9.0",
"eslint-plugin-prettier": "^5.5.6",
Expand Down
2 changes: 1 addition & 1 deletion pipeline/test/update-prismic-snapshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const addCommentsToUpdateScript = async (docs: PrismicDocument[]) => {
const indent = stringArrayItemLine.groups?.indent;
const uncommentedLine = `${indent}"${id}",`;
if (id && comments.has(id)) {
await writeLine(uncommentedLine + ` // ${comments.get(id)}`);
await writeLine(`${uncommentedLine} // ${comments.get(id)}`);
continue;
}
}
Expand Down
Loading