Initial import with skill sheet working

This commit is contained in:
2024-12-04 00:11:23 +01:00
commit 9050c80ab4
4488 changed files with 671048 additions and 0 deletions

View File

@ -0,0 +1,3 @@
throw new Error(
'"prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);

21
node_modules/eslint-config-prettier/LICENSE generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2017, 2018, 2019, 2020, 2021, 2022, 2023 Simon Lydell and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

11
node_modules/eslint-config-prettier/README.md generated vendored Normal file
View File

@ -0,0 +1,11 @@
# eslint-config-prettier
Turns off all rules that are unnecessary or might conflict with [Prettier].
This lets you use your favorite shareable config without letting its stylistic choices get in the way when using Prettier.
Note that this config _only_ turns rules _off,_ so it only makes sense using it together with some other config.
[prettier]: https://github.com/prettier/prettier
**[➡️ Full readme](https://github.com/prettier/eslint-config-prettier/)**

3
node_modules/eslint-config-prettier/babel.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
throw new Error(
'"prettier/babel" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);

236
node_modules/eslint-config-prettier/bin/cli.js generated vendored Executable file
View File

@ -0,0 +1,236 @@
#!/usr/bin/env node
"use strict";
const validators = require("./validators");
const config = require("..");
const prettier = require("../prettier");
// Require locally installed eslint, for `npx eslint-config-prettier` support
// with no local eslint-config-prettier installation.
const localRequire = (request) =>
require(
require.resolve(request, {
paths: [process.cwd(), ...require.resolve.paths("eslint")],
})
);
let experimentalApi = {};
try {
experimentalApi = localRequire("eslint/use-at-your-own-risk");
// eslint-disable-next-line unicorn/prefer-optional-catch-binding
} catch (_error) {}
const { ESLint, FlatESLint = experimentalApi.FlatESLint } =
localRequire("eslint");
const SPECIAL_RULES_URL =
"https://github.com/prettier/eslint-config-prettier#special-rules";
const PRETTIER_RULES_URL =
"https://github.com/prettier/eslint-config-prettier#arrow-body-style-and-prefer-arrow-callback";
if (module === require.main) {
const args = process.argv.slice(2);
if (args.length === 0) {
console.error(help());
process.exit(1);
}
const eslint = new ESLint();
const flatESLint = FlatESLint === undefined ? undefined : new FlatESLint();
Promise.all(
args.map((file) => {
switch (process.env.ESLINT_USE_FLAT_CONFIG) {
case "true": {
return flatESLint.calculateConfigForFile(file);
}
case "false": {
return eslint.calculateConfigForFile(file);
}
default: {
// This turns synchronous errors (such as `.calculateConfigForFile` not existing)
// and turns them into promise rejections.
return Promise.resolve()
.then(() => flatESLint.calculateConfigForFile(file))
.catch(() => eslint.calculateConfigForFile(file));
}
}
})
)
.then((configs) => {
const rules = configs.flatMap(({ rules }, index) =>
Object.entries(rules).map((entry) => [...entry, args[index]])
);
const result = processRules(rules);
if (result.stderr) {
console.error(result.stderr);
}
if (result.stdout) {
console.error(result.stdout);
}
process.exit(result.code);
})
.catch((error) => {
console.error(error.message);
process.exit(1);
});
}
function help() {
return `
Usage: npx eslint-config-prettier FILE...
Resolves an ESLint configuration for every given FILE and checks if they
contain rules that are unnecessary or conflict with Prettier. Example:
npx eslint-config-prettier index.js test/index.js other/file/to/check.js
Exit codes:
0: No automatically detectable problems found.
1: General error.
2: Conflicting rules found.
For more information, see:
https://github.com/prettier/eslint-config-prettier#cli-helper-tool
`.trim();
}
function processRules(configRules) {
const regularRules = filterRules(config.rules, (_, value) => value === "off");
const optionsRules = filterRules(
config.rules,
(ruleName, value) => value === 0 && ruleName in validators
);
const specialRules = filterRules(
config.rules,
(ruleName, value) => value === 0 && !(ruleName in validators)
);
const enabledRules = configRules
.map(([ruleName, value, source]) => {
const arrayValue = Array.isArray(value) ? value : [value];
const [level, ...options] = arrayValue;
const isOff = level === "off" || level === 0;
return isOff ? null : { ruleName, options, source };
})
.filter(Boolean);
const flaggedRules = enabledRules.filter(
({ ruleName }) => ruleName in config.rules
);
const regularFlaggedRuleNames = filterRuleNames(
flaggedRules,
({ ruleName }) => ruleName in regularRules
);
const optionsFlaggedRuleNames = filterRuleNames(
flaggedRules,
({ ruleName, ...rule }) =>
ruleName in optionsRules && !validators[ruleName](rule)
);
const specialFlaggedRuleNames = filterRuleNames(
flaggedRules,
({ ruleName }) => ruleName in specialRules
);
const prettierFlaggedRuleNames = filterRuleNames(
enabledRules,
({ ruleName, source }) =>
ruleName in prettier.rules &&
enabledRules.some(
(rule) =>
rule.ruleName === "prettier/prettier" && rule.source === source
)
);
const regularMessage = [
"The following rules are unnecessary or might conflict with Prettier:",
"",
printRuleNames(regularFlaggedRuleNames),
].join("\n");
const optionsMessage = [
"The following rules are enabled with config that might conflict with Prettier. See:",
SPECIAL_RULES_URL,
"",
printRuleNames(optionsFlaggedRuleNames),
].join("\n");
const specialMessage = [
"The following rules are enabled but cannot be automatically checked. See:",
SPECIAL_RULES_URL,
"",
printRuleNames(specialFlaggedRuleNames),
].join("\n");
const prettierMessage = [
"The following rules can cause issues when using eslint-plugin-prettier at the same time.",
"Only enable them if you know what you are doing! See:",
PRETTIER_RULES_URL,
"",
printRuleNames(prettierFlaggedRuleNames),
].join("\n");
if (
regularFlaggedRuleNames.length === 0 &&
optionsFlaggedRuleNames.length === 0
) {
const message =
specialFlaggedRuleNames.length === 0 &&
prettierFlaggedRuleNames.length === 0
? "No rules that are unnecessary or conflict with Prettier were found."
: [
specialFlaggedRuleNames.length === 0 ? null : specialMessage,
prettierFlaggedRuleNames.length === 0 ? null : prettierMessage,
"Other than that, no rules that are unnecessary or conflict with Prettier were found.",
]
.filter(Boolean)
.join("\n\n");
return {
stdout: message,
code: 0,
};
}
const message = [
regularFlaggedRuleNames.length === 0 ? null : regularMessage,
optionsFlaggedRuleNames.length === 0 ? null : optionsMessage,
specialFlaggedRuleNames.length === 0 ? null : specialMessage,
prettierFlaggedRuleNames.length === 0 ? null : prettierMessage,
]
.filter(Boolean)
.join("\n\n");
return {
stdout: message,
code: 2,
};
}
function filterRules(rules, fn) {
return Object.fromEntries(
Object.entries(rules)
.filter(([ruleName, value]) => fn(ruleName, value))
.map(([ruleName]) => [ruleName, true])
);
}
function filterRuleNames(rules, fn) {
return [
...new Set(rules.filter((rule) => fn(rule)).map((rule) => rule.ruleName)),
];
}
function printRuleNames(ruleNames) {
return ruleNames
.slice()
.sort()
.map((ruleName) => `- ${ruleName}`)
.join("\n");
}
exports.processRules = processRules;

86
node_modules/eslint-config-prettier/bin/validators.js generated vendored Normal file
View File

@ -0,0 +1,86 @@
"use strict";
// These validator functions answer the question “Is the config valid?” return
// `false` if the options DO conflict with Prettier, and `true` if they dont.
module.exports = {
"curly"({ options }) {
if (options.length === 0) {
return true;
}
const firstOption = options[0];
return firstOption !== "multi-line" && firstOption !== "multi-or-nest";
},
"lines-around-comment"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return Boolean(
firstOption &&
firstOption.allowBlockStart &&
firstOption.allowBlockEnd &&
firstOption.allowObjectStart &&
firstOption.allowObjectEnd &&
firstOption.allowArrayStart &&
firstOption.allowArrayEnd
);
},
"no-confusing-arrow"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return firstOption ? firstOption.allowParens === false : false;
},
"no-tabs"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return Boolean(firstOption && firstOption.allowIndentationTabs);
},
"unicorn/template-indent"({ options }) {
if (options.length === 0) {
return false;
}
const { comments = [], tags = [] } = options[0] || {};
return (
Array.isArray(comments) &&
Array.isArray(tags) &&
!(
comments.includes("GraphQL") ||
comments.includes("HTML") ||
tags.includes("css") ||
tags.includes("graphql") ||
tags.includes("gql") ||
tags.includes("html") ||
tags.includes("markdown") ||
tags.includes("md")
)
);
},
"vue/html-self-closing"({ options }) {
if (options.length === 0) {
return false;
}
const firstOption = options[0];
return Boolean(
firstOption && firstOption.html && firstOption.html.void === "any"
// Enable when Prettier supports SVG: https://github.com/prettier/prettier/issues/5322
// && firstOption.svg === "any"
);
},
};

