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
4 changes: 2 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fileignoreconfig:
- filename: pnpm-lock.yaml
checksum: 5bf275a8f6843072ceadaef8e1aafaef8a80ef71d8d0719a653dc6ecee6e9355
- filename: eslint.config.base.js
checksum: 42ffeeab54d02b41d9cc9253f380a5269603d4a9da3798d32bf5c815684ea466
version: '1.0'
15 changes: 15 additions & 0 deletions eslint.config.base.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import tseslint from 'typescript-eslint';

export const typescriptConfig = tseslint.configs.recommended;

export const baseRules = {
eqeqeq: ['error', 'smart'],
'id-match': 'error',
'no-eval': 'error',
'no-var': 'error',
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@typescript-eslint/prefer-namespace-keyword': 'error',
semi: 'off',
'@typescript-eslint/no-redeclare': 'off',
'@typescript-eslint/no-explicit-any': 'off',
};
2 changes: 0 additions & 2 deletions packages/contentstack-auth/.eslintignore

This file was deleted.

36 changes: 0 additions & 36 deletions packages/contentstack-auth/.eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion packages/contentstack-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/1.8.0 darwin-arm64 node-v24.14.0
@contentstack/cli-auth/1.8.1 darwin-arm64 node-v24.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
17 changes: 17 additions & 0 deletions packages/contentstack-auth/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { typescriptConfig, baseRules } from '../../eslint.config.base.js';

export default [
...typescriptConfig,
{
files: ['src/**/*.ts'],
rules: {
...baseRules,
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/type-annotation-spacing': 'off',
},
},
{
ignores: ['lib/**'],
},
];
2 changes: 1 addition & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@types/sinon": "^21.0.0",
"chai": "^4.5.0",
"dotenv": "^16.4.7",
"eslint": "^8.57.1",
"eslint": "^9.26.0",
"eslint-config-oclif": "^5.2.2",
"eslint-config-oclif-typescript": "^3.1.14",
"mocha": "10.8.2",
Expand Down
1 change: 0 additions & 1 deletion packages/contentstack-auth/src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-redeclare
export interface AuthOptions {
contentstackClient: any;
}
Expand Down
2 changes: 0 additions & 2 deletions packages/contentstack-command/.eslintignore

This file was deleted.

31 changes: 0 additions & 31 deletions packages/contentstack-command/.eslintrc

This file was deleted.

12 changes: 12 additions & 0 deletions packages/contentstack-command/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { typescriptConfig, baseRules } from '../../eslint.config.base.js';

export default [
...typescriptConfig,
{
files: ['src/**/*.ts'],
rules: baseRules,
},
{
ignores: ['lib/**'],
},
];
2 changes: 1 addition & 1 deletion packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/mkdirp": "^1.0.2",
"@types/mocha": "^8.2.3",
"@types/node": "^14.18.63",
"eslint": "^8.57.1",
"eslint": "^9.26.0",
"eslint-config-oclif": "^6.0.15",
"eslint-config-oclif-typescript": "^3.1.13",
"mocha": "10.8.2",
Expand Down
2 changes: 0 additions & 2 deletions packages/contentstack-config/.eslintignore

This file was deleted.

34 changes: 0 additions & 34 deletions packages/contentstack-config/.eslintrc

This file was deleted.

2 changes: 1 addition & 1 deletion packages/contentstack-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-config/1.20.1 darwin-arm64 node-v24.14.0
@contentstack/cli-config/1.20.2 darwin-arm64 node-v24.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
43 changes: 43 additions & 0 deletions packages/contentstack-config/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import mochaPlugin from 'eslint-plugin-mocha';
import { FlatCompat } from '@eslint/eslintrc';
import { baseRules } from '../../eslint.config.base.js';

const compat = new FlatCompat();

export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
...compat.config(mochaPlugin.configs.recommended),
{
files: ['src/**/*.ts', 'test/**/*.ts'],
rules: {
...baseRules,
'unicorn/no-abusive-eslint-disable': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
indent: 'off',
'object-curly-spacing': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'mocha/no-async-describe': 'off',
'mocha/no-identical-title': 'off',
'mocha/no-mocha-arrows': 'off',
'mocha/no-setup-in-describe': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'prefer-const': 'error',
'no-fallthrough': 'error',
'no-prototype-builtins': 'off',
},
},
{
files: ['*.d.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
ignores: ['lib/**'],
},
];
2 changes: 1 addition & 1 deletion packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/node": "^14.18.63",
"@types/sinon": "^21.0.0",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint": "^9.26.0",
"eslint-config-oclif": "^6.0.62",
"eslint-config-oclif-typescript": "^3.1.14",
"mocha": "10.8.2",
Expand Down
2 changes: 0 additions & 2 deletions packages/contentstack-utilities/.eslintignore

This file was deleted.

36 changes: 0 additions & 36 deletions packages/contentstack-utilities/.eslintrc

This file was deleted.

17 changes: 17 additions & 0 deletions packages/contentstack-utilities/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { typescriptConfig, baseRules } from '../../eslint.config.base.js';

export default [
...typescriptConfig,
{
files: ['src/**/*.ts'],
rules: {
...baseRules,
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
},
},
{
ignores: ['lib/**'],
},
];
4 changes: 2 additions & 2 deletions packages/contentstack-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"traverse": "^0.6.11",
"tty-table": "^4.2.3",
"unique-string": "^2.0.0",
"uuid": "^9.0.1",
"uuid": "^14.0.0",
"winston": "^3.19.0",
"xdg-basedir": "^4.0.0"
},
Expand All @@ -71,7 +71,7 @@
"@types/sinon": "^21.0.0",
"@types/traverse": "^0.6.37",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint": "^9.26.0",
"eslint-config-oclif": "^6.0.62",
"eslint-config-oclif-typescript": "^3.1.14",
"fancy-test": "^2.0.42",
Expand Down
1 change: 0 additions & 1 deletion packages/contentstack-utilities/src/fs-utility/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ export async function getFileList(dirName: string, onlyName = true): Promise<str

for (const item of items) {
if (item.isDirectory()) {
/* eslint-disable no-await-in-loop */
files = [...files, ...(await getFileList(`${dirName}/${item.name}`))];
} else {
files.push(onlyName ? item.name : `${dirName}/${item.name}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { AxiosResponse, AxiosResponseHeaders, RawAxiosResponseHeaders } from 'axios';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export class HttpResponse<_ResponseType = any> {
/**
* The Axios response object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default class CLIErrorHandler {
* Extracts only essential error payload information for clear debugging.
*/
private extractErrorPayload(error: Error & Record<string, any>): Record<string, any> {
const { name, message: _message, code, status, response, request, config, statusText } = error;
const { name, code, status, response, request, config, statusText } = error;

const payload: Record<string, any> = {
name,
Expand Down
Loading
Loading