Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/update-eslint-to-flat-config #1127

Merged
merged 4 commits into from
Dec 27, 2024
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
70 changes: 0 additions & 70 deletions .eslintrc.json

This file was deleted.

20 changes: 0 additions & 20 deletions apps/api/.eslintrc.json

This file was deleted.

24 changes: 24 additions & 0 deletions apps/api/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
{
ignores: ['src/assets/**/*'],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
'no-empty-pattern': 'off',
},
},
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
];
4 changes: 1 addition & 3 deletions apps/api/src/app/controllers/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,7 @@ const verifyEmailViaLink = createRoute(routeDefinition.verification.validators,

const { code } = query;

const pendingVerification = req.session.pendingVerification.find(({ type }) => {
type === 'email';
});
const pendingVerification = req.session.pendingVerification.find(({ type }) => type === 'email');

if (!pendingVerification) {
throw new InvalidSession('Missing pending verification');
Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/app/controllers/socket.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ export function initSocketServer(app: express.Express, middlewareFns: express.Re
// TODO: should we distinguish specific reason for disconnect before unsubscribing from cometd?
// If browser did not really disconnect, how will it know that it is no longer subscribed to cometd?
Object.values(userSocketState.cometdConnections).forEach(({ cometd, subscriptions }) => {
cometd && socketUtils.disconnectCometD(cometd, socket, user);
if (cometd) {
socketUtils.disconnectCometD(cometd, socket, user);
}
subscriptions.clear();
});
userSocketState.cometdConnections = {};
Expand Down
18 changes: 0 additions & 18 deletions apps/cron-tasks/.eslintrc.json

This file was deleted.

20 changes: 20 additions & 0 deletions apps/cron-tasks/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
];
4 changes: 2 additions & 2 deletions apps/cron-tasks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/cron-tasks/src",
"projectType": "application",
"tags": ["scope:server"],
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
Expand Down Expand Up @@ -62,6 +63,5 @@
"jestConfig": "apps/cron-tasks/jest.config.ts"
}
}
},
"tags": ["scope:server"]
}
}
22 changes: 0 additions & 22 deletions apps/docs/.eslintrc.json

This file was deleted.

28 changes: 28 additions & 0 deletions apps/docs/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
{
ignores: ['.docusaurus', 'build', 'node_modules'],
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
languageOptions: {
parserOptions: {
project: ['apps/docs/tsconfig.*?.json'],
},
},
},
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
];
18 changes: 0 additions & 18 deletions apps/download-zip-sw/.eslintrc.json

This file was deleted.

20 changes: 20 additions & 0 deletions apps/download-zip-sw/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
];
4 changes: 2 additions & 2 deletions apps/download-zip-sw/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/download-zip-sw/src",
"tags": ["sw"],
"targets": {
"build": {
"executor": "@nx/webpack:webpack",
Expand Down Expand Up @@ -73,6 +74,5 @@
"jestConfig": "apps/download-zip-sw/jest.config.ts"
}
}
},
"tags": ["sw"]
}
}
12 changes: 10 additions & 2 deletions apps/download-zip-sw/src/app/Zip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ class Zip {

// To also work with the node version of readable stream (for testing)
enqueue = (data) => {
this.outputController ? this.outputController.enqueue(data) : this.outputStream.push(data);
if (this.outputController) {
this.outputController.enqueue(data);
} else {
this.outputStream.push(data);
}
};

close = () => {
this.outputController ? this.outputController.close() : this.outputStream.destroy();
if (this.outputController) {
this.outputController.close();
} else {
this.outputStream.destroy();
}
};

// Generators
Expand Down
2 changes: 1 addition & 1 deletion apps/download-zip-sw/src/main.sw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const zipMap: Map<
files: DownZipFile[];
name: string;
zip: Zip;
sizeBig: BigInt;
sizeBig: bigint;
}
> = new Map();

Expand Down
18 changes: 0 additions & 18 deletions apps/geo-ip-api/.eslintrc.json

This file was deleted.

20 changes: 20 additions & 0 deletions apps/geo-ip-api/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const baseConfig = require('../../eslint.config.js');

module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
];
24 changes: 0 additions & 24 deletions apps/jetstream-e2e/.eslintrc.json

This file was deleted.

Loading
Loading