@shayanthenerd/eslint-config 0.2.0 → 0.4.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/README.md +1 -1
- package/dist/prettier.config.d.ts +6 -0
- package/dist/prettier.config.js +22 -26
- package/package.json +9 -12
- package/dist/_virtual/rolldown_runtime.cjs +0 -30
- package/dist/configs/base.cjs +0 -44
- package/dist/configs/commons.cjs +0 -27
- package/dist/configs/css.cjs +0 -29
- package/dist/configs/cypress.cjs +0 -23
- package/dist/configs/html.cjs +0 -23
- package/dist/configs/importX.cjs +0 -46
- package/dist/configs/nuxtMultiRootTemplate.cjs +0 -14
- package/dist/configs/oxlintOverrides.cjs +0 -51
- package/dist/configs/perfectionist.cjs +0 -24
- package/dist/configs/playwright.cjs +0 -23
- package/dist/configs/storybook.cjs +0 -24
- package/dist/configs/stylistic.cjs +0 -23
- package/dist/configs/tailwind.cjs +0 -43
- package/dist/configs/typescript.cjs +0 -31
- package/dist/configs/vitest.cjs +0 -23
- package/dist/configs/vue.cjs +0 -35
- package/dist/configs/vueComponentNames.cjs +0 -19
- package/dist/index.cjs +0 -55
- package/dist/index.d.cts +0 -16
- package/dist/rules/css.cjs +0 -65
- package/dist/rules/cypress.cjs +0 -16
- package/dist/rules/html.cjs +0 -53
- package/dist/rules/importX.cjs +0 -51
- package/dist/rules/javascript.cjs +0 -164
- package/dist/rules/perfectionist.cjs +0 -73
- package/dist/rules/playwright.cjs +0 -28
- package/dist/rules/storybook.cjs +0 -16
- package/dist/rules/stylistic.cjs +0 -160
- package/dist/rules/tailwind.cjs +0 -36
- package/dist/rules/typescript.cjs +0 -62
- package/dist/rules/vitest.cjs +0 -47
- package/dist/rules/vue.cjs +0 -171
- package/dist/rules/vueAccessibility.cjs +0 -23
- package/dist/types/configOptions/base.d.cts +0 -47
- package/dist/types/configOptions/css.d.cts +0 -27
- package/dist/types/configOptions/html.d.cts +0 -27
- package/dist/types/configOptions/importX.d.cts +0 -29
- package/dist/types/configOptions/nuxt.d.cts +0 -42
- package/dist/types/configOptions/perfectionist.d.cts +0 -16
- package/dist/types/configOptions/stylistic.d.cts +0 -145
- package/dist/types/configOptions/tailwind.d.cts +0 -46
- package/dist/types/configOptions/test.d.cts +0 -55
- package/dist/types/configOptions/typescript.d.cts +0 -36
- package/dist/types/configOptions/vue.d.cts +0 -211
- package/dist/types/configOptions/vueAccessibility.d.cts +0 -34
- package/dist/types/eslint-schema.d.cts +0 -13732
- package/dist/types/eslintRules.d.cts +0 -12
- package/dist/types/helpers.d.cts +0 -5
- package/dist/types/index.d.cts +0 -360
- package/dist/utils/globs.cjs +0 -32
- package/dist/utils/ignores/defaultIgnorePatterns.cjs +0 -58
- package/dist/utils/ignores/getIgnorePatterns.cjs +0 -16
- package/dist/utils/ignores/resolveGitignorePatterns.cjs +0 -27
- package/dist/utils/isEmptyString.cjs +0 -8
- package/dist/utils/isEnabled.cjs +0 -8
- package/dist/utils/isPackageDetected.cjs +0 -22
- package/dist/utils/options/defaultOptions.cjs +0 -169
- package/dist/utils/options/enableDetectedConfigs.cjs +0 -40
- package/dist/utils/options/mergeWithDefaults.cjs +0 -22
- package/dist/utils/vue/getRestrictedVueElements.cjs +0 -28
- package/dist/utils/vue/getRestrictedVueInputs.cjs +0 -24
package/dist/configs/vitest.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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;
|
package/dist/configs/vue.cjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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;
|
|
@@ -1,19 +0,0 @@
|
|
|
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;
|
package/dist/index.cjs
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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/rules/css.cjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled = require('../utils/isEnabled.cjs');
|
|
2
|
-
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions = require('../utils/options/defaultOptions.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/rules/css.ts
|
|
5
|
-
const allowedPhysicalUnits = [
|
|
6
|
-
"cqh",
|
|
7
|
-
"cqw",
|
|
8
|
-
"dvh",
|
|
9
|
-
"dvw",
|
|
10
|
-
"lvh",
|
|
11
|
-
"lvw",
|
|
12
|
-
"svh",
|
|
13
|
-
"svw",
|
|
14
|
-
"vh",
|
|
15
|
-
"vw"
|
|
16
|
-
];
|
|
17
|
-
const allowedPhysicalProperties = [
|
|
18
|
-
"bottom",
|
|
19
|
-
"border-bottom",
|
|
20
|
-
"border-bottom-color",
|
|
21
|
-
"border-bottom-style",
|
|
22
|
-
"border-bottom-width",
|
|
23
|
-
"border-top",
|
|
24
|
-
"border-top-color",
|
|
25
|
-
"border-top-style",
|
|
26
|
-
"border-top-width",
|
|
27
|
-
"contain-intrinsic-height",
|
|
28
|
-
"contain-intrinsic-width",
|
|
29
|
-
"height",
|
|
30
|
-
"margin-bottom",
|
|
31
|
-
"margin-top",
|
|
32
|
-
"max-height",
|
|
33
|
-
"max-width",
|
|
34
|
-
"min-height",
|
|
35
|
-
"min-width",
|
|
36
|
-
"overflow-x",
|
|
37
|
-
"overflow-y",
|
|
38
|
-
"overscroll-behavior-x",
|
|
39
|
-
"overscroll-behavior-y",
|
|
40
|
-
"padding-bottom",
|
|
41
|
-
"padding-top",
|
|
42
|
-
"scroll-margin-bottom",
|
|
43
|
-
"scroll-margin-top",
|
|
44
|
-
"scroll-padding-bottom",
|
|
45
|
-
"scroll-padding-top",
|
|
46
|
-
"top",
|
|
47
|
-
"width"
|
|
48
|
-
];
|
|
49
|
-
function getCSSRules(options) {
|
|
50
|
-
const { css } = options.configs;
|
|
51
|
-
const { useBaseline, allowedRelativeFontUnits } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(css) ? css : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.css;
|
|
52
|
-
const cssRules = {
|
|
53
|
-
"css/no-invalid-properties": ["error", { allowUnknownVariables: true }],
|
|
54
|
-
"css/relative-font-units": ["warn", { allowUnits: allowedRelativeFontUnits }],
|
|
55
|
-
"css/use-baseline": useBaseline ? ["warn", { available: useBaseline }] : "off",
|
|
56
|
-
"css/prefer-logical-properties": ["error", {
|
|
57
|
-
allowUnits: allowedPhysicalUnits,
|
|
58
|
-
allowProperties: allowedPhysicalProperties
|
|
59
|
-
}]
|
|
60
|
-
};
|
|
61
|
-
return cssRules;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//#endregion
|
|
65
|
-
exports.getCSSRules = getCSSRules;
|
package/dist/rules/cypress.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/rules/cypress.ts
|
|
3
|
-
function getCypressRules() {
|
|
4
|
-
const cypressRules = {
|
|
5
|
-
"cypress/no-force": "error",
|
|
6
|
-
"cypress/no-pause": "error",
|
|
7
|
-
"cypress/no-xpath": "error",
|
|
8
|
-
"cypress/no-async-tests": "off",
|
|
9
|
-
"cypress/no-chained-get": "error",
|
|
10
|
-
"cypress/assertion-before-screenshot": "error"
|
|
11
|
-
};
|
|
12
|
-
return cypressRules;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.getCypressRules = getCypressRules;
|
package/dist/rules/html.cjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled = require('../utils/isEnabled.cjs');
|
|
2
|
-
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions = require('../utils/options/defaultOptions.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/rules/html.ts
|
|
5
|
-
function getHTMLRules(options) {
|
|
6
|
-
const { html, stylistic } = options.configs;
|
|
7
|
-
const { useBaseline, idNamingConvention } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(html) ? html : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.html;
|
|
8
|
-
const { indent, useTabs, maxAttributesPerLine, maxConsecutiveEmptyLines, selfCloseVoidHTMLElements } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(stylistic) ? stylistic : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.stylistic;
|
|
9
|
-
const htmlRules = {
|
|
10
|
-
"better-tailwindcss/no-duplicate-classes": "off",
|
|
11
|
-
"@html-eslint/no-target-blank": "error",
|
|
12
|
-
"@html-eslint/no-duplicate-class": "warn",
|
|
13
|
-
"@html-eslint/require-button-type": "error",
|
|
14
|
-
"@html-eslint/no-script-style-type": "error",
|
|
15
|
-
"@html-eslint/require-meta-charset": "error",
|
|
16
|
-
"@html-eslint/quotes": [
|
|
17
|
-
"warn",
|
|
18
|
-
"double",
|
|
19
|
-
{ enforceTemplatedAttrValue: true }
|
|
20
|
-
],
|
|
21
|
-
"@html-eslint/use-baseline": useBaseline ? ["warn", { available: useBaseline }] : "off",
|
|
22
|
-
"@html-eslint/require-closing-tags": ["error", {
|
|
23
|
-
selfClosingCustomPatterns: ["-"],
|
|
24
|
-
selfClosing: selfCloseVoidHTMLElements
|
|
25
|
-
}],
|
|
26
|
-
"@html-eslint/require-meta-description": "error",
|
|
27
|
-
"@html-eslint/require-open-graph-protocol": "error",
|
|
28
|
-
"@html-eslint/no-abstract-roles": "error",
|
|
29
|
-
"@html-eslint/no-accesskey-attrs": "error",
|
|
30
|
-
"@html-eslint/require-frame-title": "error",
|
|
31
|
-
"@html-eslint/no-aria-hidden-body": "error",
|
|
32
|
-
"@html-eslint/no-positive-tabindex": "error",
|
|
33
|
-
"@html-eslint/require-meta-viewport": "error",
|
|
34
|
-
"@html-eslint/no-skip-heading-levels": "error",
|
|
35
|
-
"@html-eslint/lowercase": "warn",
|
|
36
|
-
"@html-eslint/no-trailing-spaces": "warn",
|
|
37
|
-
"@html-eslint/indent": ["warn", useTabs ? "tab" : indent],
|
|
38
|
-
"@html-eslint/id-naming-convention": ["warn", idNamingConvention],
|
|
39
|
-
"@html-eslint/element-newline": ["warn", { inline: ["$inline"] }],
|
|
40
|
-
"@html-eslint/attrs-newline": ["warn", { ifAttrsMoreThan: maxAttributesPerLine }],
|
|
41
|
-
"@html-eslint/no-multiple-empty-lines": ["warn", { max: maxConsecutiveEmptyLines }],
|
|
42
|
-
"@html-eslint/no-extra-spacing-attrs": ["warn", {
|
|
43
|
-
disallowTabs: true,
|
|
44
|
-
disallowMissing: true,
|
|
45
|
-
disallowInAssignment: true,
|
|
46
|
-
enforceBeforeSelfClose: true
|
|
47
|
-
}]
|
|
48
|
-
};
|
|
49
|
-
return htmlRules;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
//#endregion
|
|
53
|
-
exports.getHTMLRules = getHTMLRules;
|
package/dist/rules/importX.cjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
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 node_path = require_rolldown_runtime.__toESM(require("node:path"));
|
|
5
|
-
|
|
6
|
-
//#region src/rules/importX.ts
|
|
7
|
-
function getImportXRules(options) {
|
|
8
|
-
const { packageDir, configs: { importX } } = options;
|
|
9
|
-
const { removeUnusedImports, requireFileExtension } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(importX) ? importX : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.importX;
|
|
10
|
-
const importXRules = {
|
|
11
|
-
"unused-imports/no-unused-imports": removeUnusedImports ? "warn" : "off",
|
|
12
|
-
"import-x/extensions": "off",
|
|
13
|
-
"import/extensions": [
|
|
14
|
-
requireFileExtension ? "warn" : "off",
|
|
15
|
-
"always",
|
|
16
|
-
{
|
|
17
|
-
ignorePackages: true,
|
|
18
|
-
checkTypeImports: true
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"import-x/no-amd": "error",
|
|
22
|
-
"import-x/exports-last": "warn",
|
|
23
|
-
"import-x/no-commonjs": "error",
|
|
24
|
-
"import-x/no-deprecated": "warn",
|
|
25
|
-
"import-x/group-exports": "warn",
|
|
26
|
-
"import-x/no-self-import": "error",
|
|
27
|
-
"import-x/no-absolute-path": "warn",
|
|
28
|
-
"import-x/no-named-default": "error",
|
|
29
|
-
"import-x/no-mutable-exports": "error",
|
|
30
|
-
"import-x/no-empty-named-blocks": "error",
|
|
31
|
-
"import-x/no-named-as-default-member": "off",
|
|
32
|
-
"import-x/no-import-module-exports": "error",
|
|
33
|
-
"import-x/no-useless-path-segments": "error",
|
|
34
|
-
"import-x/consistent-type-specifier-style": "warn",
|
|
35
|
-
"import-x/first": ["warn", "disable-absolute-first"],
|
|
36
|
-
"import-x/namespace": ["error", { allowComputed: true }],
|
|
37
|
-
"import-x/no-duplicates": ["error", { considerQueryString: true }],
|
|
38
|
-
"import-x/no-cycle": ["error", {
|
|
39
|
-
maxDepth: 1,
|
|
40
|
-
ignoreExternal: true
|
|
41
|
-
}],
|
|
42
|
-
"import-x/no-extraneous-dependencies": ["error", {
|
|
43
|
-
includeTypes: true,
|
|
44
|
-
packageDir: node_path.default.resolve(packageDir)
|
|
45
|
-
}]
|
|
46
|
-
};
|
|
47
|
-
return importXRules;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
|
-
exports.getImportXRules = getImportXRules;
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/rules/javascript.ts
|
|
3
|
-
function getJavaScriptRules(options) {
|
|
4
|
-
const { maxDepth, functionStyle, maxNestedCallbacks, preferNamedExports } = options.configs.base;
|
|
5
|
-
const javascriptRules = {
|
|
6
|
-
"no-self-compare": "warn",
|
|
7
|
-
"no-await-in-loop": "error",
|
|
8
|
-
"no-unassigned-vars": "error",
|
|
9
|
-
"no-unreachable-loop": "warn",
|
|
10
|
-
"no-inner-declarations": "warn",
|
|
11
|
-
"require-atomic-updates": "warn",
|
|
12
|
-
"array-callback-return": "error",
|
|
13
|
-
"no-useless-assignment": "error",
|
|
14
|
-
"no-constructor-return": "error",
|
|
15
|
-
"no-async-promise-executor": "error",
|
|
16
|
-
"no-promise-executor-return": "error",
|
|
17
|
-
"no-template-curly-in-string": "error",
|
|
18
|
-
"no-unmodified-loop-condition": "error",
|
|
19
|
-
"use-isnan": ["error", { enforceForIndexOf: true }],
|
|
20
|
-
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
|
21
|
-
"no-unsafe-negation": ["error", { enforceForOrderingRelations: true }],
|
|
22
|
-
"no-unsafe-optional-chaining": ["error", { disallowArithmeticOperators: true }],
|
|
23
|
-
"no-use-before-define": ["error", {
|
|
24
|
-
functions: false,
|
|
25
|
-
ignoreTypeReferences: false
|
|
26
|
-
}],
|
|
27
|
-
"no-duplicate-imports": ["error", {
|
|
28
|
-
includeExports: true,
|
|
29
|
-
allowSeparateTypeImports: true
|
|
30
|
-
}],
|
|
31
|
-
"yoda": "warn",
|
|
32
|
-
"strict": "error",
|
|
33
|
-
"no-var": "error",
|
|
34
|
-
"eqeqeq": "error",
|
|
35
|
-
"no-new": "error",
|
|
36
|
-
"new-cap": "warn",
|
|
37
|
-
"no-eval": "error",
|
|
38
|
-
"no-void": "error",
|
|
39
|
-
"no-proto": "warn",
|
|
40
|
-
"no-empty": "warn",
|
|
41
|
-
"camelcase": "warn",
|
|
42
|
-
"no-caller": "error",
|
|
43
|
-
"no-eq-null": "warn",
|
|
44
|
-
"complexity": "warn",
|
|
45
|
-
"sort-imports": "off",
|
|
46
|
-
"no-redeclare": "off",
|
|
47
|
-
"no-iterator": "warn",
|
|
48
|
-
"no-continue": "warn",
|
|
49
|
-
"no-new-func": "error",
|
|
50
|
-
"guard-for-in": "warn",
|
|
51
|
-
"no-loop-func": "warn",
|
|
52
|
-
"default-case": "warn",
|
|
53
|
-
"no-lonely-if": "error",
|
|
54
|
-
"no-label-var": "error",
|
|
55
|
-
"no-multi-str": "error",
|
|
56
|
-
"prefer-const": "error",
|
|
57
|
-
"require-await": "warn",
|
|
58
|
-
"dot-notation": "error",
|
|
59
|
-
"no-script-url": "error",
|
|
60
|
-
"no-undef-init": "error",
|
|
61
|
-
"no-extra-bind": "error",
|
|
62
|
-
"prefer-spread": "error",
|
|
63
|
-
"no-lone-blocks": "error",
|
|
64
|
-
"no-extra-label": "error",
|
|
65
|
-
"accessor-pairs": "error",
|
|
66
|
-
"prefer-template": "warn",
|
|
67
|
-
"no-invalid-this": "error",
|
|
68
|
-
"no-useless-call": "error",
|
|
69
|
-
"no-implied-eval": "error",
|
|
70
|
-
"consistent-this": "error",
|
|
71
|
-
"no-octal-escape": "error",
|
|
72
|
-
"no-new-wrappers": "error",
|
|
73
|
-
"block-scoped-var": "warn",
|
|
74
|
-
"object-shorthand": "warn",
|
|
75
|
-
"no-throw-literal": "error",
|
|
76
|
-
"no-extend-native": "error",
|
|
77
|
-
"default-case-last": "warn",
|
|
78
|
-
"no-nested-ternary": "warn",
|
|
79
|
-
"no-useless-return": "error",
|
|
80
|
-
"init-declarations": "error",
|
|
81
|
-
"consistent-return": "error",
|
|
82
|
-
"no-useless-concat": "error",
|
|
83
|
-
"no-useless-rename": "error",
|
|
84
|
-
"default-param-last": "warn",
|
|
85
|
-
"symbol-description": "warn",
|
|
86
|
-
"func-name-matching": "warn",
|
|
87
|
-
"prefer-rest-params": "error",
|
|
88
|
-
"operator-assignment": "error",
|
|
89
|
-
"no-unneeded-ternary": "error",
|
|
90
|
-
"no-implicit-globals": "error",
|
|
91
|
-
"prefer-destructuring": "warn",
|
|
92
|
-
"no-implicit-coercion": "error",
|
|
93
|
-
"no-array-constructor": "error",
|
|
94
|
-
"no-underscore-dangle": "error",
|
|
95
|
-
"prefer-object-spread": "error",
|
|
96
|
-
"radix": ["error", "as-needed"],
|
|
97
|
-
"curly": ["warn", "multi-line"],
|
|
98
|
-
"max-depth": ["warn", maxDepth],
|
|
99
|
-
"no-object-constructor": "error",
|
|
100
|
-
"prefer-object-has-own": "error",
|
|
101
|
-
"no-useless-constructor": "error",
|
|
102
|
-
"class-methods-use-this": "error",
|
|
103
|
-
"prefer-numeric-literals": "error",
|
|
104
|
-
"no-useless-computed-key": "error",
|
|
105
|
-
"prefer-named-capture-group": "warn",
|
|
106
|
-
"no-return-assign": ["error", "always"],
|
|
107
|
-
"prefer-exponentiation-operator": "error",
|
|
108
|
-
"no-bitwise": ["error", { int32Hint: true }],
|
|
109
|
-
"max-params": ["warn", { countVoidThis: true }],
|
|
110
|
-
"logical-assignment-operators": ["error", "always"],
|
|
111
|
-
"max-nested-callbacks": ["warn", maxNestedCallbacks],
|
|
112
|
-
"no-sequences": ["error", { allowInParentheses: false }],
|
|
113
|
-
"no-multi-assign": ["error", { ignoreNonDeclaration: true }],
|
|
114
|
-
"no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
|
|
115
|
-
"prefer-arrow-callback": ["error", { allowUnboundThis: true }],
|
|
116
|
-
"no-shadow-restricted-names": ["warn", { reportGlobalThis: true }],
|
|
117
|
-
"func-style": [
|
|
118
|
-
"warn",
|
|
119
|
-
functionStyle,
|
|
120
|
-
{ allowTypeAnnotation: true }
|
|
121
|
-
],
|
|
122
|
-
"prefer-promise-reject-errors": ["error", { allowEmptyReject: true }],
|
|
123
|
-
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
124
|
-
"no-extra-boolean-cast": ["error", { enforceForInnerExpressions: true }],
|
|
125
|
-
"no-console": ["warn", { allow: [
|
|
126
|
-
"info",
|
|
127
|
-
"warn",
|
|
128
|
-
"error",
|
|
129
|
-
"table",
|
|
130
|
-
"group",
|
|
131
|
-
"groupEnd",
|
|
132
|
-
"groupCollapsed"
|
|
133
|
-
] }],
|
|
134
|
-
"no-shadow": ["error", {
|
|
135
|
-
hoist: "all",
|
|
136
|
-
allow: ["name"],
|
|
137
|
-
builtinGlobals: true,
|
|
138
|
-
ignoreTypeValueShadow: false,
|
|
139
|
-
ignoreFunctionTypeParameterNameValueShadow: false
|
|
140
|
-
}],
|
|
141
|
-
"no-restricted-exports": [preferNamedExports ? "error" : "off", { restrictDefaultExports: {
|
|
142
|
-
named: true,
|
|
143
|
-
namedFrom: true,
|
|
144
|
-
defaultFrom: true,
|
|
145
|
-
namespaceFrom: true
|
|
146
|
-
} }],
|
|
147
|
-
"no-empty-function": ["error", { allow: [
|
|
148
|
-
"overrideMethods",
|
|
149
|
-
"decoratedFunctions",
|
|
150
|
-
"privateConstructors",
|
|
151
|
-
"protectedConstructors"
|
|
152
|
-
] }],
|
|
153
|
-
"no-unused-expressions": ["error", {
|
|
154
|
-
allowTernary: true,
|
|
155
|
-
enforceForJSX: true,
|
|
156
|
-
allowShortCircuit: true,
|
|
157
|
-
allowTaggedTemplates: true
|
|
158
|
-
}]
|
|
159
|
-
};
|
|
160
|
-
return javascriptRules;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
//#endregion
|
|
164
|
-
exports.getJavaScriptRules = getJavaScriptRules;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled = require('../utils/isEnabled.cjs');
|
|
2
|
-
const require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions = require('../utils/options/defaultOptions.cjs');
|
|
3
|
-
|
|
4
|
-
//#region src/rules/perfectionist.ts
|
|
5
|
-
function getPerfectionistRules(options) {
|
|
6
|
-
const { env, tsConfig, configs: { stylistic, perfectionist } } = options;
|
|
7
|
-
const { maxLineLength } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(stylistic) ? stylistic : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.stylistic;
|
|
8
|
-
const { sortType } = require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_isEnabled.isEnabled(perfectionist) ? perfectionist : require__Users_shayan_Desktop_Dev_GitHub_eslint_config_src_utils_options_defaultOptions.defaultOptions.configs.perfectionist;
|
|
9
|
-
const perfectionistRules = {
|
|
10
|
-
"perfectionist/sort-maps": "warn",
|
|
11
|
-
"perfectionist/sort-exports": "warn",
|
|
12
|
-
"perfectionist/sort-union-types": "warn",
|
|
13
|
-
"perfectionist/sort-array-includes": "warn",
|
|
14
|
-
"perfectionist/sort-intersection-types": "warn",
|
|
15
|
-
"perfectionist/sort-named-imports": ["warn", { groupKind: "types-first" }],
|
|
16
|
-
"perfectionist/sort-named-exports": ["warn", { groupKind: "types-first" }],
|
|
17
|
-
"perfectionist/sort-imports": ["warn", {
|
|
18
|
-
environment: env,
|
|
19
|
-
tsconfig: tsConfig || void 0,
|
|
20
|
-
sortSideEffects: true,
|
|
21
|
-
fallbackSort: {
|
|
22
|
-
order: "asc",
|
|
23
|
-
type: "natural"
|
|
24
|
-
},
|
|
25
|
-
partitionByComment: true,
|
|
26
|
-
specialCharacters: "trim",
|
|
27
|
-
type: sortType,
|
|
28
|
-
maxLineLength,
|
|
29
|
-
customGroups: [{
|
|
30
|
-
groupName: "vue-sfc",
|
|
31
|
-
elementNamePattern: ["\\.(vue|[jt]sx)$"]
|
|
32
|
-
}, {
|
|
33
|
-
groupName: "image",
|
|
34
|
-
elementNamePattern: ["\\.(ico|svg|gif|png|jpe?g|webp|avif|heic)$"]
|
|
35
|
-
}],
|
|
36
|
-
groups: [
|
|
37
|
-
["style", "side-effect-style"],
|
|
38
|
-
{ newlinesBetween: 0 },
|
|
39
|
-
"side-effect",
|
|
40
|
-
"image",
|
|
41
|
-
"vue-sfc",
|
|
42
|
-
"type-external",
|
|
43
|
-
{ newlinesBetween: 0 },
|
|
44
|
-
"type-builtin",
|
|
45
|
-
{ newlinesBetween: 0 },
|
|
46
|
-
["type-tsconfig-path", "type-subpath"],
|
|
47
|
-
{ newlinesBetween: 0 },
|
|
48
|
-
[
|
|
49
|
-
"type-internal",
|
|
50
|
-
"type-index",
|
|
51
|
-
"type-parent",
|
|
52
|
-
"type-sibling"
|
|
53
|
-
],
|
|
54
|
-
"external",
|
|
55
|
-
{ newlinesBetween: 0 },
|
|
56
|
-
"builtin",
|
|
57
|
-
["tsconfig-path", "subpath"],
|
|
58
|
-
{ newlinesBetween: 0 },
|
|
59
|
-
[
|
|
60
|
-
"internal",
|
|
61
|
-
"index",
|
|
62
|
-
"parent",
|
|
63
|
-
"sibling"
|
|
64
|
-
],
|
|
65
|
-
["import", "unknown"]
|
|
66
|
-
]
|
|
67
|
-
}]
|
|
68
|
-
};
|
|
69
|
-
return perfectionistRules;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
//#endregion
|
|
73
|
-
exports.getPerfectionistRules = getPerfectionistRules;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/rules/playwright.ts
|
|
3
|
-
function getPlaywrightRules(options) {
|
|
4
|
-
const { maxNestedDescribe } = options.configs.test;
|
|
5
|
-
const playwrightRules = {
|
|
6
|
-
"playwright/max-expects": "off",
|
|
7
|
-
"playwright/prefer-to-be": "warn",
|
|
8
|
-
"playwright/no-get-by-title": "error",
|
|
9
|
-
"playwright/prefer-to-contain": "warn",
|
|
10
|
-
"playwright/no-wait-for-timeout": "off",
|
|
11
|
-
"playwright/no-duplicate-hooks": "error",
|
|
12
|
-
"playwright/prefer-strict-equal": "warn",
|
|
13
|
-
"playwright/prefer-hooks-on-top": "warn",
|
|
14
|
-
"playwright/prefer-to-have-count": "warn",
|
|
15
|
-
"playwright/prefer-hooks-in-order": "warn",
|
|
16
|
-
"playwright/prefer-to-have-length": "warn",
|
|
17
|
-
"playwright/no-commented-out-tests": "error",
|
|
18
|
-
"playwright/prefer-equality-matcher": "warn",
|
|
19
|
-
"playwright/require-to-throw-message": "error",
|
|
20
|
-
"playwright/prefer-comparison-matcher": "warn",
|
|
21
|
-
"playwright/max-nested-describe": ["warn", { max: maxNestedDescribe }],
|
|
22
|
-
"playwright/prefer-lowercase-title": ["warn", { ignoreTopLevelDescribe: true }]
|
|
23
|
-
};
|
|
24
|
-
return playwrightRules;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
exports.getPlaywrightRules = getPlaywrightRules;
|
package/dist/rules/storybook.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const node_path = require_rolldown_runtime.__toESM(require("node:path"));
|
|
3
|
-
|
|
4
|
-
//#region src/rules/storybook.ts
|
|
5
|
-
function getStorybookRules(options) {
|
|
6
|
-
const storybookRules = {
|
|
7
|
-
"storybook/csf-component": "error",
|
|
8
|
-
"storybook/no-stories-of": "error",
|
|
9
|
-
"storybook/meta-satisfies-type": "warn",
|
|
10
|
-
"storybook/no-uninstalled-addons": ["error", { packageJsonLocation: node_path.default.resolve(options.packageDir, "package.json") }]
|
|
11
|
-
};
|
|
12
|
-
return storybookRules;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//#endregion
|
|
16
|
-
exports.getStorybookRules = getStorybookRules;
|