Skip to content

Commit 2f3dd66

Browse files
Merge pull request #44 from contentstack/staging
Allow creating new Launch project without environment variables, setup linter, jest, git hooks, talisman and snyk
2 parents f239286 + 18585ab commit 2f3dd66

32 files changed

+4630
-4819
lines changed

.eslintignore

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

.eslintrc

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

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,22 @@ jobs:
5050
run: ls -R
5151
- name: Release
5252
id: release-plugin
53-
uses: JS-DevTools/npm-publish@v2.2.0
53+
uses: JS-DevTools/npm-publish@v3
5454
with:
5555
token: "${{ secrets.NPM_TOKEN }}"
5656
access: public
5757
- name: get-npm-version
5858
id: package-version
5959
uses: martinbeentjes/npm-get-version-action@v1.3.1
60+
- uses: actions/checkout@v4
61+
if: ${{ steps.release-plugin.conclusion == 'success' }}
62+
with:
63+
ref: 'prod-qa-pipeline'
64+
- uses: EndBug/add-and-commit@v9
65+
if: ${{ steps.release-plugin.conclusion == 'success' }}
66+
with:
67+
message: "Released version ${{ steps.package-version.outputs.current-version }}"
68+
push: true
6069
- name: github-release
6170
id: github-release
6271
env:

.husky/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
npm run prepack && npm run lint-staged
2+
3+
echo "\n\n Running Talisman secret scan..."
4+
talisman --githook pre-commit
5+
6+
echo "\n\n Running Snyk vulnerability scan..."
7+
snyk test --all-projects --fail-on=all

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run test

eslint.config.mjs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// @ts-check
2+
3+
import eslint from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
6+
export default tseslint.config(
7+
eslint.configs.recommended,
8+
tseslint.configs.recommended,
9+
{
10+
files: ['src/**/*.{js,ts}'],
11+
rules: {
12+
'@typescript-eslint/interface-name-prefix': 'off',
13+
'@typescript-eslint/explicit-function-return-type': 'off',
14+
'@typescript-eslint/no-explicit-any': 'off',
15+
'@/semi': ['error'],
16+
'@typescript-eslint/array-type': ['error'],
17+
'@/no-throw-literal': ['error'],
18+
quotes: 'off',
19+
'@/quotes': ['error', 'single'],
20+
'max-len': ['error', { code: 120 }],
21+
'@typescript-eslint/no-namespace': 'off',
22+
"indent": [
23+
"error",
24+
2
25+
]
26+
},
27+
},
28+
);

0 commit comments

Comments
 (0)