Skip to content

Commit

Permalink
build: use oxlint --rules --format=json for building rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Sysix committed Dec 19, 2024
1 parent 3ec841f commit 47d8469
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions scripts/traverse-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ function fixScopeOfRule(rule: Rule): void {
}

function fixValueOfRule(rule: Rule): void {
if (rule.scope !== 'eslint') {
const scope =
rule.scope in aliasPluginNames
? aliasPluginNames[rule.scope]
: rule.scope;

rule.value = `${scope}/${rule.value}`;
if (rule.scope === 'eslint') {
return;
}

const scope =
rule.scope in aliasPluginNames ? aliasPluginNames[rule.scope] : rule.scope;

rule.value = `${scope}/${rule.value}`;
}

export function traverseRules(): Rule[] {
Expand Down
2 changes: 1 addition & 1 deletion src/generated/rules-by-category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ const styleRules = {
'func-names': 'off',
'guard-for-in': 'off',
'max-params': 'off',
'no-restricted-imports': 'off',
'no-duplicate-imports': 'off',
'no-continue': 'off',
'no-label-var': 'off',
Expand All @@ -163,6 +162,7 @@ const styleRules = {
'sort-keys': 'off',
yoda: 'off',
'import/first': 'off',
'import/no-named-default': 'off',
'import/no-namespace': 'off',
'jest/consistent-test-it': 'off',
'jest/max-expects': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/generated/rules-by-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const eslintRules = {
'max-classes-per-file': 'off',
'max-lines': 'off',
'max-params': 'off',
'no-restricted-imports': 'off',
'no-object-constructor': 'off',
'no-duplicate-imports': 'off',
'no-alert': 'off',
Expand Down Expand Up @@ -122,6 +121,7 @@ const eslintRules = {
const importRules = {
'import/default': 'off',
'import/first': 'off',
'import/no-named-default': 'off',
'import/no-namespace': 'off',
'import/max-dependencies': 'off',
'import/named': 'off',
Expand Down

0 comments on commit 47d8469

Please sign in to comment.