Skip to content

Commit ea54c3e

Browse files
committed
Security fix disable dependencies scripts
1 parent dabb0e6 commit ea54c3e

7 files changed

Lines changed: 53 additions & 15 deletions

File tree

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ignore-scripts=true

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ limitations under the License.
7070

7171
Explore the predefined templates for various configurations in the [/templates](/templates) directory. These templates provide quick-start setups for different environments.
7272

73-
**[/templates/browser_webpack_react_app.template](/templates/browser_webpack_react_app.template)**<br />
74-
**[/templates/browser_webpack_react_library.template](/templates/browser_webpack_react_library.template)**<br />
7573
**[/templates/browser_webpack_app.template](/templates/browser_webpack_app.template)**<br />
74+
**[/templates/browser_webpack_babel_react_app.template](/templates/browser_webpack_babel_react_app.template)**<br />
7675
**[/templates/browser_webpack_library.template](/templates/browser_webpack_library.template)**<br />
76+
**[/templates/browser_webpack_react_app.template](/templates/browser_webpack_react_app.template)**<br />
77+
**[/templates/browser_webpack_react_library.template](/templates/browser_webpack_react_library.template)**<br />
78+
**[/templates/node_app.template](/templates/node_app.template)**<br />
7779
**[/templates/node_webpack_app.template](/templates/node_webpack_app.template)**<br />
7880
**[/templates/node_webpack_library.template](/templates/node_webpack_library.template)**<br />
7981

