mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-11 09:08:14 +08:00
31 lines
617 B
JavaScript
31 lines
617 B
JavaScript
import eslint_yml from "eslint-plugin-yml";
|
|
import yml_parser from "yaml-eslint-parser";
|
|
|
|
const ymlEslintConfig = {
|
|
files: ["**/*.yml", "**/*.yaml"],
|
|
plugins: {
|
|
yml: eslint_yml,
|
|
},
|
|
languageOptions: {
|
|
parser: yml_parser,
|
|
parserOptions: {
|
|
defaultYAMLVersion: "1.2",
|
|
extraFileExtensions: [".yaml", ".yml"],
|
|
},
|
|
},
|
|
rules: {
|
|
"yml/indent": ["error", 2],
|
|
"yml/key-spacing": ["error"],
|
|
"yml/quotes": [
|
|
"error",
|
|
{
|
|
prefer: "double",
|
|
avoidEscape: true,
|
|
},
|
|
],
|
|
"yml/sort-keys": ["error", "asc"],
|
|
},
|
|
};
|
|
|
|
export default ymlEslintConfig;
|