Skip to content

Commit fb5eb2a

Browse files
Updated posttest and lint scripts in package.json files
1 parent 2c570c0 commit fb5eb2a

9 files changed

Lines changed: 104 additions & 44 deletions

File tree

packages/contentstack-apps-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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-audit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 .",
6363
"postpack": "shx rm -f oclif.manifest.json",
6464
"posttest": "npm run lint",
6565
"compile": "tsc -b tsconfig.json",

packages/contentstack-cli-tsgen/.eslintrc.js

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import tseslint from 'typescript-eslint';
2+
import globals from 'globals';
3+
import oclif from 'eslint-config-oclif';
4+
import oclifTypescript from 'eslint-config-oclif-typescript';
5+
6+
export default [
7+
...tseslint.configs.recommended,
8+
9+
oclif,
10+
11+
oclifTypescript,
12+
13+
{
14+
ignores: [
15+
'lib/**/*',
16+
],
17+
},
18+
19+
{
20+
languageOptions: {
21+
parser: tseslint.parser,
22+
parserOptions: {
23+
ecmaVersion: 2020,
24+
sourceType: 'module',
25+
},
26+
globals: {
27+
...globals.node,
28+
},
29+
},
30+
31+
plugins: {
32+
'@typescript-eslint': tseslint.plugin,
33+
},
34+
35+
rules: {
36+
'unicorn/prefer-module': 'off',
37+
'@typescript-eslint/no-require-imports': 'off',
38+
'unicorn/no-array-for-each': 'off',
39+
camelcase: 'off',
40+
'@typescript-eslint/no-unused-vars': 'error',
41+
quotes: ['error', 'single', { avoidEscape: true }],
42+
semi: ['error', 'never'],
43+
'unicorn/import-style': 'off',
44+
'unicorn/prefer-node-protocol': 'off',
45+
'unicorn/consistent-function-scoping': 'off',
46+
'@typescript-eslint/ban-ts-comment': 'off',
47+
'object-curly-spacing': ['error', 'never'],
48+
'node/no-missing-import': 'off',
49+
},
50+
},
51+
];

packages/contentstack-cli-tsgen/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
"build": "pnpm compile && oclif manifest && oclif readme",
5959
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
6060
"compile": "tsc -b tsconfig.json",
61-
"lint": "eslint . --ext .ts --config .eslintrc.js",
61+
"lint": "eslint .",
6262
"postpack": "rm -f oclif.manifest.json",
63-
"posttest": "eslint . --ext .ts --config .eslintrc.js --fix",
63+
"posttest": "eslint . --fix",
6464
"prepack": "pnpm compile && oclif manifest && oclif readme",
6565
"test": "jest --testPathPattern=tests",
6666
"test:integration": "jest --testPathPattern=tests/integration",

packages/contentstack-content-type/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
"test": "jest",
7373
"test:unit": "jest",
7474
"test:coverage": "jest --coverage",
75-
"posttest": "eslint . --ext .ts --config .eslintrc",
76-
"lint": "eslint . --ext .ts --config .eslintrc",
75+
"posttest": "eslint . --fix",
76+
"lint": "eslint .",
7777
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo oclif.manifest.json",
7878
"version": "oclif readme && git add README.md"
7979
},

packages/contentstack-external-migrate/.eslintrc.js

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import tseslint from 'typescript-eslint';
2+
import globals from 'globals';
3+
import oclif from 'eslint-config-oclif';
4+
import oclifTypescript from 'eslint-config-oclif-typescript';
5+
6+
export default [
7+
...tseslint.configs.recommended,
8+
9+
oclif,
10+
11+
oclifTypescript,
12+
13+
{
14+
languageOptions: {
15+
parser: tseslint.parser,
16+
parserOptions: {
17+
ecmaVersion: 2020,
18+
sourceType: 'module',
19+
},
20+
globals: {
21+
...globals.node,
22+
},
23+
},
24+
25+
plugins: {
26+
'@typescript-eslint': tseslint.plugin,
27+
},
28+
29+
rules: {
30+
'unicorn/prefer-module': 'off',
31+
'@typescript-eslint/no-require-imports': 'off',
32+
'unicorn/no-array-for-each': 'off',
33+
camelcase: 'off',
34+
'@typescript-eslint/no-unused-vars': 'error',
35+
quotes: ['error', 'single', { avoidEscape: true }],
36+
semi: ['error', 'never'],
37+
'unicorn/import-style': 'off',
38+
'unicorn/prefer-node-protocol': 'off',
39+
'unicorn/consistent-function-scoping': 'off',
40+
'@typescript-eslint/ban-ts-comment': 'off',
41+
'object-curly-spacing': ['error', 'never'],
42+
'node/no-missing-import': 'off',
43+
},
44+
},
45+
];

packages/contentstack-external-migrate/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"build": "pnpm compile && oclif manifest && oclif readme",
1515
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
1616
"compile": "tsc -b tsconfig.json && node scripts/copy-assets.js",
17-
"lint": "eslint . --ext .ts --config .eslintrc.js",
17+
"lint": "eslint .",
1818
"postpack": "rm -f oclif.manifest.json",
19-
"posttest": "eslint . --ext .ts --config .eslintrc.js --fix",
19+
"posttest": "eslint . --fix",
2020
"prepack": "pnpm compile && oclif manifest && oclif readme",
2121
"test": "vitest run",
2222
"test:integration": "jest --testPathPattern=tests/integration",

0 commit comments

Comments
 (0)