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
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

* Redirects to URLs containing accent marks and other non-ascii characters now behave as expected with Astro. Pre-encoding the URLs exactly the way `res.redirect` would before passing them to Astro prevents an error in Astro and allows the redirect to succeed.
* Removes the non-functional `uniqueUsername` route from the `user` module
* Updated dependencies to address deprecation warnings.

## 4.21.0 (2025-09-03)

Expand Down
13 changes: 13 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const apostrophe = require('eslint-config-apostrophe').default;
const { defineConfig, globalIgnores } = require('eslint/config');

module.exports = defineConfig([
globalIgnores([
'**/vendor/**/*.js',
'**/blueimp/**/*.js',
'test/public',
'test/apos-build',
'coverage'
]),
apostrophe
]);
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ async function apostrophe(options, telemetry, rootSpan) {
if (self.argv[`ignore-${name}`]) {
return;
}
/* eslint-disable-next-line no-console */

console.warn(message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/moog-require.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports = async function(options) {
);
projectLevelDefinition = defaultProjectLevelDefinition;
if (Object.keys(projectLevelDefinition).length === 0) {
/* eslint-disable-next-line no-console */

console.warn(`⚠️ The file ${projectLevelPath}\ndoes not export anything, did you misspell or forget module.exports?\n`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/@apostrophecms/area/ui/apos/apps/AposAreas.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable vue/one-component-per-file */

import createApp from 'Modules/@apostrophecms/ui/lib/vue';

export default function() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Direct use of console is appropriate in tasks. -Tom
/* eslint-disable no-console */

const fs = require('fs');
const sep = require('path').sep;
Expand Down
1 change: 0 additions & 1 deletion modules/@apostrophecms/attachment/lib/tasks/rescale.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Direct use of console is appropriate in tasks. -Tom
/* eslint-disable no-console */

const _ = require('lodash');
const fs = require('fs');
Expand Down
6 changes: 3 additions & 3 deletions modules/@apostrophecms/doc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ module.exports = {
//
// - Set value of a meta property of a field inside of an array field
// type:
// eslint-disable-next-line max-len

// `apos.doc.setMeta(doc, 'my-module', arrayItemObject, 'city',
// 'myMetaKey', 'myMetaValue');`
//
Expand All @@ -1045,10 +1045,10 @@ module.exports = {
//
// - Dots in the `key` are treated as part of the key, dots in
// `pathComponents` are treated as dot-path and are not altered:
// eslint-disable-next-line max-len

// `apos.doc.setMeta(doc, 'my-module', 'address', 'city.name',
// 'myMetaKey.with.dots', 'myMetaValue');`
// eslint-disable-next-line max-len

// will set
// `doc.aposMeta.address.aposMeta.city.name['my-module:myMetaKey.with.dots']:
// 'myMetaValue'`.
Expand Down
2 changes: 1 addition & 1 deletion modules/@apostrophecms/log/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
// Example:
// ```sh
// # same as the `filter` example above
// eslint-disable-next-line max-len

// export
// APOS_FILTER_LOGS='*:severity:warn,error;@apostrophecms/login:events:incorrect-username,
// incorrect-password'
Expand Down
2 changes: 1 addition & 1 deletion modules/@apostrophecms/module/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ module.exports = {
} catch (e) {
// We can't afford to throw here, it would hang the response.
e.message = 'Structured logging error: ' + e.message;
// eslint-disable-next-line no-console

console.error(e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/@apostrophecms/schema/ui/apos/logic/AposSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default {

conditionalFields: {
handler(newVal, oldVal) {
// eslint-disable-next-line no-labels

for (const [ conditionType, conditions ] of Object.entries(oldVal)) {
for (const [ field, value ] of Object.entries(conditions)) {
if (
Expand Down
2 changes: 0 additions & 2 deletions modules/@apostrophecms/task/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
// Direct use of `console` makes sense here because we're implementing an
// interaction at the CLI.

/* eslint-disable no-console */

const _ = require('lodash');
const { stripIndent } = require('common-tags');
const { SemanticAttributes } = require('@opentelemetry/semantic-conventions');
Expand Down
2 changes: 1 addition & 1 deletion modules/@apostrophecms/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports = {
return str;
}
// XRegExp is different.
// eslint-disable-next-line no-useless-escape

const r = '.(?=W*w*$)';
const regex = new XRegExp(r, 'g');
function tmpl(c) {
Expand Down
10 changes: 5 additions & 5 deletions modules/@apostrophecms/util/lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function (apos) {
// `console.log` documentation.

log: function(...args) {
// eslint-disable-next-line no-console

console.log(...logModule.formatLogByEnv(args));
},

Expand All @@ -25,7 +25,7 @@ module.exports = function (apos) {
// `console.log` documentation.

info: function(...args) {
// eslint-disable-next-line no-console

console.info(...logModule.formatLogByEnv(args));
},

Expand All @@ -38,7 +38,7 @@ module.exports = function (apos) {
// `console.log` documentation.

debug: function(...args) {
// eslint-disable-next-line no-console

console.debug(...logModule.formatLogByEnv(args));
},

Expand All @@ -51,7 +51,7 @@ module.exports = function (apos) {
// `console.error` documentation.

error: function(...args) {
// eslint-disable-next-line no-console

console.error(...logModule.formatLogByEnv(args));
},
// Log a warning. The default implementation wraps
Expand All @@ -67,7 +67,7 @@ module.exports = function (apos) {
// `apos.util.error`.

warn: function(...args) {
// eslint-disable-next-line no-console

console.warn(...logModule.formatLogByEnv(args));
},

Expand Down
2 changes: 1 addition & 1 deletion modules/@apostrophecms/widget-type/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ module.exports = {
// because the purpose of this task is to
// write something to stdout. Should
// not become an apos.util.log call. -Tom
// eslint-disable-next-line no-console

console.log(doc.slug + ':' + dotPath);
}
}
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "index.js",
"scripts": {
"pretest": "npm run lint",
"test": "nyc --reporter=html mocha -t 10000 --ignore=test/assets.js && nyc --reporter=html mocha -t 10000 test/assets.js && mocha -t 1000 test/esm-project/esm.js",
"eslint": "eslint --ext .js,.vue .",
"test": "nyc mocha -t 10000 --ignore=test/assets.js && nyc mocha -t 10000 test/assets.js && mocha -t 1000 test/esm-project/esm.js",
"eslint": "eslint .",
"eslint-fix": "npm run eslint -- --fix",
"i18n": "node scripts/lint-i18n",
"stylelint": "stylelint modules/**/*.{scss,vue}",
Expand Down Expand Up @@ -122,7 +122,7 @@
"tiny-emitter": "^2.1.0",
"tough-cookie": "^4.0.0",
"underscore.string": "^3.3.4",
"uploadfs": "^1.24.3",
"uploadfs": "^1.25.1",
"void-elements": "^3.1.0",
"vue": "^3.3.8",
"vue-advanced-cropper": "^2.8.8",
Expand All @@ -133,11 +133,10 @@
"xregexp": "^2.0.0"
},
"devDependencies": {
"eslint-config-apostrophe": "^5.0.0",
"eslint-config-apostrophe": "^6.0.1",
"form-data": "^4.0.4",
"mocha": "^10.7.3",
"nyc": "^15.1.0",
"replace-in-file": "^6.1.0",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't used

"mocha": "^11.7.1",
"nyc": "^17.1.0",
"stylelint": "^16.5.0",
"stylelint-config-apostrophe": "^4.2.0"
},
Expand Down
115 changes: 0 additions & 115 deletions scripts/great-renaming.js

This file was deleted.

4 changes: 2 additions & 2 deletions test/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe('Widgets', function() {
});

it('should not render the placeholders on preview mode', async function() {
// eslint-disable-next-line no-unused-vars

const { aposEdit, ...query } = req.query;
const _nonEditingReq = {
...req,
Expand Down Expand Up @@ -353,7 +353,7 @@ describe('Widgets', function() {
});

it('should not render the placeholders on preview mode', async function() {
// eslint-disable-next-line no-unused-vars

const { aposEdit, ...query } = req.query;
const _nonEditingReq = {
...req,
Expand Down