Skip to content

Commit 2e7ea15

Browse files
committed
Security fix disable dependencies scripts
1 parent 4f4dbf3 commit 2e7ea15

5 files changed

Lines changed: 18 additions & 17 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

eslint.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
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(), createEslintConfigNode(), createEslintConfigIgnoresRoot()]);

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,17 @@
4040
"core-js": "^3.41.0"
4141
},
4242
"devDependencies": {
43-
"@premierstacks/eslint-stack": "github:premierstacks/eslint-stack#semver:^2.0",
44-
"@premierstacks/prettier-stack": "github:premierstacks/prettier-stack#semver:^2.0"
43+
"@premierstacks/eslint-stack": "github:premierstacks/eslint-stack#semver:^3.0",
44+
"@premierstacks/prettier-stack": "github:premierstacks/prettier-stack#semver:^3.0"
4545
},
4646
"type": "module",
4747
"sideEffects": false,
4848
"main": "./src/index.js",
4949
"scripts": {
50-
"check": "npm run lint && npm run dependencies",
50+
"check": "npm run lint && npm run security",
5151
"clean": "npm run clean:npm",
5252
"clean:npm": "git clean -xfd ./node_modules ./package-lock.json",
5353
"commit": "npm run local && npm run fix && npm run check",
54-
"dependencies": "npm run npm:audit",
5554
"fix": "npm run fix:eslint && npm run fix:prettier",
5655
"fix:eslint": "eslint --fix .",
5756
"fix:prettier": "prettier -w .",
@@ -60,7 +59,8 @@
6059
"lint:prettier": "prettier -c .",
6160
"local": "npm run npm:install",
6261
"npm:audit": "npm audit --audit-level info --include prod --include dev --include peer --include optional",
63-
"npm:install": "npm install --install-links --include prod --include dev --include peer --include optional",
64-
"npm:update": "npm update --install-links --include prod --include dev --include peer --include optional"
62+
"npm:install": "npm install --install-links --include prod --include dev --include peer --include optional --ignore-scripts",
63+
"npm:update": "npm update --install-links --include prod --include dev --include peer --include optional --ignore-scripts",
64+
"security": "npm run npm:audit"
6565
}
6666
}

src/react.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
import { createBabelConfigTypescript } from './typescript.js';
1515

16-
export function createBabelConfigTypescriptReact() {
17-
return applyBabelPresetReact(createBabelConfigTypescript());
18-
}
19-
2016
export function applyBabelPresetReact(config) {
2117
config.presets = config.presets ?? [];
2218
config.plugins = config.plugins ?? [];
@@ -33,3 +29,7 @@ export function applyBabelPresetReact(config) {
3329

3430
return config;
3531
}
32+
33+
export function createBabelConfigTypescriptReact() {
34+
return applyBabelPresetReact(createBabelConfigTypescript());
35+
}

src/stylex.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
import { createBabelConfigTypescriptReact } from './react.js';
1515

16-
export function createBabelConfigTypescriptReactStylex() {
17-
return applyBabelPluginStylex(createBabelConfigTypescriptReact());
18-
}
19-
2016
export function applyBabelPluginStylex(config) {
2117
config.plugins = config.plugins ?? [];
2218

@@ -25,7 +21,6 @@ export function applyBabelPluginStylex(config) {
2521
{
2622
dev: process.env.NODE_ENV === 'development',
2723
runtimeInjection: false,
28-
genConditionalClasses: true,
2924
treeshakeCompensation: true,
3025
unstable_moduleResolution: {
3126
type: 'commonJS',
@@ -36,3 +31,7 @@ export function applyBabelPluginStylex(config) {
3631

3732
return config;
3833
}
34+
35+
export function createBabelConfigTypescriptReactStylex() {
36+
return applyBabelPluginStylex(createBabelConfigTypescriptReact());
37+
}

0 commit comments

Comments
 (0)