Skip to content

Commit afeaf37

Browse files
authored
QA: eslint plugins (#208)
* chore: remove unused eslint plugins * style: sort imports * chore: adjust node-type deps * chore: bump deps * docs: wrote HISTORY * style: rename internal symbol Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 2771b7b commit afeaf37

30 files changed

+220
-92
lines changed

.eslintrc.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
2424
*/
2525
module.exports = {
2626
root: true,
27-
// see https://github.com/standard/ts-standard
27+
/** @see https://github.com/standard/ts-standard */
2828
extends: 'standard-with-typescript',
2929
parserOptions: {
3030
project: './tsconfig.json'
3131
},
32+
plugins: [
33+
'simple-import-sort'
34+
],
3235
env: {
3336
commonjs: true,
3437
browser: true,
@@ -47,5 +50,15 @@ module.exports = {
4750
browser: false // change, when mocha is enabled for browser
4851
}
4952
}
50-
]
53+
],
54+
rules: {
55+
// region sort imports/exports
56+
/** disable other sorters in favour of `simple-import-sort` **/
57+
'import/order': 0,
58+
'sort-imports': 0,
59+
/** @see https://github.com/lydell/eslint-plugin-simple-import-sort/ */
60+
'simple-import-sort/imports': 'error',
61+
'simple-import-sort/exports': 'error'
62+
// endregion sort imports/exports
63+
}
5164
}

HISTORY.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
## unreleased
66

7+
* Misc
8+
* Style: imports are sorted, now. (via [#208])
79
* Dependencies
810
* Widened the range of requirement `packageurl-js` to `>=0.0.6 <0.0.8 || ^1`, was `>=0.0.6 <0.0.8`. (via [#210])
911

10-
* [#210]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/210
12+
[#208]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/208
13+
[#210]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/210
1114

1215
## 1.4.0 - 2022-09-07
1316

libs/universal-node-xml/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ SPDX-License-Identifier: Apache-2.0
1717
Copyright (c) OWASP Foundation. All Rights Reserved.
1818
*/
1919

20-
import { SimpleXml } from '../../src/serialize/xml/types'
2120
import { SerializerOptions } from '../../src/serialize/types'
21+
import { SimpleXml } from '../../src/serialize/xml/types'
2222

2323
declare type ThrowError = () => never
2424

0 commit comments

Comments
 (0)