Skip to content

Commit

Permalink
feat(js): add blank js project
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Jul 28, 2024
1 parent 2638dec commit 536f404
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "JavaScript starter project",
"author": "Simon Emms <[email protected]>",
"type": [
"blank",
"nestjs",
"svelte"
]
Expand Down
2 changes: 1 addition & 1 deletion js/hooks/post_gen_project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ shopt -s dotglob

cp -rf {{ cookiecutter.type }}/* ./

rm -Rf nestjs svelte
rm -Rf blank nestjs svelte

git init -b main
git add .
Expand Down
25 changes: 25 additions & 0 deletions js/{{ cookiecutter.project_name }}/blank/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
6 changes: 6 additions & 0 deletions js/{{ cookiecutter.project_name }}/blank/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"plugins": ["prettier-plugin-organize-imports"]
}
17 changes: 17 additions & 0 deletions js/{{ cookiecutter.project_name }}/blank/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"editor.formatOnSave": true,
"editor.rulers": [
80
],
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": [
".github/workflows/*.{yml,yaml}"
]
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
26 changes: 26 additions & 0 deletions js/{{ cookiecutter.project_name }}/blank/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "{{ cookiecutter.project_name }}",
"version": "0.0.0",
"description": "{{ cookiecutter.description }}",
"author": "{{ cookiecutter.author }}",
"private": true,
"license": "Apache-2.0",
"scripts": {
"build": "tsc",
"format": "prettier --write \"**/*.?(c|m){j,t}s\"",
"lint": "eslint \"**/*.?(c|m)ts\" --fix",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.2.5",
"prettier-plugin-organize-imports": "^3.2.4",
"source-map-support": "^0.5.21",
"typescript": "^5.5.4"
}
}
21 changes: 21 additions & 0 deletions js/{{ cookiecutter.project_name }}/blank/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"incremental": true,
"target": "ES2023",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"module": "commonjs",
"baseUrl": "./src",
"declaration": true,
"sourceMap": true,
"outDir": "./dist",
"removeComments": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"skipLibCheck": true
}
}

0 comments on commit 536f404

Please sign in to comment.