Skip to content

Commit 90c36b3

Browse files
committed
Upgraded eslint to v9
1 parent 6e93062 commit 90c36b3

21 files changed

Lines changed: 148 additions & 187 deletions

File tree

.talismanrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
fileignoreconfig:
2-
- filename: pnpm-lock.yaml
3-
checksum: 18165cc0d24a142ba68182e5251b8f6ead686824119754067a442677cb37acba
4-
- filename: packages/contentstack/README.md
5-
checksum: 4fbf9f74f2288364521d67cca0145f83db5387286923f24e08207e331011e9d5
2+
- filename: eslint.config.base.js
3+
checksum: 42ffeeab54d02b41d9cc9253f380a5269603d4a9da3798d32bf5c815684ea466
64
version: '1.0'

eslint.config.base.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import tseslint from 'typescript-eslint';
2+
3+
export const typescriptConfig = tseslint.configs.recommended;
4+
5+
export const baseRules = {
6+
eqeqeq: ['error', 'smart'],
7+
'id-match': 'error',
8+
'no-eval': 'error',
9+
'no-var': 'error',
10+
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
11+
'@typescript-eslint/prefer-namespace-keyword': 'error',
12+
semi: 'off',
13+
'@typescript-eslint/no-redeclare': 'off',
14+
'@typescript-eslint/no-explicit-any': 'off',
15+
};

packages/contentstack-auth/.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/contentstack-auth/.eslintrc

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { typescriptConfig, baseRules } from '../../eslint.config.base.js';
2+
3+
export default [
4+
...typescriptConfig,
5+
{
6+
files: ['src/**/*.ts'],
7+
rules: {
8+
...baseRules,
9+
'@typescript-eslint/ban-types': 'off',
10+
'@typescript-eslint/quotes': 'off',
11+
'@typescript-eslint/type-annotation-spacing': 'off',
12+
},
13+
},
14+
{
15+
ignores: ['lib/**'],
16+
},
17+
];

packages/contentstack-auth/src/interfaces/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line @typescript-eslint/no-redeclare
21
export interface AuthOptions {
32
contentstackClient: any;
43
}

packages/contentstack-command/.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/contentstack-command/.eslintrc

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { typescriptConfig, baseRules } from '../../eslint.config.base.js';
2+
3+
export default [
4+
...typescriptConfig,
5+
{
6+
files: ['src/**/*.ts'],
7+
rules: baseRules,
8+
},
9+
{
10+
ignores: ['lib/**'],
11+
},
12+
];

packages/contentstack-config/.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)