@@ -98,13 +100,17 @@ Choose one of the predefined configuration templates from the [/templates](/temp
98100
Use the `cp` command to copy it into your project as `/tsconfig.json`:
99101

100102
```bash
103+
cp ./node_modules/@premierstacks/typescript-stack/templates/browser_webpack_app.template ./tsconfig.json
104+
# or
105+
cp ./node_modules/@premierstacks/typescript-stack/templates/browser_webpack_babel_react_app.template ./tsconfig.json
106+
# or
107+
cp ./node_modules/@premierstacks/typescript-stack/templates/browser_webpack_library.template ./tsconfig.json
108+
# or
101109
cp ./node_modules/@premierstacks/typescript-stack/templates/browser_webpack_react_app.template ./tsconfig.json
102110
# or
103111
cp ./node_modules/@premierstacks/typescript-stack/templates/browser_webpack_react_library.template ./tsconfig.json
104112
# or
105-
cp ./node_modules/@premierstacks/typescript-stack/templates/browser_webpack_app.template ./tsconfig.json
106-
# or
107-
cp ./node_modules/@premierstacks/typescript-stack/templates/browser_webpack_library.template ./tsconfig.json
113+
cp ./node_modules/@premierstacks/typescript-stack/templates/node_app.template ./tsconfig.json
108114
# or
109115
cp ./node_modules/@premierstacks/typescript-stack/templates/node_webpack_app.template ./tsconfig.json
110116
# or

eslint.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
* @author Tomáš Chochola <chocholatom1997@gmail.com>
44
* @copyright © 2025 Tomáš Chochola <chocholatom1997@gmail.com>
55
*
6-
*@license Apache-2.0
6+
* @license Apache-2.0
77
*
88
* @see {@link http://www.apache.org/licenses/LICENSE-2.0} License
99
* @see {@link https://github.com/tomchochola} GitHub Personal
1010
* @see {@link https://github.com/premierstacks} GitHub Organization
1111
* @see {@link https://github.com/sponsors/tomchochola} GitHub Sponsors
1212
*/
1313

14-
import { createEslintConfigNode, createEslintIgnorePatterns, createEslintOverridesForConfigs } from '@premierstacks/eslint-stack';
14+
import { createEslintConfigIgnores, createEslintConfigIgnoresRoot, createEslintConfigNode } from '@premierstacks/eslint-stack';
15+
import { defineConfig } from 'eslint/config';
1516

16-
export default [...createEslintIgnorePatterns(), ...createEslintConfigNode(), ...createEslintOverridesForConfigs()];
17+
export default defineConfig([createEslintConfigIgnores(), createEslintConfigIgnoresRoot(), createEslintConfigNode()]);

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@
3535
"typescript": "^5.8.3"
3636
},
3737
"devDependencies": {
38-
"@premierstacks/eslint-stack": "github:premierstacks/eslint-stack#semver:^2.0",
39-
"@premierstacks/prettier-stack": "github:premierstacks/prettier-stack#semver:^2.0"
38+
"@premierstacks/eslint-stack": "github:premierstacks/eslint-stack#semver:^3.0",
39+
"@premierstacks/prettier-stack": "github:premierstacks/prettier-stack#semver:^3.0"
4040
},
4141
"type": "module",
4242
"sideEffects": false,
43+
"main": "./src/index.js",
4344
"scripts": {
44-
"check": "npm run lint && npm run dependencies",
45+
"check": "npm run lint && npm run security",
4546
"clean": "npm run clean:npm",
4647
"clean:npm": "git clean -xfd ./node_modules ./package-lock.json",
4748
"commit": "npm run local && npm run fix && npm run check",
48-
"dependencies": "npm run npm:audit",
49+
"security": "npm run npm:audit",
4950
"fix": "npm run fix:eslint && npm run fix:prettier",
5051
"fix:eslint": "eslint --fix .",
5152
"fix:prettier": "prettier -w .",
@@ -54,7 +55,7 @@
5455
"lint:prettier": "prettier -c .",
5556
"local": "npm run npm:install",
5657
"npm:audit": "npm audit --audit-level info --include prod --include dev --include peer --include optional",
57-
"npm:install": "npm install --install-links --include prod --include dev --include peer --include optional",
58-
"npm:update": "npm update --install-links --include prod --include dev --include peer --include optional"
58+
"npm:install": "npm install --install-links --include prod --include dev --include peer --include optional --ignore-scripts",
59+
"npm:update": "npm update --install-links --include prod --include dev --include peer --include optional --ignore-scripts"
5960
}
6061
}

prettier.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @author Tomáš Chochola <chocholatom1997@gmail.com>
44
* @copyright © 2025 Tomáš Chochola <chocholatom1997@gmail.com>
55
*
6-
*@license Apache-2.0
6+
* @license Apache-2.0
77
*
88
* @see {@link http://www.apache.org/licenses/LICENSE-2.0} License
99
* @see {@link https://github.com/tomchochola} GitHub Personal

src/index.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* @file
3+
* @author Tomáš Chochola <chocholatom1997@gmail.com>
4+
* @copyright © 2025 Tomáš Chochola <chocholatom1997@gmail.com>
5+
*
6+
* @license Apache-2.0
7+
*
8+
* @see {@link http://www.apache.org/licenses/LICENSE-2.0} License
9+
* @see {@link https://github.com/tomchochola} GitHub Personal
10+
* @see {@link https://github.com/premierstacks} GitHub Organization
11+
* @see {@link https://github.com/sponsors/tomchochola} GitHub Sponsors
12+
*/
13+
14+
export { default as browserWebpackApp } from './browser_webpack_app.json';
15+
export { default as browserWebpackBabelReactApp } from './browser_webpack_babel_react_app.json';
16+
export { default as browserWebpackLibrary } from './browser_webpack_library.json';
17+
export { default as browserWebpackReactApp } from './browser_webpack_react_app.json';
18+
export { default as browserWebpackReactLibrary } from './browser_webpack_react_library.json';
19+
export { default as nodeApp } from './node_app.json';
20+
export { default as nodeWebpackApp } from './node_webpack_app.json';
21+
export { default as nodeWebpackLibrary } from './node_webpack_library.json';

templates/node_app.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "@premierstacks/typescript-stack/src/node_app.json",
3+
"include": ["./src/**/*"],
4+
"compilerOptions": {
5+
"outDir": "./dist",
6+
"rootDir": "./src"
7+
}
8+
}

0 commit comments

Comments
 (0)