@shayanthenerd/eslint-config 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +496 -0
- package/dist/_virtual/rolldown_runtime.cjs +30 -0
- package/dist/configs/base.cjs +44 -0
- package/dist/configs/base.js +43 -0
- package/dist/configs/commons.cjs +26 -0
- package/dist/configs/commons.js +25 -0
- package/dist/configs/css.cjs +29 -0
- package/dist/configs/css.js +28 -0
- package/dist/configs/cypress.cjs +23 -0
- package/dist/configs/cypress.js +22 -0
- package/dist/configs/html.cjs +23 -0
- package/dist/configs/html.js +22 -0
- package/dist/configs/importX.cjs +26 -0
- package/dist/configs/importX.js +25 -0
- package/dist/configs/nuxtMultiRootTemplate.cjs +14 -0
- package/dist/configs/nuxtMultiRootTemplate.js +14 -0
- package/dist/configs/oxlintOverrides.cjs +49 -0
- package/dist/configs/oxlintOverrides.js +48 -0
- package/dist/configs/perfectionist.cjs +24 -0
- package/dist/configs/perfectionist.js +23 -0
- package/dist/configs/playwright.cjs +23 -0
- package/dist/configs/playwright.js +22 -0
- package/dist/configs/storybook.cjs +24 -0
- package/dist/configs/storybook.js +23 -0
- package/dist/configs/stylistic.cjs +23 -0
- package/dist/configs/stylistic.js +22 -0
- package/dist/configs/tailwind.cjs +43 -0
- package/dist/configs/tailwind.js +42 -0
- package/dist/configs/typescript.cjs +31 -0
- package/dist/configs/typescript.js +30 -0
- package/dist/configs/vitest.cjs +23 -0
- package/dist/configs/vitest.js +22 -0
- package/dist/configs/vue.cjs +35 -0
- package/dist/configs/vue.js +34 -0
- package/dist/configs/vueComponentNames.cjs +19 -0
- package/dist/configs/vueComponentNames.js +19 -0
- package/dist/index.cjs +55 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +54 -0
- package/dist/oxlint.config.jsonc +192 -0
- package/dist/prettier.config.js +42 -0
- package/dist/rules/css.cjs +65 -0
- package/dist/rules/css.js +65 -0
- package/dist/rules/cypress.cjs +16 -0
- package/dist/rules/cypress.js +15 -0
- package/dist/rules/html.cjs +53 -0
- package/dist/rules/html.js +53 -0
- package/dist/rules/importX.cjs +51 -0
- package/dist/rules/importX.js +50 -0
- package/dist/rules/javascript.cjs +164 -0
- package/dist/rules/javascript.js +163 -0
- package/dist/rules/perfectionist.cjs +73 -0
- package/dist/rules/perfectionist.js +73 -0
- package/dist/rules/playwright.cjs +28 -0
- package/dist/rules/playwright.js +27 -0
- package/dist/rules/storybook.cjs +16 -0
- package/dist/rules/storybook.js +15 -0
- package/dist/rules/stylistic.cjs +160 -0
- package/dist/rules/stylistic.js +160 -0
- package/dist/rules/tailwind.cjs +36 -0
- package/dist/rules/tailwind.js +36 -0
- package/dist/rules/typescript.cjs +62 -0
- package/dist/rules/typescript.js +62 -0
- package/dist/rules/vitest.cjs +47 -0
- package/dist/rules/vitest.js +46 -0
- package/dist/rules/vue.cjs +169 -0
- package/dist/rules/vue.js +169 -0
- package/dist/rules/vueAccessibility.cjs +23 -0
- package/dist/rules/vueAccessibility.js +23 -0
- package/dist/types/configOptions/base.d.cts +47 -0
- package/dist/types/configOptions/base.d.ts +47 -0
- package/dist/types/configOptions/css.d.cts +27 -0
- package/dist/types/configOptions/css.d.ts +27 -0
- package/dist/types/configOptions/html.d.cts +27 -0
- package/dist/types/configOptions/html.d.ts +27 -0
- package/dist/types/configOptions/importX.d.cts +20 -0
- package/dist/types/configOptions/importX.d.ts +20 -0
- package/dist/types/configOptions/nuxt.d.cts +42 -0
- package/dist/types/configOptions/nuxt.d.ts +42 -0
- package/dist/types/configOptions/perfectionist.d.cts +16 -0
- package/dist/types/configOptions/perfectionist.d.ts +16 -0
- package/dist/types/configOptions/stylistic.d.cts +145 -0
- package/dist/types/configOptions/stylistic.d.ts +145 -0
- package/dist/types/configOptions/tailwind.d.cts +46 -0
- package/dist/types/configOptions/tailwind.d.ts +46 -0
- package/dist/types/configOptions/test.d.cts +55 -0
- package/dist/types/configOptions/test.d.ts +55 -0
- package/dist/types/configOptions/typescript.d.cts +36 -0
- package/dist/types/configOptions/typescript.d.ts +36 -0
- package/dist/types/configOptions/vue.d.cts +211 -0
- package/dist/types/configOptions/vue.d.ts +211 -0
- package/dist/types/configOptions/vueAccessibility.d.cts +34 -0
- package/dist/types/configOptions/vueAccessibility.d.ts +34 -0
- package/dist/types/eslint-schema.d.cts +13258 -0
- package/dist/types/eslint-schema.d.ts +13258 -0
- package/dist/types/eslintRules.d.cts +12 -0
- package/dist/types/eslintRules.d.ts +12 -0
- package/dist/types/helpers.d.cts +5 -0
- package/dist/types/helpers.d.ts +5 -0
- package/dist/types/index.d.cts +360 -0
- package/dist/types/index.d.ts +360 -0
- package/dist/utils/globs.cjs +31 -0
- package/dist/utils/globs.js +30 -0
- package/dist/utils/ignores/defaultIgnorePatterns.cjs +58 -0
- package/dist/utils/ignores/defaultIgnorePatterns.js +57 -0
- package/dist/utils/ignores/getIgnorePatterns.cjs +16 -0
- package/dist/utils/ignores/getIgnorePatterns.js +16 -0
- package/dist/utils/ignores/resolveGitignorePatterns.cjs +27 -0
- package/dist/utils/ignores/resolveGitignorePatterns.js +26 -0
- package/dist/utils/isEmptyString.cjs +8 -0
- package/dist/utils/isEmptyString.js +7 -0
- package/dist/utils/isEnabled.cjs +8 -0
- package/dist/utils/isEnabled.js +7 -0
- package/dist/utils/isPackageDetected.cjs +22 -0
- package/dist/utils/isPackageDetected.js +20 -0
- package/dist/utils/options/defaultOptions.cjs +168 -0
- package/dist/utils/options/defaultOptions.js +167 -0
- package/dist/utils/options/enableDetectedConfigs.cjs +36 -0
- package/dist/utils/options/enableDetectedConfigs.js +36 -0
- package/dist/utils/options/mergeWithDefaults.cjs +22 -0
- package/dist/utils/options/mergeWithDefaults.js +21 -0
- package/dist/utils/vue/getRestrictedVueElements.cjs +28 -0
- package/dist/utils/vue/getRestrictedVueElements.js +27 -0
- package/dist/utils/vue/getRestrictedVueInputs.cjs +24 -0
- package/dist/utils/vue/getRestrictedVueInputs.js +23 -0
- package/package.json +130 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { globs } from "../utils/globs.js";
|
|
2
|
+
import { isEnabled } from "../utils/isEnabled.js";
|
|
3
|
+
import { defaultOptions } from "../utils/options/defaultOptions.js";
|
|
4
|
+
import { getTailwindRules } from "../rules/tailwind.js";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { mergeConfigs } from "eslint-flat-config-utils";
|
|
7
|
+
import eslintPluginVue from "eslint-plugin-vue";
|
|
8
|
+
import eslintPluginHTML from "@html-eslint/eslint-plugin";
|
|
9
|
+
import eslintPluginTailwind from "eslint-plugin-better-tailwindcss";
|
|
10
|
+
|
|
11
|
+
//#region src/configs/tailwind.ts
|
|
12
|
+
const eslintParserHTML = eslintPluginHTML.configs["flat/recommended"].languageOptions.parser;
|
|
13
|
+
const eslintParserVue = eslintPluginVue.configs["flat/recommended"].find((config) => config.name === "vue/base/setup-for-vue")?.languageOptions?.parser;
|
|
14
|
+
function getTailwindConfig(options) {
|
|
15
|
+
const { tsConfig, configs: { vue, html, tailwind } } = options;
|
|
16
|
+
const { entryPoint, config, overrides } = isEnabled(tailwind) ? tailwind : defaultOptions.configs.tailwind;
|
|
17
|
+
const tailwindConfig = {
|
|
18
|
+
name: "shayanthenerd/tailwind",
|
|
19
|
+
files: [
|
|
20
|
+
globs.src,
|
|
21
|
+
html ? globs.html : "",
|
|
22
|
+
vue ? globs.vue : ""
|
|
23
|
+
],
|
|
24
|
+
plugins: { "better-tailwindcss": eslintPluginTailwind },
|
|
25
|
+
languageOptions: { parserOptions: { parser: html ? eslintParserHTML : eslintParserVue } },
|
|
26
|
+
settings: { "better-tailwindcss": {
|
|
27
|
+
entryPoint: path.resolve(entryPoint),
|
|
28
|
+
tailwindConfig: path.resolve(config),
|
|
29
|
+
tsconfig: tsConfig ? path.resolve(tsConfig.rootDir, tsConfig.filename) : void 0,
|
|
30
|
+
attributes: [["^v-bind:ui$", [{ match: "objectValues" }]], ["^(?:v-bind:)?(class|activeClass|inactiveClass)$", [
|
|
31
|
+
{ match: "strings" },
|
|
32
|
+
{ match: "objectKeys" },
|
|
33
|
+
{ match: "objectValues" }
|
|
34
|
+
]]]
|
|
35
|
+
} },
|
|
36
|
+
rules: getTailwindRules(options)
|
|
37
|
+
};
|
|
38
|
+
return mergeConfigs(tailwindConfig, overrides);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { getTailwindConfig };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs = require('../utils/globs.cjs');
|
|
3
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled = require('../utils/isEnabled.cjs');
|
|
4
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions = require('../utils/options/defaultOptions.cjs');
|
|
5
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_typescript = require('../rules/typescript.cjs');
|
|
6
|
+
const typescript_eslint = require_rolldown_runtime.__toESM(require("typescript-eslint"));
|
|
7
|
+
const eslint_flat_config_utils = require_rolldown_runtime.__toESM(require("eslint-flat-config-utils"));
|
|
8
|
+
|
|
9
|
+
//#region src/configs/typescript.ts
|
|
10
|
+
function getTypeScriptConfig(options) {
|
|
11
|
+
const { tsConfig, configs: { vue, typescript } } = options;
|
|
12
|
+
const { allowedDefaultProjects } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(typescript) ? typescript : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.typescript;
|
|
13
|
+
const { overrides } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(typescript) ? typescript : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.typescript;
|
|
14
|
+
const typescriptConfig = {
|
|
15
|
+
name: "shayanthenerd/typescript",
|
|
16
|
+
files: [require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs.globs.src, vue ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs.globs.vue : ""],
|
|
17
|
+
extends: [typescript_eslint.default.configs.strictTypeChecked, typescript_eslint.default.configs.stylisticTypeChecked],
|
|
18
|
+
languageOptions: { parserOptions: {
|
|
19
|
+
tsconfigRootDir: tsConfig ? tsConfig.rootDir : void 0,
|
|
20
|
+
projectService: {
|
|
21
|
+
allowDefaultProject: allowedDefaultProjects,
|
|
22
|
+
defaultProject: tsConfig ? tsConfig.filename : void 0
|
|
23
|
+
}
|
|
24
|
+
} },
|
|
25
|
+
rules: require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_typescript.getTypeScriptRules(options)
|
|
26
|
+
};
|
|
27
|
+
return (0, eslint_flat_config_utils.mergeConfigs)(typescriptConfig, overrides);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
exports.getTypeScriptConfig = getTypeScriptConfig;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { globs } from "../utils/globs.js";
|
|
2
|
+
import { isEnabled } from "../utils/isEnabled.js";
|
|
3
|
+
import { defaultOptions } from "../utils/options/defaultOptions.js";
|
|
4
|
+
import { getTypeScriptRules } from "../rules/typescript.js";
|
|
5
|
+
import typescriptESLint from "typescript-eslint";
|
|
6
|
+
import { mergeConfigs } from "eslint-flat-config-utils";
|
|
7
|
+
|
|
8
|
+
//#region src/configs/typescript.ts
|
|
9
|
+
function getTypeScriptConfig(options) {
|
|
10
|
+
const { tsConfig, configs: { vue, typescript } } = options;
|
|
11
|
+
const { allowedDefaultProjects } = isEnabled(typescript) ? typescript : defaultOptions.configs.typescript;
|
|
12
|
+
const { overrides } = isEnabled(typescript) ? typescript : defaultOptions.configs.typescript;
|
|
13
|
+
const typescriptConfig = {
|
|
14
|
+
name: "shayanthenerd/typescript",
|
|
15
|
+
files: [globs.src, vue ? globs.vue : ""],
|
|
16
|
+
extends: [typescriptESLint.configs.strictTypeChecked, typescriptESLint.configs.stylisticTypeChecked],
|
|
17
|
+
languageOptions: { parserOptions: {
|
|
18
|
+
tsconfigRootDir: tsConfig ? tsConfig.rootDir : void 0,
|
|
19
|
+
projectService: {
|
|
20
|
+
allowDefaultProject: allowedDefaultProjects,
|
|
21
|
+
defaultProject: tsConfig ? tsConfig.filename : void 0
|
|
22
|
+
}
|
|
23
|
+
} },
|
|
24
|
+
rules: getTypeScriptRules(options)
|
|
25
|
+
};
|
|
26
|
+
return mergeConfigs(typescriptConfig, overrides);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { getTypeScriptConfig };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs = require('../utils/globs.cjs');
|
|
3
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled = require('../utils/isEnabled.cjs');
|
|
4
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions = require('../utils/options/defaultOptions.cjs');
|
|
5
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_vitest = require('../rules/vitest.cjs');
|
|
6
|
+
const eslint_flat_config_utils = require_rolldown_runtime.__toESM(require("eslint-flat-config-utils"));
|
|
7
|
+
const __vitest_eslint_plugin = require_rolldown_runtime.__toESM(require("@vitest/eslint-plugin"));
|
|
8
|
+
|
|
9
|
+
//#region src/configs/vitest.ts
|
|
10
|
+
function getVitestConfig(options) {
|
|
11
|
+
const { vitest } = options.configs.test;
|
|
12
|
+
const { overrides } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vitest) ? vitest : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.test.vitest;
|
|
13
|
+
const vitestConfig = {
|
|
14
|
+
name: "shayanthenerd/vitest",
|
|
15
|
+
files: [require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs.globs.test],
|
|
16
|
+
extends: [__vitest_eslint_plugin.default.configs.recommended],
|
|
17
|
+
rules: require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_vitest.getVitestRules(options)
|
|
18
|
+
};
|
|
19
|
+
return (0, eslint_flat_config_utils.mergeConfigs)(vitestConfig, overrides);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
exports.getVitestConfig = getVitestConfig;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { globs } from "../utils/globs.js";
|
|
2
|
+
import { isEnabled } from "../utils/isEnabled.js";
|
|
3
|
+
import { defaultOptions } from "../utils/options/defaultOptions.js";
|
|
4
|
+
import { getVitestRules } from "../rules/vitest.js";
|
|
5
|
+
import { mergeConfigs } from "eslint-flat-config-utils";
|
|
6
|
+
import eslintPluginVitest from "@vitest/eslint-plugin";
|
|
7
|
+
|
|
8
|
+
//#region src/configs/vitest.ts
|
|
9
|
+
function getVitestConfig(options) {
|
|
10
|
+
const { vitest } = options.configs.test;
|
|
11
|
+
const { overrides } = isEnabled(vitest) ? vitest : defaultOptions.configs.test.vitest;
|
|
12
|
+
const vitestConfig = {
|
|
13
|
+
name: "shayanthenerd/vitest",
|
|
14
|
+
files: [globs.test],
|
|
15
|
+
extends: [eslintPluginVitest.configs.recommended],
|
|
16
|
+
rules: getVitestRules(options)
|
|
17
|
+
};
|
|
18
|
+
return mergeConfigs(vitestConfig, overrides);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { getVitestConfig };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs = require('../utils/globs.cjs');
|
|
3
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled = require('../utils/isEnabled.cjs');
|
|
4
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions = require('../utils/options/defaultOptions.cjs');
|
|
5
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_vue = require('../rules/vue.cjs');
|
|
6
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_vueAccessibility = require('../rules/vueAccessibility.cjs');
|
|
7
|
+
const typescript_eslint = require_rolldown_runtime.__toESM(require("typescript-eslint"));
|
|
8
|
+
const eslint_flat_config_utils = require_rolldown_runtime.__toESM(require("eslint-flat-config-utils"));
|
|
9
|
+
const eslint_plugin_vue = require_rolldown_runtime.__toESM(require("eslint-plugin-vue"));
|
|
10
|
+
const eslint_plugin_vuejs_accessibility = require_rolldown_runtime.__toESM(require("eslint-plugin-vuejs-accessibility"));
|
|
11
|
+
|
|
12
|
+
//#region src/configs/vue.ts
|
|
13
|
+
function getVueConfig(options) {
|
|
14
|
+
const { vue } = options.configs;
|
|
15
|
+
const accessibility = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vue) && require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vue.accessibility);
|
|
16
|
+
const { overrides } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vue) ? vue : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.vue;
|
|
17
|
+
const vueConfig = {
|
|
18
|
+
name: "shayanthenerd/vue",
|
|
19
|
+
files: [require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs.globs.vue],
|
|
20
|
+
extends: [eslint_plugin_vue.default.configs["flat/recommended"], accessibility ? eslint_plugin_vuejs_accessibility.default.configs["flat/recommended"] : {}],
|
|
21
|
+
languageOptions: { parserOptions: {
|
|
22
|
+
parser: typescript_eslint.default.parser,
|
|
23
|
+
extraFileExtensions: [".vue"],
|
|
24
|
+
vueFeatures: { filter: false }
|
|
25
|
+
} },
|
|
26
|
+
rules: {
|
|
27
|
+
...require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_vue.getVueRules(options),
|
|
28
|
+
...accessibility ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_rules_vueAccessibility.getVueAccessibilityRules(options) : {}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return (0, eslint_flat_config_utils.mergeConfigs)(vueConfig, overrides);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.getVueConfig = getVueConfig;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { globs } from "../utils/globs.js";
|
|
2
|
+
import { isEnabled } from "../utils/isEnabled.js";
|
|
3
|
+
import { defaultOptions } from "../utils/options/defaultOptions.js";
|
|
4
|
+
import { getVueRules } from "../rules/vue.js";
|
|
5
|
+
import { getVueAccessibilityRules } from "../rules/vueAccessibility.js";
|
|
6
|
+
import typescriptESLint from "typescript-eslint";
|
|
7
|
+
import { mergeConfigs } from "eslint-flat-config-utils";
|
|
8
|
+
import eslintPluginVue from "eslint-plugin-vue";
|
|
9
|
+
import eslintPluginVueAccessibility from "eslint-plugin-vuejs-accessibility";
|
|
10
|
+
|
|
11
|
+
//#region src/configs/vue.ts
|
|
12
|
+
function getVueConfig(options) {
|
|
13
|
+
const { vue } = options.configs;
|
|
14
|
+
const accessibility = isEnabled(vue) && isEnabled(vue.accessibility);
|
|
15
|
+
const { overrides } = isEnabled(vue) ? vue : defaultOptions.configs.vue;
|
|
16
|
+
const vueConfig = {
|
|
17
|
+
name: "shayanthenerd/vue",
|
|
18
|
+
files: [globs.vue],
|
|
19
|
+
extends: [eslintPluginVue.configs["flat/recommended"], accessibility ? eslintPluginVueAccessibility.configs["flat/recommended"] : {}],
|
|
20
|
+
languageOptions: { parserOptions: {
|
|
21
|
+
parser: typescriptESLint.parser,
|
|
22
|
+
extraFileExtensions: [".vue"],
|
|
23
|
+
vueFeatures: { filter: false }
|
|
24
|
+
} },
|
|
25
|
+
rules: {
|
|
26
|
+
...getVueRules(options),
|
|
27
|
+
...accessibility ? getVueAccessibilityRules(options) : {}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return mergeConfigs(vueConfig, overrides);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { getVueConfig };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs = require('../utils/globs.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/configs/vueComponentNames.ts
|
|
4
|
+
function getVueComponentNamesConfig() {
|
|
5
|
+
const vueComponentNamesConfig = {
|
|
6
|
+
name: "shayanthenerd/vue/multi-word-component-names",
|
|
7
|
+
files: [require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs.globs.vueComponentNames],
|
|
8
|
+
ignores: [require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_globs.globs.vueComponentNamesIgnore],
|
|
9
|
+
rules: {
|
|
10
|
+
"vue/match-component-file-name": "off",
|
|
11
|
+
"vue/multi-word-component-names": "off",
|
|
12
|
+
"vue/component-definition-name-casing": "off"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return vueComponentNamesConfig;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.getVueComponentNamesConfig = getVueComponentNamesConfig;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { globs } from "../utils/globs.js";
|
|
2
|
+
|
|
3
|
+
//#region src/configs/vueComponentNames.ts
|
|
4
|
+
function getVueComponentNamesConfig() {
|
|
5
|
+
const vueComponentNamesConfig = {
|
|
6
|
+
name: "shayanthenerd/vue/multi-word-component-names",
|
|
7
|
+
files: [globs.vueComponentNames],
|
|
8
|
+
ignores: [globs.vueComponentNamesIgnore],
|
|
9
|
+
rules: {
|
|
10
|
+
"vue/match-component-file-name": "off",
|
|
11
|
+
"vue/multi-word-component-names": "off",
|
|
12
|
+
"vue/component-definition-name-casing": "off"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return vueComponentNamesConfig;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { getVueComponentNamesConfig };
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled = require('./utils/isEnabled.cjs');
|
|
3
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions = require('./utils/options/defaultOptions.cjs');
|
|
4
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_css = require('./configs/css.cjs');
|
|
5
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_vue = require('./configs/vue.cjs');
|
|
6
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_base = require('./configs/base.cjs');
|
|
7
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_html = require('./configs/html.cjs');
|
|
8
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_vitest = require('./configs/vitest.cjs');
|
|
9
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_commons = require('./configs/commons.cjs');
|
|
10
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_cypress = require('./configs/cypress.cjs');
|
|
11
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_importX = require('./configs/importX.cjs');
|
|
12
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_tailwind = require('./configs/tailwind.cjs');
|
|
13
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_storybook = require('./configs/storybook.cjs');
|
|
14
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_stylistic = require('./configs/stylistic.cjs');
|
|
15
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_playwright = require('./configs/playwright.cjs');
|
|
16
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_typescript = require('./configs/typescript.cjs');
|
|
17
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_perfectionist = require('./configs/perfectionist.cjs');
|
|
18
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_oxlintOverrides = require('./configs/oxlintOverrides.cjs');
|
|
19
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_ignores_getIgnorePatterns = require('./utils/ignores/getIgnorePatterns.cjs');
|
|
20
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_mergeWithDefaults = require('./utils/options/mergeWithDefaults.cjs');
|
|
21
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_vueComponentNames = require('./configs/vueComponentNames.cjs');
|
|
22
|
+
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_nuxtMultiRootTemplate = require('./configs/nuxtMultiRootTemplate.cjs');
|
|
23
|
+
const eslint_config = require_rolldown_runtime.__toESM(require("eslint/config"));
|
|
24
|
+
const eslint_plugin_oxlint = require_rolldown_runtime.__toESM(require("eslint-plugin-oxlint"));
|
|
25
|
+
const typescript_eslint = require_rolldown_runtime.__toESM(require("typescript-eslint"));
|
|
26
|
+
const node_path = require_rolldown_runtime.__toESM(require("node:path"));
|
|
27
|
+
|
|
28
|
+
//#region src/index.ts
|
|
29
|
+
/**
|
|
30
|
+
* Define the ESLint configuration based on the provided options and any number of Flat Config objects.
|
|
31
|
+
*
|
|
32
|
+
* @param {Options} options - Options to configure and customize the config
|
|
33
|
+
* @param {...ConfigObject} configs - Additional Flat Config objects to extend the config
|
|
34
|
+
*
|
|
35
|
+
* @returns {Linter.Config[]} The merged ESLint configuration array
|
|
36
|
+
*/
|
|
37
|
+
function defineConfig(options = {}, ...configs) {
|
|
38
|
+
const mergedOptions = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_mergeWithDefaults.mergeWithDefaults(options);
|
|
39
|
+
const { gitignore, global: { rules, ignores, settings, linterOptions }, configs: { vue, css, nuxt, html, oxlint, importX, tailwind, stylistic, typescript, perfectionist, test: { vitest, cypress, storybook, playwright } } } = mergedOptions;
|
|
40
|
+
const ignorePatterns = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_ignores_getIgnorePatterns.getIgnorePatterns({
|
|
41
|
+
gitignore,
|
|
42
|
+
patterns: ignores
|
|
43
|
+
});
|
|
44
|
+
const oxlintConfigPath = node_path.default.resolve(oxlint || require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.oxlint);
|
|
45
|
+
const eslintConfig = (0, typescript_eslint.config)({
|
|
46
|
+
name: "shayanthenerd/global",
|
|
47
|
+
linterOptions,
|
|
48
|
+
settings,
|
|
49
|
+
rules
|
|
50
|
+
}, (0, eslint_config.globalIgnores)(ignorePatterns, "shayanthenerd/ignores"), require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_base.getBaseConfig(mergedOptions), require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_commons.getCommonsConfig(mergedOptions), require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(importX) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_importX.getImportXConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(stylistic) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_stylistic.getStylisticConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(perfectionist) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_perfectionist.getPerfectionistConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(typescript) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_typescript.getTypeScriptConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(html) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_html.getHTMLConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(css) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_css.getCSSConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(tailwind) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_tailwind.getTailwindConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vue) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_vue.getVueConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vue) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_vueComponentNames.getVueComponentNamesConfig() : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vue) && require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(nuxt) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_nuxtMultiRootTemplate.getNuxtMultiRootTemplateConfig() : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(storybook) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_storybook.getStorybookConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(vitest) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_vitest.getVitestConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(playwright) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_playwright.getPlaywrightConfig(mergedOptions) : {}, require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(cypress) ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_cypress.getCypressConfig(mergedOptions) : {}, ...oxlint ? eslint_plugin_oxlint.default.buildFromOxlintConfigFile(oxlintConfigPath) : [], oxlint ? require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_configs_oxlintOverrides.getOXLintOverridesConfig(mergedOptions) : {}, ...configs);
|
|
51
|
+
return eslintConfig;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
exports.defineConfig = defineConfig;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConfigObject, Options } from "./types/index.cjs";
|
|
2
|
+
import { Linter } from "eslint";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Define the ESLint configuration based on the provided options and any number of Flat Config objects.
|
|
8
|
+
*
|
|
9
|
+
* @param {Options} options - Options to configure and customize the config
|
|
10
|
+
* @param {...ConfigObject} configs - Additional Flat Config objects to extend the config
|
|
11
|
+
*
|
|
12
|
+
* @returns {Linter.Config[]} The merged ESLint configuration array
|
|
13
|
+
*/
|
|
14
|
+
declare function defineConfig(options?: Options, ...configs: ConfigObject[]): Linter.Config[];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { defineConfig };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConfigObject, Options } from "./types/index.js";
|
|
2
|
+
import { Linter } from "eslint";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Define the ESLint configuration based on the provided options and any number of Flat Config objects.
|
|
8
|
+
*
|
|
9
|
+
* @param {Options} options - Options to configure and customize the config
|
|
10
|
+
* @param {...ConfigObject} configs - Additional Flat Config objects to extend the config
|
|
11
|
+
*
|
|
12
|
+
* @returns {Linter.Config[]} The merged ESLint configuration array
|
|
13
|
+
*/
|
|
14
|
+
declare function defineConfig(options?: Options, ...configs: ConfigObject[]): Linter.Config[];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { defineConfig };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { isEnabled } from "./utils/isEnabled.js";
|
|
2
|
+
import { defaultOptions } from "./utils/options/defaultOptions.js";
|
|
3
|
+
import { getCSSConfig } from "./configs/css.js";
|
|
4
|
+
import { getVueConfig } from "./configs/vue.js";
|
|
5
|
+
import { getBaseConfig } from "./configs/base.js";
|
|
6
|
+
import { getHTMLConfig } from "./configs/html.js";
|
|
7
|
+
import { getVitestConfig } from "./configs/vitest.js";
|
|
8
|
+
import { getCommonsConfig } from "./configs/commons.js";
|
|
9
|
+
import { getCypressConfig } from "./configs/cypress.js";
|
|
10
|
+
import { getImportXConfig } from "./configs/importX.js";
|
|
11
|
+
import { getTailwindConfig } from "./configs/tailwind.js";
|
|
12
|
+
import { getStorybookConfig } from "./configs/storybook.js";
|
|
13
|
+
import { getStylisticConfig } from "./configs/stylistic.js";
|
|
14
|
+
import { getPlaywrightConfig } from "./configs/playwright.js";
|
|
15
|
+
import { getTypeScriptConfig } from "./configs/typescript.js";
|
|
16
|
+
import { getPerfectionistConfig } from "./configs/perfectionist.js";
|
|
17
|
+
import { getOXLintOverridesConfig } from "./configs/oxlintOverrides.js";
|
|
18
|
+
import { getIgnorePatterns } from "./utils/ignores/getIgnorePatterns.js";
|
|
19
|
+
import { mergeWithDefaults } from "./utils/options/mergeWithDefaults.js";
|
|
20
|
+
import { getVueComponentNamesConfig } from "./configs/vueComponentNames.js";
|
|
21
|
+
import { getNuxtMultiRootTemplateConfig } from "./configs/nuxtMultiRootTemplate.js";
|
|
22
|
+
import { globalIgnores } from "eslint/config";
|
|
23
|
+
import eslintPluginOXLint from "eslint-plugin-oxlint";
|
|
24
|
+
import { config } from "typescript-eslint";
|
|
25
|
+
import path from "node:path";
|
|
26
|
+
|
|
27
|
+
//#region src/index.ts
|
|
28
|
+
/**
|
|
29
|
+
* Define the ESLint configuration based on the provided options and any number of Flat Config objects.
|
|
30
|
+
*
|
|
31
|
+
* @param {Options} options - Options to configure and customize the config
|
|
32
|
+
* @param {...ConfigObject} configs - Additional Flat Config objects to extend the config
|
|
33
|
+
*
|
|
34
|
+
* @returns {Linter.Config[]} The merged ESLint configuration array
|
|
35
|
+
*/
|
|
36
|
+
function defineConfig(options = {}, ...configs) {
|
|
37
|
+
const mergedOptions = mergeWithDefaults(options);
|
|
38
|
+
const { gitignore, global: { rules, ignores, settings, linterOptions }, configs: { vue, css, nuxt, html, oxlint, importX, tailwind, stylistic, typescript, perfectionist, test: { vitest, cypress, storybook, playwright } } } = mergedOptions;
|
|
39
|
+
const ignorePatterns = getIgnorePatterns({
|
|
40
|
+
gitignore,
|
|
41
|
+
patterns: ignores
|
|
42
|
+
});
|
|
43
|
+
const oxlintConfigPath = path.resolve(oxlint || defaultOptions.configs.oxlint);
|
|
44
|
+
const eslintConfig = config({
|
|
45
|
+
name: "shayanthenerd/global",
|
|
46
|
+
linterOptions,
|
|
47
|
+
settings,
|
|
48
|
+
rules
|
|
49
|
+
}, globalIgnores(ignorePatterns, "shayanthenerd/ignores"), getBaseConfig(mergedOptions), getCommonsConfig(mergedOptions), isEnabled(importX) ? getImportXConfig(mergedOptions) : {}, isEnabled(stylistic) ? getStylisticConfig(mergedOptions) : {}, isEnabled(perfectionist) ? getPerfectionistConfig(mergedOptions) : {}, isEnabled(typescript) ? getTypeScriptConfig(mergedOptions) : {}, isEnabled(html) ? getHTMLConfig(mergedOptions) : {}, isEnabled(css) ? getCSSConfig(mergedOptions) : {}, isEnabled(tailwind) ? getTailwindConfig(mergedOptions) : {}, isEnabled(vue) ? getVueConfig(mergedOptions) : {}, isEnabled(vue) ? getVueComponentNamesConfig() : {}, isEnabled(vue) && isEnabled(nuxt) ? getNuxtMultiRootTemplateConfig() : {}, isEnabled(storybook) ? getStorybookConfig(mergedOptions) : {}, isEnabled(vitest) ? getVitestConfig(mergedOptions) : {}, isEnabled(playwright) ? getPlaywrightConfig(mergedOptions) : {}, isEnabled(cypress) ? getCypressConfig(mergedOptions) : {}, ...oxlint ? eslintPluginOXLint.buildFromOxlintConfigFile(oxlintConfigPath) : [], oxlint ? getOXLintOverridesConfig(mergedOptions) : {}, ...configs);
|
|
50
|
+
return eslintConfig;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { defineConfig };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
|
|
4
|
+
"env": {
|
|
5
|
+
"builtin": true,
|
|
6
|
+
"es2026": true,
|
|
7
|
+
"commonjs": false,
|
|
8
|
+
"node": true,
|
|
9
|
+
"browser": true,
|
|
10
|
+
"worker": true,
|
|
11
|
+
"serviceworker": false,
|
|
12
|
+
"webextensions": false
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"categories": {
|
|
16
|
+
"correctness": "error",
|
|
17
|
+
"suspicious": "error",
|
|
18
|
+
"restriction": "error",
|
|
19
|
+
"pedantic": "error",
|
|
20
|
+
"perf": "warn",
|
|
21
|
+
"style": "warn",
|
|
22
|
+
"nursery": "error"
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"plugins": [
|
|
26
|
+
"oxc",
|
|
27
|
+
"node",
|
|
28
|
+
"jest",
|
|
29
|
+
"jsdoc",
|
|
30
|
+
"eslint",
|
|
31
|
+
"import",
|
|
32
|
+
"vitest",
|
|
33
|
+
"promise",
|
|
34
|
+
"unicorn",
|
|
35
|
+
"jsx-a11y",
|
|
36
|
+
"typescript"
|
|
37
|
+
],
|
|
38
|
+
|
|
39
|
+
"rules": {
|
|
40
|
+
/*** OXC ***/
|
|
41
|
+
"oxc/no-async-await": "off",
|
|
42
|
+
"oxc/no-optional-chaining": "off",
|
|
43
|
+
"oxc/no-rest-spread-properties": "off",
|
|
44
|
+
|
|
45
|
+
/*** ESLint ***/
|
|
46
|
+
"eslint/yoda": "error",
|
|
47
|
+
"eslint/alert": "warn",
|
|
48
|
+
"eslint/id-length": "off",
|
|
49
|
+
"eslint/sort-vars": "off",
|
|
50
|
+
"eslint/sort-keys": "off",
|
|
51
|
+
"eslint/no-ternary": "off",
|
|
52
|
+
"eslint/no-undefined": "off",
|
|
53
|
+
"eslint/sort-imports": "off",
|
|
54
|
+
"eslint/no-magic-numbers": "off",
|
|
55
|
+
"eslint/arrow-body-style": "off",
|
|
56
|
+
"eslint/no-duplicate-imports": "off",
|
|
57
|
+
"eslint/func-names": ["error", "as-needed"],
|
|
58
|
+
|
|
59
|
+
"eslint/no-console": [
|
|
60
|
+
"warn",
|
|
61
|
+
{
|
|
62
|
+
"allow": ["info", "warn", "error", "table", "group", "groupEnd", "groupCollapsed"]
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
|
|
66
|
+
/*** TypeScript ***/
|
|
67
|
+
"typescript/triple-slash-reference": "off",
|
|
68
|
+
"typescript/explicit-function-return-type": "off",
|
|
69
|
+
"typescript/consistent-indexed-object-style": ["warn", "record"],
|
|
70
|
+
|
|
71
|
+
/*** Import ***/
|
|
72
|
+
"import/unambiguous": "off",
|
|
73
|
+
"import/no-namespace": "off",
|
|
74
|
+
"import/exports-last": "off",
|
|
75
|
+
"import/max-dependencies": "off",
|
|
76
|
+
"import/no-default-export": "off",
|
|
77
|
+
"import/prefer-default-export": "off",
|
|
78
|
+
"import/no-named-as-default-member": "off",
|
|
79
|
+
"import/no-anonymous-default-export": "off",
|
|
80
|
+
|
|
81
|
+
/*** Unicorn ***/
|
|
82
|
+
"unicorn/filename-case": "off",
|
|
83
|
+
"unicorn/prefer-set-has": "off",
|
|
84
|
+
"unicorn/no-array-reduce": "off",
|
|
85
|
+
"unicorn/prefer-string-raw": "off",
|
|
86
|
+
"unicorn/no-array-for-each": "off",
|
|
87
|
+
"unicorn/no-useless-undefined": "off",
|
|
88
|
+
"unicorn/prefer-prototype-methods": "off",
|
|
89
|
+
"unicorn/no-await-expression-member": "off",
|
|
90
|
+
|
|
91
|
+
/*** Jest ***/
|
|
92
|
+
"jest/require-hook": "off",
|
|
93
|
+
"jest/prefer-lowercase-title": "warn",
|
|
94
|
+
"jest/require-top-level-describe": "off",
|
|
95
|
+
|
|
96
|
+
/*** Customizable Overrides ***/
|
|
97
|
+
/* These rules are customizable in the ESLint config, but OXLint doesn't respect them. */
|
|
98
|
+
"eslint/max-depth": "off",
|
|
99
|
+
"eslint/func-style": "off",
|
|
100
|
+
"eslint/max-nested-callbacks": "off",
|
|
101
|
+
"typescript/consistent-type-definitions": "off",
|
|
102
|
+
"import/extensions": "off",
|
|
103
|
+
"vitest/consistent-test-it": "off",
|
|
104
|
+
"jest/max-nested-describe": "off"
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
"overrides": [
|
|
108
|
+
{
|
|
109
|
+
"files": ["**/{src,app,server}/**/*.{vue,js,mjs,cjs,jsx,ts,mts,cts,tsx}"],
|
|
110
|
+
"rules": {
|
|
111
|
+
"eslint/no-undef": "off"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"files": [
|
|
116
|
+
"**/{shared,dto,dtos,model,models,helper,helpers,module,modules,@type,@types,types,util,utils,utilities,composable,composables,repo,repos,repository,repositories}/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}"
|
|
117
|
+
],
|
|
118
|
+
"rules": {
|
|
119
|
+
"typescript/explicit-function-return-type": "error"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
|
|
124
|
+
"ignorePatterns": [
|
|
125
|
+
/* Dependencies */
|
|
126
|
+
"**/*.min.*",
|
|
127
|
+
"**/jspm_packages",
|
|
128
|
+
"**/pnpm-lock.yaml",
|
|
129
|
+
"**/bower_components",
|
|
130
|
+
"**/package-lock.json",
|
|
131
|
+
|
|
132
|
+
/* Auto-generated type definitions */
|
|
133
|
+
"**/typegen.d.ts",
|
|
134
|
+
"**/components.d.ts",
|
|
135
|
+
"**/auto-import?(s).d.ts",
|
|
136
|
+
|
|
137
|
+
/* Build outputs */
|
|
138
|
+
"**/out",
|
|
139
|
+
"**/dist",
|
|
140
|
+
"**/build",
|
|
141
|
+
"**/.data",
|
|
142
|
+
"**/output",
|
|
143
|
+
"**/.output",
|
|
144
|
+
"**/.serverless",
|
|
145
|
+
"**/public/build",
|
|
146
|
+
"**/public/static",
|
|
147
|
+
"**/.eslint-config-inspector",
|
|
148
|
+
|
|
149
|
+
/* Cache */
|
|
150
|
+
"**/tmp",
|
|
151
|
+
"**/.tmp",
|
|
152
|
+
"**/.npm",
|
|
153
|
+
"**/temp",
|
|
154
|
+
"**/.temp",
|
|
155
|
+
"**/cache",
|
|
156
|
+
"**/.cache",
|
|
157
|
+
"**/deno_dir",
|
|
158
|
+
"**/.parcel-cache",
|
|
159
|
+
"**/*.lerna_backup",
|
|
160
|
+
"**/.postcss-cache",
|
|
161
|
+
"**/.vitepress/cache",
|
|
162
|
+
"**/vite.config.*.timestamp-*",
|
|
163
|
+
|
|
164
|
+
/* Frameworks and tools */
|
|
165
|
+
"**/.nx",
|
|
166
|
+
"**/.vite",
|
|
167
|
+
"**/.yarn",
|
|
168
|
+
"**/.nuxt",
|
|
169
|
+
"**/.next",
|
|
170
|
+
"**/.vitest",
|
|
171
|
+
"**/.vercel",
|
|
172
|
+
"**/.svelte-kit",
|
|
173
|
+
"**/.vite-inspect",
|
|
174
|
+
|
|
175
|
+
/* Tests */
|
|
176
|
+
"**/coverage",
|
|
177
|
+
"**/_fixtures",
|
|
178
|
+
"**/.nyc_output",
|
|
179
|
+
"**/__snapshots__",
|
|
180
|
+
|
|
181
|
+
/* Development environment */
|
|
182
|
+
"**/.idea",
|
|
183
|
+
"**/.fleet",
|
|
184
|
+
"**/.history",
|
|
185
|
+
|
|
186
|
+
// Documentation
|
|
187
|
+
"**/LICENSE*",
|
|
188
|
+
"**/CHANGELOG*.md",
|
|
189
|
+
"**/CODEOWNERS.md",
|
|
190
|
+
"**/CODE_OF_CONDUCT.md"
|
|
191
|
+
]
|
|
192
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** @type {import('prettier').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
semi: true,
|
|
4
|
+
useTabs: true,
|
|
5
|
+
tabWidth: 2,
|
|
6
|
+
vueIndentScriptAndStyle: false,
|
|
7
|
+
printWidth: 120,
|
|
8
|
+
singleQuote: true,
|
|
9
|
+
jsxSingleQuote: false,
|
|
10
|
+
quoteProps: 'consistent',
|
|
11
|
+
insertPragma: false,
|
|
12
|
+
requirePragma: false,
|
|
13
|
+
bracketSpacing: true,
|
|
14
|
+
bracketSameLine: false,
|
|
15
|
+
endOfLine: 'lf',
|
|
16
|
+
trailingComma: 'all',
|
|
17
|
+
arrowParens: 'always',
|
|
18
|
+
proseWrap: 'preserve',
|
|
19
|
+
objectWrap: 'preserve',
|
|
20
|
+
singleAttributePerLine: false,
|
|
21
|
+
htmlWhitespaceSensitivity: 'css',
|
|
22
|
+
embeddedLanguageFormatting: 'auto',
|
|
23
|
+
rangeStart: 0,
|
|
24
|
+
rangeEnd: Number.POSITIVE_INFINITY,
|
|
25
|
+
experimentalTernaries: false,
|
|
26
|
+
experimentalOperatorPosition: 'end',
|
|
27
|
+
|
|
28
|
+
overrides: [
|
|
29
|
+
{
|
|
30
|
+
files: ['*.jsonc', 'bun.lock'],
|
|
31
|
+
options: {
|
|
32
|
+
parser: 'json',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
files: '*.svg',
|
|
37
|
+
options: {
|
|
38
|
+
parser: 'html',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|