Skip to content

Commit 68e8c5a

Browse files
Merge pull request #241 from contentstack/enh/dx-9299-eslint-upgrade
Enh/dx 9299 eslint upgrade
2 parents 7c17d34 + 2c6781e commit 68e8c5a

67 files changed

Lines changed: 1202 additions & 2053 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/contentstack-apps-cli/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/contentstack-apps-cli/.eslintrc

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import tseslint from 'typescript-eslint';
2+
import globals from 'globals';
3+
4+
export default [
5+
...tseslint.configs.recommended,
6+
{
7+
ignores: [
8+
'lib/**/*',
9+
'test/**/*',
10+
'dist/**/*',
11+
],
12+
},
13+
{
14+
languageOptions: {
15+
parser: tseslint.parser,
16+
parserOptions: {
17+
project: './tsconfig.json',
18+
},
19+
sourceType: 'module',
20+
globals: {
21+
...globals.node,
22+
},
23+
},
24+
plugins: {
25+
'@typescript-eslint': tseslint.plugin,
26+
},
27+
rules: {
28+
'@typescript-eslint/no-unused-vars': [
29+
'error',
30+
{
31+
args: 'none',
32+
},
33+
],
34+
'@typescript-eslint/prefer-namespace-keyword': 'error',
35+
quotes: 'off',
36+
semi: 'off',
37+
'@typescript-eslint/no-redeclare': 'off',
38+
eqeqeq: ['error', 'smart'],
39+
'id-match': 'error',
40+
'no-eval': 'error',
41+
'no-var': 'error',
42+
'@typescript-eslint/no-explicit-any': 'off',
43+
'@typescript-eslint/no-require-imports': 'off',
44+
'prefer-const': 'error',
45+
},
46+
},
47+
];

packages/contentstack-apps-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"axios": "^1.16.1",
4747
"chai": "^4.5.0",
4848
"dotenv": "^16.6.1",
49-
"eslint": "^8.57.1",
49+
"eslint": "^10.5.0",
5050
"eslint-config-oclif": "^6.0.157",
5151
"eslint-config-oclif-typescript": "^3.1.14",
5252
"mocha": "^10.8.2",
@@ -80,7 +80,7 @@
8080
},
8181
"scripts": {
8282
"build": "npm run clean && shx rm -rf lib && tsc -b",
83-
"lint": "eslint . --ext .ts --config .eslintrc",
83+
"lint": "eslint .",
8484
"postpack": "shx rm -f oclif.manifest.json",
8585
"posttest": "npm run lint",
8686
"prepack": "npm run build && oclif manifest && oclif readme",

packages/contentstack-asset-management/.eslintrc

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import tseslint from 'typescript-eslint';
2+
import globals from 'globals';
3+
import oclif from 'eslint-config-oclif-typescript';
4+
5+
export default [
6+
...tseslint.configs.recommended,
7+
oclif,
8+
{
9+
languageOptions: {
10+
parser: tseslint.parser,
11+
parserOptions: {
12+
project: './tsconfig.json',
13+
},
14+
sourceType: 'module',
15+
globals: {
16+
...globals.node,
17+
},
18+
},
19+
plugins: {
20+
'@typescript-eslint': tseslint.plugin,
21+
},
22+
rules: {
23+
'@typescript-eslint/no-unused-vars': [
24+
'error',
25+
{
26+
args: 'none',
27+
},
28+
],
29+
'@typescript-eslint/prefer-namespace-keyword': 'error',
30+
'@typescript-eslint/quotes': [
31+
'error',
32+
'single',
33+
{
34+
avoidEscape: true,
35+
allowTemplateLiterals: true,
36+
},
37+
],
38+
semi: 'off',
39+
'@typescript-eslint/type-annotation-spacing': 'error',
40+
'@typescript-eslint/no-redeclare': 'off',
41+
eqeqeq: ['error', 'smart'],
42+
'id-match': 'error',
43+
'no-eval': 'error',
44+
'no-var': 'error',
45+
quotes: 'off',
46+
indent: 'off',
47+
camelcase: 'off',
48+
'comma-dangle': 'off',
49+
'arrow-parens': 'off',
50+
'operator-linebreak': 'off',
51+
'object-curly-spacing': 'off',
52+
'node/no-missing-import': 'off',
53+
'padding-line-between-statements': 'off',
54+
'@typescript-eslint/ban-ts-ignore': 'off',
55+
'unicorn/no-abusive-eslint-disable': 'off',
56+
'unicorn/consistent-function-scoping': 'off',
57+
'@typescript-eslint/no-use-before-define': 'off',
58+
},
59+
},
60+
];

packages/contentstack-asset-management/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@
4646
"@types/node": "^20.17.50",
4747
"@types/sinon": "^17.0.4",
4848
"chai": "^4.4.1",
49-
"eslint": "^8.57.1",
49+
"eslint": "^10.5.0",
5050
"eslint-config-oclif": "^6.0.68",
5151
"mocha": "^10.8.2",
5252
"nyc": "^15.1.0",
5353
"oclif": "^4.23.8",
5454
"sinon": "^17.0.2",
5555
"source-map-support": "^0.5.21",
5656
"ts-node": "^10.9.2",
57-
"typescript": "^5.8.3"
57+
"typescript": "^5.9.3"
5858
}
5959
}

packages/contentstack-audit/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/contentstack-audit/.eslintrc

Lines changed: 0 additions & 6 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 oclif from 'eslint-config-oclif';
2+
import oclifTypescript from 'eslint-config-oclif-typescript';
3+
4+
export default [
5+
oclif,
6+
oclifTypescript,
7+
{
8+
ignores: [
9+
'dist/**/*',
10+
],
11+
},
12+
];

0 commit comments

Comments
 (0)