Skip to content

Commit 3a79c58

Browse files
committed
Merge branch 'main' into add-sbom
2 parents 3cd83e9 + 3d9e7ba commit 3a79c58

File tree

20 files changed

+1438
-566
lines changed

20 files changed

+1438
-566
lines changed

.dep-stats.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"@socketregistry/indent-string": "^1.0.9",
99
"@socketregistry/is-interactive": "^1.0.1",
1010
"@socketregistry/is-unicode-supported": "^1.0.0",
11+
"@socketregistry/packageurl-js": "^1.0.2",
1112
"@socketsecurity/config": "^2.1.3",
12-
"@socketsecurity/registry": "^1.0.82",
13+
"@socketsecurity/registry": "^1.0.85",
1314
"@socketsecurity/sdk": "^1.4.5",
1415
"blessed": "^0.1.81",
1516
"blessed-contrib": "^4.11.0",

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ Thumbs.db
44
/.env
55
/.nvm
66
/.tap
7+
/.type-coverage
78
/.vscode
89
/coverage
910
/npm-debug.log
1011
**/dist
11-
**/dist-legacy
1212
**/node_modules
1313
/*.tsbuildinfo
1414
*.d.ts
1515
*.d.ts.map
1616

1717
!/.vscode/extensions.json
18-
/test/socket-npm-fixtures/**/node_modules/

.husky/pre-commit

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
npm test
1+
if [ -z "${DISABLE_PRECOMMIT_LINT}" ]; then
2+
npm run lint-staged
3+
else
4+
echo "Skipping lint due to DISABLE_PRECOMMIT_LINT env var"
5+
fi
6+
7+
if [ -z "${DISABLE_PRECOMMIT_TEST}" ]; then
8+
npm test
9+
else
10+
echo "Skipping testing due to DISABLE_PRECOMMIT_TEST env var"
11+
fi

.oxlintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock.json

.prettierignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

biome.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"files": {
4+
"ignore": [
5+
"**/.*",
6+
"**/coverage",
7+
"**/dist",
8+
"**/package.json",
9+
"**/package-lock.json"
10+
],
11+
"maxSize": 5242880
12+
},
13+
"formatter": {
14+
"enabled": true,
15+
"attributePosition": "auto",
16+
"bracketSpacing": true,
17+
"formatWithErrors": false,
18+
"indentStyle": "space",
19+
"indentWidth": 2,
20+
"lineEnding": "lf",
21+
"lineWidth": 80,
22+
"useEditorconfig": true
23+
},
24+
"javascript": {
25+
"formatter": {
26+
"arrowParentheses": "asNeeded",
27+
"attributePosition": "auto",
28+
"bracketSameLine": false,
29+
"bracketSpacing": true,
30+
"jsxQuoteStyle": "double",
31+
"quoteProperties": "asNeeded",
32+
"quoteStyle": "single",
33+
"semicolons": "asNeeded",
34+
"trailingCommas": "none"
35+
}
36+
},
37+
"json": {
38+
"formatter": {
39+
"enabled": true,
40+
"trailingCommas": "none"
41+
},
42+
"parser": {
43+
"allowComments": true,
44+
"allowTrailingCommas": true
45+
}
46+
}
47+
}

eslint.config.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
const path = require('node:path')
44

5-
const { includeIgnoreFile } = require('@eslint/compat')
5+
const {
6+
convertIgnorePatternToMinimatch,
7+
includeIgnoreFile
8+
} = require('@eslint/compat')
69
const js = require('@eslint/js')
710
const tsParser = require('@typescript-eslint/parser')
811
const { createOxcImportResolver } = require('eslint-import-resolver-oxc')
@@ -13,15 +16,17 @@ const unicornPlugin = require('eslint-plugin-unicorn')
1316
const tsEslint = require('typescript-eslint')
1417

1518
const constants = require('@socketsecurity/registry/lib/constants')
16-
const { GIT_IGNORE, LATEST, PRETTIER_IGNORE, TSCONFIG_JSON } = constants
19+
const { BIOME_JSON, GIT_IGNORE, LATEST, TSCONFIG_JSON } = constants
1720

1821
const { flatConfigs: origImportXFlatConfigs } = importXPlugin
1922

2023
const rootPath = __dirname
2124
const rootTsConfigPath = path.join(rootPath, TSCONFIG_JSON)
2225

26+
const biomeConfigPath = path.join(rootPath, BIOME_JSON)
2327
const gitignorePath = path.join(rootPath, GIT_IGNORE)
24-
const prettierignorePath = path.join(rootPath, PRETTIER_IGNORE)
28+
29+
const biomeConfig = require(biomeConfigPath)
2530

2631
const sharedPlugins = {
2732
'sort-destructure-keys': sortDestructureKeysPlugin,
@@ -112,7 +117,10 @@ const importFlatConfigsForModule = getImportXFlatConfigs(true)
112117

113118
module.exports = [
114119
includeIgnoreFile(gitignorePath),
115-
includeIgnoreFile(prettierignorePath),
120+
{
121+
name: 'Imported biome.json ignore patterns',
122+
ignores: biomeConfig.files.ignore.map(convertIgnorePatternToMinimatch)
123+
},
116124
{
117125
files: ['**/*.{c,}js'],
118126
...importFlatConfigsForScript.recommended

0 commit comments

Comments
 (0)