-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.ts-qa
More file actions
47 lines (42 loc) · 1.08 KB
/
Dockerfile.ts-qa
File metadata and controls
47 lines (42 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM node:20-alpine
# Install TypeScript QA tools globally
RUN npm install -g \
typescript@latest \
eslint@latest \
prettier@latest \
@typescript-eslint/parser@latest \
@typescript-eslint/eslint-plugin@latest
# Set up working directory for code snippets
WORKDIR /code-snippets
# Create basic tsconfig.json for linting
RUN echo '{\
"compilerOptions": {\
"target": "ES2022",\
"module": "ESNext",\
"moduleResolution": "node",\
"strict": true,\
"noEmit": true,\
"skipLibCheck": true,\
"forceConsistentCasingInFileNames": true\
},\
"include": ["**/*.ts"]\
}' > tsconfig.json
# Create basic eslint config
RUN echo '{\
"parser": "@typescript-eslint/parser",\
"plugins": ["@typescript-eslint"],\
"extends": [\
"eslint:recommended",\
"@typescript-eslint/recommended"\
],\
"env": {\
"node": true,\
"es2022": true\
},\
"parserOptions": {\
"ecmaVersion": 2022,\
"sourceType": "module"\
}\
}' > .eslintrc.json
# Default command
CMD ["tsc", "--noEmit"]