Skip to content

Commit 897ef86

Browse files
committed
Update deps and linting
1 parent ba1dcd3 commit 897ef86

23 files changed

+310
-246
lines changed

.dep-stats.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"@apideck/better-ajv-errors": "^0.3.6",
4-
"@cyclonedx/cdxgen": "^10.10.7",
4+
"@cyclonedx/cdxgen": "^10.11.0",
55
"@inquirer/prompts": "^7.0.1",
66
"@npmcli/package-json": "6.0.1",
77
"@npmcli/promise-spawn": "^8.0.2",
@@ -78,7 +78,7 @@
7878
},
7979
"external": {
8080
"@apideck/better-ajv-errors": "^0.3.6",
81-
"@cyclonedx/cdxgen": "^10.10.7",
81+
"@cyclonedx/cdxgen": "^10.11.0",
8282
"@inquirer/prompts": "^7.0.1",
8383
"@npmcli/package-json": "6.0.1",
8484
"@npmcli/promise-spawn": "^8.0.2",

.oxlintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["import", "promise", "typescript", "unicorn"],
4+
"categories": {
5+
"correctness": "warn",
6+
"perf": "warn",
7+
"suspicious": "warn"
8+
},
29
"settings": {},
310
"rules": {
411
"@typescript-eslint/no-misused-new": ["deny"],

eslint.config.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,31 @@
22

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

5-
const eslintPluginUnicorn = require('eslint-plugin-unicorn')
65
const { includeIgnoreFile } = require('@eslint/compat')
76
const js = require('@eslint/js')
87
const nodePlugin = require('eslint-plugin-n')
8+
const sortDestructureKeysPlugin = require('eslint-plugin-sort-destructure-keys')
9+
const unicornPlugin = require('eslint-plugin-unicorn')
910
const tsEslint = require('typescript-eslint')
1011
const tsParser = require('@typescript-eslint/parser')
1112

1213
const gitignorePath = path.resolve(__dirname, '.gitignore')
1314
const prettierignorePath = path.resolve(__dirname, '.prettierignore')
1415

1516
const sharedPlugins = {
16-
unicorn: eslintPluginUnicorn
17+
'sort-destructure-keys': sortDestructureKeysPlugin,
18+
unicorn: unicornPlugin
1719
}
1820

1921
const sharedRules = {
2022
'no-await-in-loop': ['error'],
21-
'no-empty': ['error', { allowEmptyCatch: true }],
2223
'no-control-regex': ['error'],
24+
'no-empty': ['error', { allowEmptyCatch: true }],
2325
'no-new': ['error'],
26+
'no-proto': ['error'],
2427
'no-warning-comments': ['warn', { terms: ['fixme'] }],
28+
'sort-destructure-keys/sort-destructure-keys': ['error'],
29+
'sort-imports': ['error', { ignoreDeclarationSort: true }],
2530
'unicorn/consistent-function-scoping': ['error']
2631
}
2732

@@ -49,6 +54,10 @@ module.exports = [
4954
},
5055
rules: {
5156
...sharedRules,
57+
// Define @typescript-eslint/no-extraneous-class because oxlint defines
58+
// "no-extraneous-class": ["deny"] and trying to eslint-disable it will
59+
// cause an eslint "Definition not found" error otherwise.
60+
'@typescript-eslint/no-extraneous-class': ['error'],
5261
'@typescript-eslint/no-floating-promises': ['error'],
5362
// Define @typescript-eslint/no-misused-new because oxlint defines
5463
// "no-misused-new": ["deny"] and trying to eslint-disable it will
@@ -88,6 +97,15 @@ module.exports = [
8897
rules: {
8998
...js.configs.recommended.rules,
9099
...sharedRules,
100+
'n/exports-style': ['error', 'module.exports'],
101+
// The n/no-unpublished-bin rule does does not support non-trivial glob
102+
// patterns used in package.json "files" fields. In those cases we simplify
103+
// the glob patterns used.
104+
'n/no-unpublished-bin': ['error'],
105+
'n/no-unsupported-features/es-builtins': ['error'],
106+
'n/no-unsupported-features/es-syntax': ['error'],
107+
'n/no-unsupported-features/node-builtins': ['error'],
108+
'n/prefer-node-protocol': ['error'],
91109
'no-unused-vars': [
92110
'error',
93111
{ argsIgnorePattern: '^_|^this$', ignoreRestSiblings: true }

0 commit comments

Comments
 (0)