Skip to content

Commit 078fbe0

Browse files
Merge pull request #246 from contentstack/enh/dx-9335-eslint-upgrade
Enh/dx 9335 eslint upgrade
2 parents da5c9ea + 7a56bec commit 078fbe0

65 files changed

Lines changed: 744 additions & 608 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",
@@ -77,7 +77,7 @@
7777
},
7878
"scripts": {
7979
"build": "pnpm clean && tsc -b",
80-
"lint": "eslint . --ext .ts --config .eslintrc",
80+
"lint": "eslint . --ext .ts",
8181
"postpack": "shx rm -f oclif.manifest.json",
8282
"posttest": "pnpm lint",
8383
"prepack": "pnpm build && oclif manifest && oclif readme",

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+
];

packages/contentstack-audit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@types/mocha": "^10.0.10",
3535
"@types/node": "^20.17.50",
3636
"chai": "^4.5.0",
37-
"eslint": "^9.26.0",
37+
"eslint": "^10.5.0",
3838
"eslint-config-oclif": "^6.0.62",
3939
"eslint-config-oclif-typescript": "^3.1.14",
4040
"mocha": "^10.8.2",
@@ -59,7 +59,7 @@
5959
},
6060
"scripts": {
6161
"build": "pnpm compile && oclif manifest && oclif readme",
62-
"lint": "eslint . --ext .ts --config .eslintrc",
62+
"lint": "eslint . --ext .ts",
6363
"postpack": "shx rm -f oclif.manifest.json",
6464
"posttest": "npm run lint",
6565
"compile": "tsc -b tsconfig.json",

packages/contentstack-bootstrap/.eslintignore

Whitespace-only changes.

packages/contentstack-bootstrap/.eslintrc

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

0 commit comments

Comments
 (0)