3
node_modules/eslint-config-prettier/flowtype.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
throw new Error(
'"prettier/flowtype" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);

217
node_modules/eslint-config-prettier/index.js generated vendored Normal file
View File

@ -0,0 +1,217 @@
"use strict";
const includeDeprecated = !process.env.ESLINT_CONFIG_PRETTIER_NO_DEPRECATED;
const specialRule = 0;
module.exports = {
rules: {
// The following rules can be used in some cases. See the README for more
// information. These are marked with `0` instead of `"off"` so that a
// script can distinguish them. Note that there are a few more of these
// in the deprecated section below.
"curly": specialRule,
"no-unexpected-multiline": specialRule,
"@typescript-eslint/lines-around-comment": specialRule,
"@typescript-eslint/quotes": specialRule,
"babel/quotes": specialRule,
"unicorn/template-indent": specialRule,
"vue/html-self-closing": specialRule,
"vue/max-len": specialRule,
// The rest are rules that you never need to enable when using Prettier.
"@babel/object-curly-spacing": "off",
"@babel/semi": "off",
"@typescript-eslint/block-spacing": "off",
"@typescript-eslint/brace-style": "off",
"@typescript-eslint/comma-dangle": "off",
"@typescript-eslint/comma-spacing": "off",
"@typescript-eslint/func-call-spacing": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/key-spacing": "off",
"@typescript-eslint/keyword-spacing": "off",
"@typescript-eslint/member-delimiter-style": "off",
"@typescript-eslint/no-extra-parens": "off",
"@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/object-curly-spacing": "off",
"@typescript-eslint/semi": "off",
"@typescript-eslint/space-before-blocks": "off",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/space-infix-ops": "off",
"@typescript-eslint/type-annotation-spacing": "off",
"babel/object-curly-spacing": "off",
"babel/semi": "off",
"flowtype/boolean-style": "off",
"flowtype/delimiter-dangle": "off",
"flowtype/generic-spacing": "off",
"flowtype/object-type-curly-spacing": "off",
"flowtype/object-type-delimiter": "off",
"flowtype/quotes": "off",
"flowtype/semi": "off",
"flowtype/space-after-type-colon": "off",
"flowtype/space-before-generic-bracket": "off",
"flowtype/space-before-type-colon": "off",
"flowtype/union-intersection-spacing": "off",
"react/jsx-child-element-spacing": "off",
"react/jsx-closing-bracket-location": "off",
"react/jsx-closing-tag-location": "off",
"react/jsx-curly-newline": "off",
"react/jsx-curly-spacing": "off",
"react/jsx-equals-spacing": "off",
"react/jsx-first-prop-new-line": "off",
"react/jsx-indent": "off",
"react/jsx-indent-props": "off",
"react/jsx-max-props-per-line": "off",
"react/jsx-newline": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-multi-spaces": "off",
"react/jsx-tag-spacing": "off",
"react/jsx-wrap-multilines": "off",
"standard/array-bracket-even-spacing": "off",
"standard/computed-property-even-spacing": "off",
"standard/object-curly-even-spacing": "off",
"unicorn/empty-brace-spaces": "off",
"unicorn/no-nested-ternary": "off",
"unicorn/number-literal-case": "off",
"vue/array-bracket-newline": "off",
"vue/array-bracket-spacing": "off",
"vue/array-element-newline": "off",
"vue/arrow-spacing": "off",
"vue/block-spacing": "off",
"vue/block-tag-newline": "off",
"vue/brace-style": "off",
"vue/comma-dangle": "off",
"vue/comma-spacing": "off",
"vue/comma-style": "off",
"vue/dot-location": "off",
"vue/func-call-spacing": "off",
"vue/html-closing-bracket-newline": "off",
"vue/html-closing-bracket-spacing": "off",
"vue/html-end-tags": "off",
"vue/html-indent": "off",
"vue/html-quotes": "off",
"vue/key-spacing": "off",
"vue/keyword-spacing": "off",
"vue/max-attributes-per-line": "off",
"vue/multiline-html-element-content-newline": "off",
"vue/multiline-ternary": "off",
"vue/mustache-interpolation-spacing": "off",
"vue/no-extra-parens": "off",
"vue/no-multi-spaces": "off",
"vue/no-spaces-around-equal-signs-in-attribute": "off",
"vue/object-curly-newline": "off",
"vue/object-curly-spacing": "off",
"vue/object-property-newline": "off",
"vue/operator-linebreak": "off",
"vue/quote-props": "off",
"vue/script-indent": "off",
"vue/singleline-html-element-content-newline": "off",
"vue/space-in-parens": "off",
"vue/space-infix-ops": "off",
"vue/space-unary-ops": "off",
"vue/template-curly-spacing": "off",
...(includeDeprecated && {
// Removed in version 0.10.0.
// https://eslint.org/docs/latest/rules/space-unary-word-ops
"space-unary-word-ops": "off",
// Removed in version 1.0.0.
// https://github.com/eslint/eslint/issues/1898
"generator-star": "off",
"no-comma-dangle": "off",
"no-reserved-keys": "off",
"no-space-before-semi": "off",
"no-wrap-func": "off",
"space-after-function-name": "off",
"space-before-function-parentheses": "off",
"space-in-brackets": "off",
// Removed in version 2.0.0.
// https://github.com/eslint/eslint/issues/5032
"no-arrow-condition": "off",
"space-after-keywords": "off",
"space-before-keywords": "off",
"space-return-throw-case": "off",
// Deprecated since version 3.3.0.
// https://eslint.org/docs/rules/no-spaced-func
"no-spaced-func": "off",
// Deprecated since version 4.0.0.
// https://github.com/eslint/eslint/pull/8286
"indent-legacy": "off",
// Deprecated since version 8.53.0.
// https://eslint.org/blog/2023/10/deprecating-formatting-rules/
"array-bracket-newline": "off",
"array-bracket-spacing": "off",
"array-element-newline": "off",
"arrow-parens": "off",
"arrow-spacing": "off",
"block-spacing": "off",
"brace-style": "off",
"comma-dangle": "off",
"comma-spacing": "off",
"comma-style": "off",
"computed-property-spacing": "off",
"dot-location": "off",
"eol-last": "off",
"func-call-spacing": "off",
"function-call-argument-newline": "off",
"function-paren-newline": "off",
"generator-star-spacing": "off",
"implicit-arrow-linebreak": "off",
"indent": "off",
"jsx-quotes": "off",
"key-spacing": "off",
"keyword-spacing": "off",
"linebreak-style": "off",
"lines-around-comment": specialRule,
"max-len": specialRule,
"max-statements-per-line": "off",
"multiline-ternary": "off",
"new-parens": "off",
"newline-per-chained-call": "off",
"no-confusing-arrow": specialRule,
"no-extra-parens": "off",
"no-extra-semi": "off",
"no-floating-decimal": "off",
"no-mixed-operators": specialRule,
"no-mixed-spaces-and-tabs": "off",
"no-multi-spaces": "off",
"no-multiple-empty-lines": "off",
"no-tabs": specialRule,
"no-trailing-spaces": "off",
"no-whitespace-before-property": "off",
"nonblock-statement-body-position": "off",
"object-curly-newline": "off",
"object-curly-spacing": "off",
"object-property-newline": "off",
"one-var-declaration-per-line": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"quote-props": "off",
"quotes": specialRule,
"rest-spread-spacing": "off",
"semi": "off",
"semi-spacing": "off",
"semi-style": "off",
"space-before-blocks": "off",
"space-before-function-paren": "off",
"space-in-parens": "off",
"space-infix-ops": "off",
"space-unary-ops": "off",
"switch-colon-spacing": "off",
"template-curly-spacing": "off",
"template-tag-spacing": "off",
"wrap-iife": "off",
"wrap-regex": "off",
"yield-star-spacing": "off",
// Deprecated since version 7.0.0.
// https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
"react/jsx-space-before-closing": "off",
}),
},
};

13
node_modules/eslint-config-prettier/package.json generated vendored Normal file
View File

@ -0,0 +1,13 @@
{
"name": "eslint-config-prettier",
"version": "9.1.0",
"license": "MIT",
"author": "Simon Lydell",
"description": "Turns off all rules that are unnecessary or might conflict with Prettier.",
"repository": "prettier/eslint-config-prettier",
"bin": "bin/cli.js",
"keywords": ["eslint", "eslintconfig", "prettier"],
"peerDependencies": {
"eslint": ">=7.0.0"
}
}

12
node_modules/eslint-config-prettier/prettier.js generated vendored Normal file
View File

@ -0,0 +1,12 @@
"use strict";
module.exports = {
rules: {
// These are safe to use as long as the `"prettier/prettier"` rule from
// eslint-plugin-prettier isnt enabled.
// These are also included in `"plugin:prettier/recommended"`:
// https://github.com/prettier/eslint-plugin-prettier#recommended-configuration
"arrow-body-style": 0,
"prefer-arrow-callback": 0,
},
};

3
node_modules/eslint-config-prettier/react.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
throw new Error(
'"prettier/react" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);

3
node_modules/eslint-config-prettier/standard.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
throw new Error(
'"prettier/standard" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);

3
node_modules/eslint-config-prettier/unicorn.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
throw new Error(
'"prettier/unicorn" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);

3
node_modules/eslint-config-prettier/vue.js generated vendored Normal file
View File

@ -0,0 +1,3 @@
throw new Error(
'"prettier/vue" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21'
);