Skip to content

Commit 5888491

Browse files
committed
Change formatting from 4 spaces to 2 spaces
1 parent a5c8c77 commit 5888491

23 files changed

+1851
-1939
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ root = true
33
[*]
44
charset = utf-8
55
end_of_line = lf
6-
indent_size = 4
6+
indent_size = 2
77
indent_style = space
88
insert_final_newline = true
99
max_line_length = 80

.prettierrc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"arrowParens": "avoid",
3-
"semi": false,
4-
"singleQuote": true,
5-
"trailingComma": "none",
6-
"proseWrap": "always"
2+
"arrowParens": "avoid",
3+
"semi": false,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"proseWrap": "always"
77
}

.travis.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: node_js
22
node_js:
3-
- lts/*
4-
- 17
5-
- 16
6-
- 15
7-
- 14
8-
- 13
9-
- 12
10-
- 11
11-
- 10
3+
- lts/*
4+
- 17
5+
- 16
6+
- 15
7+
- 14
8+
- 13
9+
- 12
10+
- 11
11+
- 10

eslint.config.js

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -18,86 +18,86 @@ const gitignorePath = path.resolve(rootPath, GIT_IGNORE)
1818
const prettierignorePath = path.resolve(rootPath, PRETTIER_IGNORE)
1919

2020
module.exports = [
21-
includeIgnoreFile(gitignorePath),
22-
includeIgnoreFile(prettierignorePath),
23-
{
24-
files: ['**/*.{c,}js'],
25-
...importXPlugin.flatConfigs.recommended,
26-
languageOptions: {
27-
...importXPlugin.flatConfigs.recommended.languageOptions,
28-
ecmaVersion: 'latest',
29-
sourceType: 'script'
30-
},
31-
rules: {
32-
...importXPlugin.flatConfigs.recommended.rules,
33-
'import-x/no-named-as-default-member': 'off',
34-
'import-x/no-unresolved': ['error', { commonjs: true }],
35-
'import-x/order': [
36-
'warn',
37-
{
38-
groups: [
39-
'builtin',
40-
'external',
41-
'internal',
42-
['parent', 'sibling', 'index'],
43-
'type'
44-
],
45-
pathGroups: [
46-
{
47-
pattern: '@socket{registry,security}/**',
48-
group: 'internal'
49-
}
50-
],
51-
pathGroupsExcludedImportTypes: ['type'],
52-
'newlines-between': 'always',
53-
alphabetize: {
54-
order: 'asc'
55-
}
56-
}
57-
]
58-
}
21+
includeIgnoreFile(gitignorePath),
22+
includeIgnoreFile(prettierignorePath),
23+
{
24+
files: ['**/*.{c,}js'],
25+
...importXPlugin.flatConfigs.recommended,
26+
languageOptions: {
27+
...importXPlugin.flatConfigs.recommended.languageOptions,
28+
ecmaVersion: 'latest',
29+
sourceType: 'script'
5930
},
60-
{
61-
files: ['scripts/**/*.js', 'test/**/*.cjs'],
62-
...nodePlugin.configs['flat/recommended-script']
31+
rules: {
32+
...importXPlugin.flatConfigs.recommended.rules,
33+
'import-x/no-named-as-default-member': 'off',
34+
'import-x/no-unresolved': ['error', { commonjs: true }],
35+
'import-x/order': [
36+
'warn',
37+
{
38+
groups: [
39+
'builtin',
40+
'external',
41+
'internal',
42+
['parent', 'sibling', 'index'],
43+
'type'
44+
],
45+
pathGroups: [
46+
{
47+
pattern: '@socket{registry,security}/**',
48+
group: 'internal'
49+
}
50+
],
51+
pathGroupsExcludedImportTypes: ['type'],
52+
'newlines-between': 'always',
53+
alphabetize: {
54+
order: 'asc'
55+
}
56+
}
57+
]
58+
}
59+
},
60+
{
61+
files: ['scripts/**/*.js', 'test/**/*.cjs'],
62+
...nodePlugin.configs['flat/recommended-script']
63+
},
64+
{
65+
files: ['scripts/**/*.js', 'test/**/*.cjs'],
66+
plugins: {
67+
'sort-destructure-keys': sortDestructureKeysPlugin,
68+
unicorn: unicornPlugin
6369
},
64-
{
65-
files: ['scripts/**/*.js', 'test/**/*.cjs'],
66-
plugins: {
67-
'sort-destructure-keys': sortDestructureKeysPlugin,
68-
unicorn: unicornPlugin
69-
},
70-
rules: {
71-
...js.configs.recommended.rules,
72-
'n/exports-style': ['error', 'module.exports'],
73-
// The n/no-unpublished-bin rule does does not support non-trivial glob
74-
// patterns used in package.json "files" fields. In those cases we simplify
75-
// the glob patterns used.
76-
'n/no-unpublished-bin': ['error'],
77-
'n/no-unsupported-features/es-builtins': ['error'],
78-
'n/no-unsupported-features/es-syntax': ['error'],
79-
'n/no-unsupported-features/node-builtins': [
80-
'error',
81-
{
82-
ignores: ['test', 'test.describe'],
83-
// Lazily access constants.maintainedNodeVersions.
84-
version: constants.maintainedNodeVersions.previous
85-
}
86-
],
87-
'n/prefer-node-protocol': ['error'],
88-
'no-await-in-loop': ['error'],
89-
'no-control-regex': ['error'],
90-
'no-empty': ['error', { allowEmptyCatch: true }],
91-
'no-new': ['error'],
92-
'no-proto': ['error'],
93-
'no-unused-vars': [
94-
'error',
95-
{ argsIgnorePattern: '^_|^this$', ignoreRestSiblings: true }
96-
],
97-
'no-warning-comments': ['warn', { terms: ['fixme'] }],
98-
'sort-destructure-keys/sort-destructure-keys': ['error'],
99-
'sort-imports': ['error', { ignoreDeclarationSort: true }],
100-
'unicorn/consistent-function-scoping': ['error']
70+
rules: {
71+
...js.configs.recommended.rules,
72+
'n/exports-style': ['error', 'module.exports'],
73+
// The n/no-unpublished-bin rule does does not support non-trivial glob
74+
// patterns used in package.json "files" fields. In those cases we simplify
75+
// the glob patterns used.
76+
'n/no-unpublished-bin': ['error'],
77+
'n/no-unsupported-features/es-builtins': ['error'],
78+
'n/no-unsupported-features/es-syntax': ['error'],
79+
'n/no-unsupported-features/node-builtins': [
80+
'error',
81+
{
82+
ignores: ['test', 'test.describe'],
83+
// Lazily access constants.maintainedNodeVersions.
84+
version: constants.maintainedNodeVersions.previous
10185
}
86+
],
87+
'n/prefer-node-protocol': ['error'],
88+
'no-await-in-loop': ['error'],
89+
'no-control-regex': ['error'],
90+
'no-empty': ['error', { allowEmptyCatch: true }],
91+
'no-new': ['error'],
92+
'no-proto': ['error'],
93+
'no-unused-vars': [
94+
'error',
95+
{ argsIgnorePattern: '^_|^this$', ignoreRestSiblings: true }
96+
],
97+
'no-warning-comments': ['warn', { terms: ['fixme'] }],
98+
'sort-destructure-keys/sort-destructure-keys': ['error'],
99+
'sort-imports': ['error', { ignoreDeclarationSort: true }],
100+
'unicorn/consistent-function-scoping': ['error']
102101
}
102+
}
103103
]

index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ SOFTWARE.
2222
'use strict'
2323

2424
const {
25-
PackageURL,
26-
PurlComponent,
27-
PurlQualifierNames,
28-
PurlType
25+
PackageURL,
26+
PurlComponent,
27+
PurlQualifierNames,
28+
PurlType
2929
} = require('./src/package-url')
3030

3131
module.exports = {
32-
PackageURL,
33-
PurlComponent,
34-
PurlQualifierNames,
35-
PurlType
32+
PackageURL,
33+
PurlComponent,
34+
PurlQualifierNames,
35+
PurlType
3636
}

0 commit comments

Comments
 (0)