Skip to content

Commit 7ef9cc4

Browse files
committed
Security fix disable dependencies scripts
1 parent 4b73adb commit 7ef9cc4

5 files changed

Lines changed: 16 additions & 12 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
@@ -37,18 +37,17 @@
3737
"postcss-preset-env": "^10.1.6"
3838
},
3939
"devDependencies": {
40-
"@premierstacks/eslint-stack": "github:premierstacks/eslint-stack#semver:^2.0",
41-
"@premierstacks/prettier-stack": "github:premierstacks/prettier-stack#semver:^2.0"
40+
"@premierstacks/eslint-stack": "github:premierstacks/eslint-stack#semver:^3.0",
41+
"@premierstacks/prettier-stack": "github:premierstacks/prettier-stack#semver:^3.0"
4242
},
4343
"type": "module",
4444
"sideEffects": false,
4545
"main": "./src/index.js",
4646
"scripts": {
47-
"check": "npm run lint && npm run dependencies",
47+
"check": "npm run lint && npm run security",
4848
"clean": "npm run clean:npm",
4949
"clean:npm": "git clean -xfd ./node_modules ./package-lock.json",
5050
"commit": "npm run local && npm run fix && npm run check",
51-
"dependencies": "npm run npm:audit",
5251
"fix": "npm run fix:eslint && npm run fix:prettier",
5352
"fix:eslint": "eslint --fix .",
5453
"fix:prettier": "prettier -w .",
@@ -57,7 +56,8 @@
5756
"lint:prettier": "prettier -c .",
5857
"local": "npm run npm:install",
5958
"npm:audit": "npm audit --audit-level info --include prod --include dev --include peer --include optional",
60-
"npm:install": "npm install --install-links --include prod --include dev --include peer --include optional",
61-
"npm:update": "npm update --install-links --include prod --include dev --include peer --include optional"
59+
"npm:install": "npm install --install-links --include prod --include dev --include peer --include optional --ignore-scripts",
60+
"npm:update": "npm update --install-links --include prod --include dev --include peer --include optional --ignore-scripts",
61+
"security": "npm run npm:audit"
6262
}
6363
}

src/stylex.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ import { createPostcssConfigBase } from './base.js';
1515

1616
const def = {
1717
include: ['./src/**/*.{tsx,mts,ts,cts,jsx,mjs,js,cjs}'],
18+
useCSSLayers: true,
1819
};
1920

20-
export function createPostcssConfigStylex(options = def) {
21-
return applyPostcssPluginStylex(createPostcssConfigBase(), options);
22-
}
23-
2421
export function applyPostcssPluginStylex(config, options = def) {
2522
config.plugins = config.plugins ?? [];
2623

2724
config.plugins.unshift(['@stylexjs/postcss-plugin', { ...def, ...options }]);
2825

2926
return config;
3027
}
28+
29+
export function createPostcssConfigStylex(options = def) {
30+
return applyPostcssPluginStylex(createPostcssConfigBase(), options);
31+
}

templates/stylex.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ import { createPostcssConfigStylex } from '@premierstacks/postcss-stack';
22

33
export default createPostcssConfigStylex({
44
include: ['./src/**/*.{tsx,mts,ts,cts,jsx,mjs,js,cjs}'],
5+
useCSSLayers: true,
56
});

0 commit comments

Comments
 (0)