-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5907a21
commit d0ae1de
Showing
3 changed files
with
14 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
import { Linter } from "eslint"; | ||
import parser from "yaml-eslint-parser"; | ||
import { NamedESLint } from "./named-eslint.js"; | ||
import kebabCaseOrg from "./rules/kebab-case-org.js"; | ||
|
||
const plugin: NamedESLint.Plugin = { | ||
configs: { recommended: {} }, | ||
name: "tsv", | ||
rules: { | ||
[kebabCaseOrg.name]: kebabCaseOrg, | ||
}, | ||
}; | ||
|
||
const configs: Record<string, Linter.Config> = { | ||
recommended: { | ||
plugins: { | ||
[plugin.name]: plugin, | ||
}, | ||
files: ["*.yaml", "**/*.yaml"], | ||
rules: { | ||
[`${plugin.name}/${kebabCaseOrg.name}`]: "error", | ||
}, | ||
languageOptions: { | ||
parser: parser, | ||
}, | ||
plugin.configs.recommended = { | ||
plugins: { | ||
[plugin.name]: plugin, | ||
}, | ||
files: ["*.yaml", "**/*.yaml"], | ||
rules: { | ||
[`${plugin.name}/${kebabCaseOrg.name}`]: "error", | ||
}, | ||
languageOptions: { | ||
parser: parser, | ||
}, | ||
}; | ||
|
||
plugin.configs = configs; | ||
|
||
export default plugin; |
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
6 changes: 1 addition & 5 deletions
6
eng/tools/eslint-plugin-tsv/test/e2e/specification/eslint.config.ts
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,7 +1,3 @@ | ||
import eslintPluginTsv from "../../../src/eslint-plugin-tsv.js"; | ||
|
||
export const config = [ | ||
...eslintPluginTsv.configs.recommended, | ||
]; | ||
|
||
export default config; | ||
export default eslintPluginTsv.configs.recommended; |