diff options
-rw-r--r-- | .eslintignore | 2 | ||||
-rw-r--r-- | .eslintrc.js | 2 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rwxr-xr-x | scripts/build-unix.sh | 13 | ||||
-rw-r--r-- | scripts/build-windows.ps1 | 15 | ||||
-rw-r--r-- | tsconfig.json | 14 |
6 files changed, 23 insertions, 26 deletions
diff --git a/.eslintignore b/.eslintignore index 058a2b11d..68b64f029 100644 --- a/.eslintignore +++ b/.eslintignore | |||
@@ -30,7 +30,7 @@ node_modules | |||
30 | 30 | ||
31 | # package files | 31 | # package files |
32 | package.json | 32 | package.json |
33 | package-lock.json | 33 | pnpm-lock.yaml |
34 | 34 | ||
35 | # Json | 35 | # Json |
36 | *.json | 36 | *.json |
diff --git a/.eslintrc.js b/.eslintrc.js index 3f56f18cd..54ae4c8ad 100644 --- a/.eslintrc.js +++ b/.eslintrc.js | |||
@@ -10,6 +10,7 @@ module.exports = { | |||
10 | sourceType: 'module', | 10 | sourceType: 'module', |
11 | project: './tsconfig.json', | 11 | project: './tsconfig.json', |
12 | }, | 12 | }, |
13 | ignorePatterns: ['node_modules', 'build', 'recipes', '.eslintrc.js'], | ||
13 | extends: ['airbnb', 'plugin:unicorn/recommended', 'prettier'], | 14 | extends: ['airbnb', 'plugin:unicorn/recommended', 'prettier'], |
14 | plugins: ['jest', 'prettier'], | 15 | plugins: ['jest', 'prettier'], |
15 | settings: { | 16 | settings: { |
@@ -19,7 +20,6 @@ module.exports = { | |||
19 | }, | 20 | }, |
20 | }, | 21 | }, |
21 | globals: { | 22 | globals: { |
22 | // TODO: can be removed once adonisj migration is done | ||
23 | use: true, | 23 | use: true, |
24 | }, | 24 | }, |
25 | env: { | 25 | env: { |
diff --git a/package.json b/package.json index 9875c6eba..07c108960 100644 --- a/package.json +++ b/package.json | |||
@@ -33,8 +33,7 @@ | |||
33 | "manage-translations": "pnpm extract && pnpm compile && rimraf temp.json", | 33 | "manage-translations": "pnpm extract && pnpm compile && rimraf temp.json", |
34 | "build": "preval-build-info-cli && node esbuild.mjs && electron-builder", | 34 | "build": "preval-build-info-cli && node esbuild.mjs && electron-builder", |
35 | "contributors": "all-contributors", | 35 | "contributors": "all-contributors", |
36 | "reformat-files": "prettier --ignore-path .eslintignore --write --require-pragma \"**/*.{js,jsx,scss}\"", | 36 | "reformat-files": "prettier --ignore-path .eslintignore --write --require-pragma \"**/*.{js,jsx,mjs,ts,tsx,scss}\"", |
37 | "update-submodules": "git submodule update --init --recursive --remote --rebase --force", | ||
38 | "prepare-code": "pnpm lint:fix && pnpm reformat-files && pnpm manage-translations", | 37 | "prepare-code": "pnpm lint:fix && pnpm reformat-files && pnpm manage-translations", |
39 | "link-readme": "ts-node scripts/link-readme.ts", | 38 | "link-readme": "ts-node scripts/link-readme.ts", |
40 | "minify-images": "./scripts/minify-images.sh", | 39 | "minify-images": "./scripts/minify-images.sh", |
diff --git a/scripts/build-unix.sh b/scripts/build-unix.sh index 8dae9e5ee..04aa9e70f 100755 --- a/scripts/build-unix.sh +++ b/scripts/build-unix.sh | |||
@@ -103,19 +103,18 @@ fi | |||
103 | command_exists asdf && asdf reshim nodejs | 103 | command_exists asdf && asdf reshim nodejs |
104 | 104 | ||
105 | # ----------------------------------------------------------------------------- | 105 | # ----------------------------------------------------------------------------- |
106 | # Now the meat..... | ||
107 | pnpm i | ||
108 | pnpm prepare-code | ||
109 | pnpm lint | ||
110 | pnpm test | ||
111 | |||
112 | # ----------------------------------------------------------------------------- | ||
113 | printf "\n*************** Building recipes ***************\n" | 106 | printf "\n*************** Building recipes ***************\n" |
114 | pushd recipes | 107 | pushd recipes |
115 | pnpm i && pnpm lint && pnpm reformat-files && pnpm package | 108 | pnpm i && pnpm lint && pnpm reformat-files && pnpm package |
116 | popd | 109 | popd |
117 | 110 | ||
118 | # ----------------------------------------------------------------------------- | 111 | # ----------------------------------------------------------------------------- |
112 | # Now the meat..... | ||
113 | pnpm i | ||
114 | pnpm prepare-code | ||
115 | pnpm lint | ||
116 | pnpm test | ||
117 | |||
119 | printf "\n*************** Building app ***************\n" | 118 | printf "\n*************** Building app ***************\n" |
120 | if [[ "$(uname -m)" =~ "arm" ]]; then | 119 | if [[ "$(uname -m)" =~ "arm" ]]; then |
121 | TARGET_ARCH=arm64 | 120 | TARGET_ARCH=arm64 |
diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 index ca4fabfe8..3c85e0a38 100644 --- a/scripts/build-windows.ps1 +++ b/scripts/build-windows.ps1 | |||
@@ -127,8 +127,6 @@ if((-not $NPM_CONFIG_MSVS_VERSION) -or -not ($EXPECTED_MSVST_VERSION -contains $ | |||
127 | } | 127 | } |
128 | 128 | ||
129 | 129 | ||
130 | |||
131 | |||
132 | # ----------------------------------------------------------------------------- | 130 | # ----------------------------------------------------------------------------- |
133 | # Ensure that the system dependencies are at the correct version - recover if not | 131 | # Ensure that the system dependencies are at the correct version - recover if not |
134 | # Check pnpm version | 132 | # Check pnpm version |
@@ -148,19 +146,18 @@ if ($ACTUAL_PNPM_VERSION -ne $EXPECTED_RECIPES_PNPM_VERSION) { | |||
148 | } | 146 | } |
149 | 147 | ||
150 | # ----------------------------------------------------------------------------- | 148 | # ----------------------------------------------------------------------------- |
151 | # Now the meat..... | ||
152 | & pnpm i | ||
153 | & pnpm prepare-code | ||
154 | & pnpm lint | ||
155 | & pnpm test | ||
156 | |||
157 | # ----------------------------------------------------------------------------- | ||
158 | Write-Host "*************** Building recipes ***************" | 149 | Write-Host "*************** Building recipes ***************" |
159 | Push-Location recipes | 150 | Push-Location recipes |
160 | pnpm i && pnpm lint && pnpm reformat-files && pnpm package | 151 | pnpm i && pnpm lint && pnpm reformat-files && pnpm package |
161 | Pop-Location | 152 | Pop-Location |
162 | 153 | ||
163 | # ----------------------------------------------------------------------------- | 154 | # ----------------------------------------------------------------------------- |
155 | # Now the meat..... | ||
156 | & pnpm i | ||
157 | & pnpm prepare-code | ||
158 | & pnpm lint | ||
159 | & pnpm test | ||
160 | |||
164 | Write-Host "*************** Building app ***************" | 161 | Write-Host "*************** Building app ***************" |
165 | if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { | 162 | if ($env:PROCESSOR_ARCHITECTURE -eq "ARM64") { |
166 | $TARGET_ARCH="arm64" | 163 | $TARGET_ARCH="arm64" |
diff --git a/tsconfig.json b/tsconfig.json index bf7c81e51..6a1d5d1b2 100644 --- a/tsconfig.json +++ b/tsconfig.json | |||
@@ -1,4 +1,12 @@ | |||
1 | { | 1 | { |
2 | "include": [ | ||
3 | "**/*" | ||
4 | ], | ||
5 | "exclude": [ | ||
6 | "node_modules", | ||
7 | "build", | ||
8 | "recipes" | ||
9 | ], | ||
2 | "compilerOptions": { | 10 | "compilerOptions": { |
3 | "outDir": ".tmp", | 11 | "outDir": ".tmp", |
4 | "rootDir": "./", | 12 | "rootDir": "./", |
@@ -46,10 +54,4 @@ | |||
46 | "forceConsistentCasingInFileNames": true, | 54 | "forceConsistentCasingInFileNames": true, |
47 | "useDefineForClassFields": true | 55 | "useDefineForClassFields": true |
48 | }, | 56 | }, |
49 | "include": [ | ||
50 | "src", | ||
51 | "scripts", | ||
52 | "test", | ||
53 | "gulpfile.babel.ts", | ||
54 | ], | ||
55 | } | 57 | } |