-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): output rules for flat config in dts file
- Loading branch information
Showing
6 changed files
with
159 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,110 @@ | ||
// These rules are automatically generated by scripts/generate-rules.ts | ||
|
||
import * as rules from "./rules-by-category.js"; | ||
import * as rules from './rules-by-category.js'; | ||
|
||
const pedanticConfig = { | ||
name: 'oxlint/pedantic', | ||
rules: rules.pedanticRules, | ||
} as const; | ||
name: 'oxlint/pedantic', | ||
rules: rules.pedanticRules, | ||
}; | ||
|
||
const nurseryConfig = { | ||
name: 'oxlint/nursery', | ||
rules: rules.nurseryRules, | ||
} as const; | ||
name: 'oxlint/nursery', | ||
rules: rules.nurseryRules, | ||
}; | ||
|
||
const restrictionConfig = { | ||
name: 'oxlint/restriction', | ||
rules: rules.restrictionRules, | ||
} as const; | ||
name: 'oxlint/restriction', | ||
rules: rules.restrictionRules, | ||
}; | ||
|
||
const styleConfig = { | ||
name: 'oxlint/style', | ||
rules: rules.styleRules, | ||
} as const; | ||
name: 'oxlint/style', | ||
rules: rules.styleRules, | ||
}; | ||
|
||
const conditionalFixConfig = { | ||
name: 'oxlint/conditional-fix', | ||
rules: rules.conditionalFixRules, | ||
} as const; | ||
name: 'oxlint/conditional-fix', | ||
rules: rules.conditionalFixRules, | ||
}; | ||
|
||
const dangerousFixConfig = { | ||
name: 'oxlint/dangerous-fix', | ||
rules: rules.dangerousFixRules, | ||
} as const; | ||
name: 'oxlint/dangerous-fix', | ||
rules: rules.dangerousFixRules, | ||
}; | ||
|
||
const conditionalFixSuggestionConfig = { | ||
name: 'oxlint/conditional-fix-suggestion', | ||
rules: rules.conditionalFixSuggestionRules, | ||
} as const; | ||
name: 'oxlint/conditional-fix-suggestion', | ||
rules: rules.conditionalFixSuggestionRules, | ||
}; | ||
|
||
const pendingConfig = { | ||
name: 'oxlint/pending', | ||
rules: rules.pendingRules, | ||
} as const; | ||
name: 'oxlint/pending', | ||
rules: rules.pendingRules, | ||
}; | ||
|
||
const correctnessConfig = { | ||
name: 'oxlint/correctness', | ||
rules: rules.correctnessRules, | ||
} as const; | ||
name: 'oxlint/correctness', | ||
rules: rules.correctnessRules, | ||
}; | ||
|
||
const perfConfig = { | ||
name: 'oxlint/perf', | ||
rules: rules.perfRules, | ||
} as const; | ||
name: 'oxlint/perf', | ||
rules: rules.perfRules, | ||
}; | ||
|
||
const conditionalSuggestionFixConfig = { | ||
name: 'oxlint/conditional-suggestion-fix', | ||
rules: rules.conditionalSuggestionFixRules, | ||
} as const; | ||
name: 'oxlint/conditional-suggestion-fix', | ||
rules: rules.conditionalSuggestionFixRules, | ||
}; | ||
|
||
const fixConfig = { | ||
name: 'oxlint/fix', | ||
rules: rules.fixRules, | ||
} as const; | ||
name: 'oxlint/fix', | ||
rules: rules.fixRules, | ||
}; | ||
|
||
const suggestionConfig = { | ||
name: 'oxlint/suggestion', | ||
rules: rules.suggestionRules, | ||
} as const; | ||
name: 'oxlint/suggestion', | ||
rules: rules.suggestionRules, | ||
}; | ||
|
||
const fixDangerousConfig = { | ||
name: 'oxlint/fix-dangerous', | ||
rules: rules.fixDangerousRules, | ||
} as const; | ||
name: 'oxlint/fix-dangerous', | ||
rules: rules.fixDangerousRules, | ||
}; | ||
|
||
const suspiciousConfig = { | ||
name: 'oxlint/suspicious', | ||
rules: rules.suspiciousRules, | ||
} as const; | ||
name: 'oxlint/suspicious', | ||
rules: rules.suspiciousRules, | ||
}; | ||
|
||
const conditionalSuggestionConfig = { | ||
name: 'oxlint/conditional-suggestion', | ||
rules: rules.conditionalSuggestionRules, | ||
} as const; | ||
name: 'oxlint/conditional-suggestion', | ||
rules: rules.conditionalSuggestionRules, | ||
}; | ||
|
||
const dangerousSuggestionConfig = { | ||
name: 'oxlint/dangerous-suggestion', | ||
rules: rules.dangerousSuggestionRules, | ||
} as const; | ||
|
||
export { | ||
pedanticConfig as "flat/pedantic", | ||
nurseryConfig as "flat/nursery", | ||
restrictionConfig as "flat/restriction", | ||
styleConfig as "flat/style", | ||
conditionalFixConfig as "flat/conditional-fix", | ||
dangerousFixConfig as "flat/dangerous-fix", | ||
conditionalFixSuggestionConfig as "flat/conditional-fix-suggestion", | ||
pendingConfig as "flat/pending", | ||
correctnessConfig as "flat/correctness", | ||
perfConfig as "flat/perf", | ||
conditionalSuggestionFixConfig as "flat/conditional-suggestion-fix", | ||
fixConfig as "flat/fix", | ||
suggestionConfig as "flat/suggestion", | ||
fixDangerousConfig as "flat/fix-dangerous", | ||
suspiciousConfig as "flat/suspicious", | ||
conditionalSuggestionConfig as "flat/conditional-suggestion", | ||
dangerousSuggestionConfig as "flat/dangerous-suggestion" | ||
} | ||
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/dangerous-fix': dangerousFixConfig, | ||
'flat/conditional-fix-suggestion': conditionalFixSuggestionConfig, | ||
'flat/pending': pendingConfig, | ||
'flat/correctness': correctnessConfig, | ||
'flat/perf': perfConfig, | ||
'flat/conditional-suggestion-fix': conditionalSuggestionFixConfig, | ||
'flat/fix': fixConfig, | ||
'flat/suggestion': suggestionConfig, | ||
'flat/fix-dangerous': fixDangerousConfig, | ||
'flat/suspicious': suspiciousConfig, | ||
'flat/conditional-suggestion': conditionalSuggestionConfig, | ||
'flat/dangerous-suggestion': dangerousSuggestionConfig, | ||
}; | ||
|
||
export default configByCategory; |
Oops, something went wrong.