feat(jenkins): deploy lint and check in dockerfile
This commit is contained in:
21
.eslintrc.cjs
Normal file
21
.eslintrc.cjs
Normal file
@@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
"plugin:astro/recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
parser: "@typescript-eslint/parser",
|
||||
plugins: ["@typescript-eslint"],
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.astro"],
|
||||
parser: "astro-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@typescript-eslint/parser",
|
||||
extraFileExtensions: [".astro"],
|
||||
},
|
||||
rules: {
|
||||
// Tu peux ajouter des règles spécifiques ici
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
13
Dockerfile
13
Dockerfile
@@ -11,10 +11,19 @@ WORKDIR /app
|
||||
|
||||
# Copy depedencies
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Copy all and build
|
||||
# Install pnpm with cache
|
||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||
PNPM_HOME="/pnpm" pnpm install --frozen-lockfile
|
||||
|
||||
# Copy all
|
||||
COPY . .
|
||||
|
||||
# Check files
|
||||
RUN pnpm run lint
|
||||
RUN pnpm run check
|
||||
|
||||
# Build
|
||||
RUN pnpm build
|
||||
|
||||
# --- DEPLOY ---
|
||||
|
||||
18
package.json
18
package.json
@@ -6,7 +6,9 @@
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
"astro": "astro",
|
||||
"lint": "eslint src/**/*.{js,ts,astro}",
|
||||
"check": "astro check"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/mdx": "^4.3.13",
|
||||
@@ -14,5 +16,19 @@
|
||||
"@astrojs/sitemap": "^3.6.0",
|
||||
"astro": "^5.16.6",
|
||||
"sharp": "^0.34.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
||||
"@typescript-eslint/parser": "^8.52.0",
|
||||
"astro-eslint-parser": "^1.2.2",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-plugin-astro": "^1.5.0",
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"pnpm": {
|
||||
"onlyBuiltDependencies": [
|
||||
"esbuild",
|
||||
"sharp"
|
||||
]
|
||||
}
|
||||
}
|
||||
1008
pnpm-lock.yaml
generated
1008
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
3
pnpm-workspace.yaml
Normal file
3
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
ignoredBuiltDependencies:
|
||||
- esbuild
|
||||
- sharp
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"extends": "astro/tsconfigs/strict",
|
||||
"include": [".astro/types.d.ts", "**/*"],
|
||||
"exclude": ["dist"],
|
||||
"compilerOptions": {
|
||||
"strictNullChecks": true
|
||||
|
||||
Reference in New Issue
Block a user