Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: generate code #202

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/__snapshots__/rules-by-scope.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,9 @@ exports[`contains all the oxlint rules 1`] = `
"node/no-exports-assign": [
0,
],
"node/no-new-require": [
0,
],
"nonblock-statement-body-position": [
0,
],
Expand Down Expand Up @@ -1431,7 +1434,7 @@ exports[`contains all the oxlint rules 1`] = `
0,
],
"unicorn/consistent-empty-array-spread": [
2,
0,
],
"unicorn/consistent-existence-index-check": [
2,
Expand Down Expand Up @@ -1677,7 +1680,7 @@ exports[`contains all the oxlint rules 1`] = `
0,
],
"unicorn/prefer-math-min-max": [
2,
0,
],
"unicorn/prefer-math-trunc": [
0,
Expand Down
48 changes: 0 additions & 48 deletions src/configs-by-category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,6 @@ const styleConfig = {
rules: rules.styleRules,
};

const conditionalFixConfig = {
name: 'oxlint/conditional-fix',
rules: rules.conditionalFixRules,
};

const fixDangerousConfig = {
name: 'oxlint/fix-dangerous',
rules: rules.fixDangerousRules,
};

const conditionalFixSuggestionConfig = {
name: 'oxlint/conditional-fix-suggestion',
rules: rules.conditionalFixSuggestionRules,
};

const pendingConfig = {
name: 'oxlint/pending',
rules: rules.pendingRules,
};

const correctnessConfig = {
name: 'oxlint/correctness',
rules: rules.correctnessRules,
Expand All @@ -52,47 +32,19 @@ const perfConfig = {
rules: rules.perfRules,
};

const fixConfig = {
name: 'oxlint/fix',
rules: rules.fixRules,
};

const suggestionConfig = {
name: 'oxlint/suggestion',
rules: rules.suggestionRules,
};

const suspiciousConfig = {
name: 'oxlint/suspicious',
rules: rules.suspiciousRules,
};

const conditionalSuggestionConfig = {
name: 'oxlint/conditional-suggestion',
rules: rules.conditionalSuggestionRules,
};

const dangerousSuggestionConfig = {
name: 'oxlint/dangerous-suggestion',
rules: rules.dangerousSuggestionRules,
};

const configByCategory = {
'flat/pedantic': pedanticConfig,
'flat/nursery': nurseryConfig,
'flat/restriction': restrictionConfig,
'flat/style': styleConfig,
'flat/conditional-fix': conditionalFixConfig,
'flat/fix-dangerous': fixDangerousConfig,
'flat/conditional-fix-suggestion': conditionalFixSuggestionConfig,
'flat/pending': pendingConfig,
'flat/correctness': correctnessConfig,
'flat/perf': perfConfig,
'flat/fix': fixConfig,
'flat/suggestion': suggestionConfig,
'flat/suspicious': suspiciousConfig,
'flat/conditional-suggestion': conditionalSuggestionConfig,
'flat/dangerous-suggestion': dangerousSuggestionConfig,
};

export default configByCategory;
Loading