-
-
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.
build: use
oxlint --rules --format=json
for building rules (#287)
- Loading branch information
Showing
11 changed files
with
142 additions
and
655 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
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,26 +1,5 @@ | ||
import path from 'node:path'; | ||
import { aliasPluginNames } from '../src/constants.js'; | ||
|
||
const __dirname = new URL('.', import.meta.url).pathname; | ||
|
||
export const TARGET_DIRECTORY = path.resolve(__dirname, '..', '.oxc_sparse'); | ||
export const VERSION_PREFIX = 'oxlint_v'; | ||
export const SPARSE_CLONE_DIRECTORY = 'crates/oxc_linter/src'; | ||
|
||
// these are the rules that don't have a direct equivalent in the eslint rules | ||
export const ignoreScope = new Set(['oxc', 'deepscan', 'security']); | ||
|
||
// these are the rules that are not fully implemented in oxc | ||
export const ignoreCategories = new Set(['nursery']); | ||
|
||
export function convertScope(scope: string) { | ||
return Reflect.has(aliasPluginNames, scope) | ||
? aliasPluginNames[scope as 'eslint'] | ||
: scope.replace('_', '-'); | ||
} | ||
|
||
export function prefixScope(scope: string) { | ||
const _scope = convertScope(scope); | ||
|
||
return _scope ? `${_scope}/` : ''; | ||
} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.