@jsse/eslint-config 0.8.4 → 0.8.5
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/CHANGELOG.md +7 -0
- package/dist/cli.js +1 -1
- package/dist/{const-D_tT7WuW.js → const-a9k0qaHM.js} +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +33 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { Linter } from "eslint";
|
|
|
16
16
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
17
17
|
|
|
18
18
|
//#region src/_generated/version.d.ts
|
|
19
|
-
declare const VERSION = "0.8.
|
|
19
|
+
declare const VERSION = "0.8.5";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/_generated/dts/builtins.d.ts
|
|
22
22
|
interface BuiltinsRuleOptions {
|
|
@@ -16394,6 +16394,11 @@ type OptionsConfig = OptionsComponentExts & OptionsTypeScriptParserOptions & {
|
|
|
16394
16394
|
* @default true
|
|
16395
16395
|
*/
|
|
16396
16396
|
sortTsconfig?: boolean;
|
|
16397
|
+
/**
|
|
16398
|
+
* Enable sorting of geojson files.
|
|
16399
|
+
* @default false
|
|
16400
|
+
*/
|
|
16401
|
+
sortGeojson?: boolean;
|
|
16397
16402
|
/**
|
|
16398
16403
|
* Enable import/export sorting via perfectionist.
|
|
16399
16404
|
* @default false
|
|
@@ -16490,7 +16495,7 @@ declare function jsse(options?: OptionsConfig & Config, ...userConfigs: (Config
|
|
|
16490
16495
|
declare function defineConfig(options?: OptionsConfig & Config, ...userConfigs: (Config | Config[])[]): Promise<Config[]>;
|
|
16491
16496
|
type DefineConfig = typeof defineConfig;
|
|
16492
16497
|
declare namespace globs_d_exports {
|
|
16493
|
-
export { GLOB_ALL_SRC, GLOB_CODE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JS_SRC_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_TS_SRC_EXT, GLOB_YAML };
|
|
16498
|
+
export { GLOB_ALL_SRC, GLOB_CODE, GLOB_CSS, GLOB_EXCLUDE, GLOB_GEOJSON, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JS_SRC_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_TS_SRC_EXT, GLOB_YAML };
|
|
16494
16499
|
}
|
|
16495
16500
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
16496
16501
|
declare const GLOB_JS_SRC_EXT = "?([cm])js?(x)";
|
|
@@ -16507,6 +16512,7 @@ declare const GLOB_SCSS = "**/*.scss";
|
|
|
16507
16512
|
declare const GLOB_JSON = "**/*.json";
|
|
16508
16513
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
16509
16514
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
16515
|
+
declare const GLOB_GEOJSON = "**/*.geojson";
|
|
16510
16516
|
declare const GLOB_TOML = "**/*.toml";
|
|
16511
16517
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
16512
16518
|
declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-DJK8HYOj.js";
|
|
2
|
-
import { n as SLOW_RULES, r as VERSION, t as DEBUG } from "./const-
|
|
2
|
+
import { n as SLOW_RULES, r as VERSION, t as DEBUG } from "./const-a9k0qaHM.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import process$1 from "node:process";
|
|
5
5
|
import fs, { realpathSync, statSync } from "node:fs";
|
|
@@ -33,6 +33,7 @@ var globs_exports = /* @__PURE__ */ __exportAll({
|
|
|
33
33
|
GLOB_CODE: () => GLOB_CODE,
|
|
34
34
|
GLOB_CSS: () => GLOB_CSS,
|
|
35
35
|
GLOB_EXCLUDE: () => GLOB_EXCLUDE,
|
|
36
|
+
GLOB_GEOJSON: () => GLOB_GEOJSON,
|
|
36
37
|
GLOB_GRAPHQL: () => GLOB_GRAPHQL,
|
|
37
38
|
GLOB_HTML: () => GLOB_HTML,
|
|
38
39
|
GLOB_JS: () => GLOB_JS,
|
|
@@ -72,6 +73,7 @@ const GLOB_SCSS = "**/*.scss";
|
|
|
72
73
|
const GLOB_JSON = "**/*.json";
|
|
73
74
|
const GLOB_JSON5 = "**/*.json5";
|
|
74
75
|
const GLOB_JSONC = "**/*.jsonc";
|
|
76
|
+
const GLOB_GEOJSON = "**/*.geojson";
|
|
75
77
|
const GLOB_TOML = "**/*.toml";
|
|
76
78
|
const GLOB_MARKDOWN = "**/*.md";
|
|
77
79
|
const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
|
|
@@ -4964,7 +4966,8 @@ const jsonc = async (options) => {
|
|
|
4964
4966
|
files: [
|
|
4965
4967
|
GLOB_JSON,
|
|
4966
4968
|
GLOB_JSON5,
|
|
4967
|
-
GLOB_JSONC
|
|
4969
|
+
GLOB_JSONC,
|
|
4970
|
+
GLOB_GEOJSON
|
|
4968
4971
|
],
|
|
4969
4972
|
ignores: ["*.min.json"],
|
|
4970
4973
|
languageOptions: { parser: parserJsonc },
|
|
@@ -6075,6 +6078,31 @@ const yml = async (options) => {
|
|
|
6075
6078
|
}];
|
|
6076
6079
|
};
|
|
6077
6080
|
//#endregion
|
|
6081
|
+
//#region src/configs/sort-geojson.ts
|
|
6082
|
+
const sortGeojson = async () => {
|
|
6083
|
+
return [{
|
|
6084
|
+
files: [GLOB_GEOJSON, "!**/*.min.geojson"],
|
|
6085
|
+
name: "jsse/sort/geojson",
|
|
6086
|
+
rules: { "jsonc/sort-keys": ["error", {
|
|
6087
|
+
order: [
|
|
6088
|
+
"type",
|
|
6089
|
+
"id",
|
|
6090
|
+
"name",
|
|
6091
|
+
"crs",
|
|
6092
|
+
"bbox",
|
|
6093
|
+
"features",
|
|
6094
|
+
"geometry",
|
|
6095
|
+
"properties",
|
|
6096
|
+
{
|
|
6097
|
+
keyPattern: ".*",
|
|
6098
|
+
order: { type: "asc" }
|
|
6099
|
+
}
|
|
6100
|
+
],
|
|
6101
|
+
pathPattern: ".*"
|
|
6102
|
+
}] }
|
|
6103
|
+
}];
|
|
6104
|
+
};
|
|
6105
|
+
//#endregion
|
|
6078
6106
|
//#region node_modules/.pnpm/acorn@8.17.0/node_modules/acorn/dist/acorn.mjs
|
|
6079
6107
|
var astralIdentifierCodes = [
|
|
6080
6108
|
509,
|
|
@@ -12609,6 +12637,7 @@ function defaultOptions() {
|
|
|
12609
12637
|
regexp: true,
|
|
12610
12638
|
reportUnusedDisableDirectives: true,
|
|
12611
12639
|
rootId: "jsse",
|
|
12640
|
+
sortGeojson: false,
|
|
12612
12641
|
sortImports: false,
|
|
12613
12642
|
sortPackageJson: true,
|
|
12614
12643
|
sortTsconfig: true,
|
|
@@ -12698,7 +12727,7 @@ const FLAT_CFG_PROPS = [
|
|
|
12698
12727
|
*/
|
|
12699
12728
|
async function jsse(options = {}, ...userConfigs) {
|
|
12700
12729
|
const normalizedOptions = normalizeOptions(options);
|
|
12701
|
-
const { command: enableCommand, componentExts, debug = false, gitignore: enableGitignore, isInEditor, jsonc: enableJsonc, markdown: enableMarkdown, off, overrides = {}, pnpm: enablePnpm, prettier: enablePrettier, react: enableReact, regexp: enableRegexp, reportUnusedDisableDirectives, rootId, sortImports: enableSortImports, sortPackageJson: enableSortPackageJson, sortTsconfig: enableSortTsconfig, stylistic: stylisticOptions, tailwind: tailwindOptions, test: enableTest, tsPrefix, typescript: typescriptOptions, yaml: enableYaml } = normalizedOptions;
|
|
12730
|
+
const { command: enableCommand, componentExts, debug = false, gitignore: enableGitignore, isInEditor, jsonc: enableJsonc, markdown: enableMarkdown, off, overrides = {}, pnpm: enablePnpm, prettier: enablePrettier, react: enableReact, regexp: enableRegexp, reportUnusedDisableDirectives, rootId, sortGeojson: enableSortGeojson, sortImports: enableSortImports, sortPackageJson: enableSortPackageJson, sortTsconfig: enableSortTsconfig, stylistic: stylisticOptions, tailwind: tailwindOptions, test: enableTest, tsPrefix, typescript: typescriptOptions, yaml: enableYaml } = normalizedOptions;
|
|
12702
12731
|
if (debug || process$1.argv.includes("--debug")) enableDbg();
|
|
12703
12732
|
dbg("@jsse/eslint-config debug=true");
|
|
12704
12733
|
dbg("@jsse/eslint-config isInEditor: %O", isInEditor);
|
|
@@ -12780,6 +12809,7 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
12780
12809
|
}));
|
|
12781
12810
|
if (enableSortPackageJson) configs.push(sortPackageJson());
|
|
12782
12811
|
if (enableSortTsconfig) configs.push(sortTsconfig({ extendTsconfigGlobs: normalizedOptions.extendTsconfigLintGlobs }));
|
|
12812
|
+
if (enableSortGeojson) configs.push(sortGeojson());
|
|
12783
12813
|
}
|
|
12784
12814
|
if (tailwindOptions) console.error("Tailwind configuration is deprecated...");
|
|
12785
12815
|
const fusedConfig = FLAT_CFG_PROPS.reduce((acc, key) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/cli.ts","../src/config-fns.ts","../src/configs.test.ts","../src/const.ts","../src/define-config.ts","../src/fixable.test.ts","../src/fixable.ts","../src/globs.ts","../src/index.ts","../src/lager.ts","../src/options.test.ts","../src/options.ts","../src/plugins-all.test.ts","../src/plugins-all.ts","../src/plugins.ts","../src/postprocess.test.ts","../src/postprocess.ts","../src/presets.ts","../src/types.ts","../src/utils.ts","../src/_generated/fixable-rules-map.ts","../src/_generated/rule-options.d.ts","../src/_generated/version.ts","../src/_generated/dts/antfu.d.ts","../src/_generated/dts/builtins.d.ts","../src/_generated/dts/command.d.ts","../src/_generated/dts/de-morgan.d.ts","../src/_generated/dts/e18e.d.ts","../src/_generated/dts/eslint-comments.d.ts","../src/_generated/dts/eslint-react.d.ts","../src/_generated/dts/ignores.d.ts","../src/_generated/dts/imports.d.ts","../src/_generated/dts/javascript.d.ts","../src/_generated/dts/jsdoc.d.ts","../src/_generated/dts/jsonc.d.ts","../src/_generated/dts/markdown.d.ts","../src/_generated/dts/n.d.ts","../src/_generated/dts/no-only-tests.d.ts","../src/_generated/dts/perfectionist.d.ts","../src/_generated/dts/pnpm.d.ts","../src/_generated/dts/prettier.d.ts","../src/_generated/dts/react-hooks.d.ts","../src/_generated/dts/regexp.d.ts","../src/_generated/dts/sort-package-json.d.ts","../src/_generated/dts/sort-tsconfig.d.ts","../src/_generated/dts/stylistic.d.ts","../src/_generated/dts/toml.d.ts","../src/_generated/dts/typescript.d.ts","../src/_generated/dts/unicorn.d.ts","../src/_generated/dts/vitest.d.ts","../src/_generated/dts/yml.d.ts","../src/configs/_template.ts","../src/configs/antfu.ts","../src/configs/command.ts","../src/configs/de-morgan.ts","../src/configs/disables.ts","../src/configs/e18e.ts","../src/configs/eslint-comments.ts","../src/configs/eslint-react.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/jsonc.ts","../src/configs/markdown.ts","../src/configs/n.ts","../src/configs/no-only-tests.ts","../src/configs/perfectionist.ts","../src/configs/pnpm.ts","../src/configs/prettier.ts","../src/configs/react-hooks.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/rules.test.ts","../src/configs/sort-package-json.ts","../src/configs/sort-tsconfig.ts","../src/configs/stylistic.ts","../src/configs/toml.ts","../src/configs/tsdoc.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/yml.ts","../src/configs/_legacy/tailwind.ts","../src/configs/ts/parser.ts","../src/configs/ts/requires-type-checking.ts","../src/configs/ts/typescript-language-options.ts","../src/configs/ts/typescript-rules.ts","../src/configs/ts/typescript.ts"],"version":"6.0.3"}
|
|
1
|
+
{"root":["../src/cli.ts","../src/config-fns.ts","../src/configs.test.ts","../src/const.ts","../src/define-config.ts","../src/fixable.test.ts","../src/fixable.ts","../src/globs.ts","../src/index.ts","../src/lager.ts","../src/options.test.ts","../src/options.ts","../src/plugins-all.test.ts","../src/plugins-all.ts","../src/plugins.ts","../src/postprocess.test.ts","../src/postprocess.ts","../src/presets.ts","../src/types.ts","../src/utils.ts","../src/_generated/fixable-rules-map.ts","../src/_generated/rule-options.d.ts","../src/_generated/version.ts","../src/_generated/dts/antfu.d.ts","../src/_generated/dts/builtins.d.ts","../src/_generated/dts/command.d.ts","../src/_generated/dts/de-morgan.d.ts","../src/_generated/dts/e18e.d.ts","../src/_generated/dts/eslint-comments.d.ts","../src/_generated/dts/eslint-react.d.ts","../src/_generated/dts/ignores.d.ts","../src/_generated/dts/imports.d.ts","../src/_generated/dts/javascript.d.ts","../src/_generated/dts/jsdoc.d.ts","../src/_generated/dts/jsonc.d.ts","../src/_generated/dts/markdown.d.ts","../src/_generated/dts/n.d.ts","../src/_generated/dts/no-only-tests.d.ts","../src/_generated/dts/perfectionist.d.ts","../src/_generated/dts/pnpm.d.ts","../src/_generated/dts/prettier.d.ts","../src/_generated/dts/react-hooks.d.ts","../src/_generated/dts/regexp.d.ts","../src/_generated/dts/sort-package-json.d.ts","../src/_generated/dts/sort-tsconfig.d.ts","../src/_generated/dts/stylistic.d.ts","../src/_generated/dts/toml.d.ts","../src/_generated/dts/typescript.d.ts","../src/_generated/dts/unicorn.d.ts","../src/_generated/dts/vitest.d.ts","../src/_generated/dts/yml.d.ts","../src/configs/_template.ts","../src/configs/antfu.ts","../src/configs/command.ts","../src/configs/de-morgan.ts","../src/configs/disables.ts","../src/configs/e18e.ts","../src/configs/eslint-comments.ts","../src/configs/eslint-react.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/jsdoc.ts","../src/configs/jsonc.ts","../src/configs/markdown.ts","../src/configs/n.ts","../src/configs/no-only-tests.ts","../src/configs/perfectionist.ts","../src/configs/pnpm.ts","../src/configs/prettier.ts","../src/configs/react-hooks.ts","../src/configs/react.ts","../src/configs/regexp.ts","../src/configs/rules.test.ts","../src/configs/sort-geojson.ts","../src/configs/sort-package-json.ts","../src/configs/sort-tsconfig.ts","../src/configs/stylistic.ts","../src/configs/toml.ts","../src/configs/tsdoc.ts","../src/configs/unicorn.ts","../src/configs/vitest.ts","../src/configs/yml.ts","../src/configs/_legacy/tailwind.ts","../src/configs/ts/parser.ts","../src/configs/ts/requires-type-checking.ts","../src/configs/ts/typescript-language-options.ts","../src/configs/ts/typescript-rules.ts","../src/configs/ts/typescript.ts"],"version":"6.0.3"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsse/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.5",
|
|
5
5
|
"description": "@jsse/eslint-config ~ WYSIWYG",
|
|
6
6
|
"author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@eslint-react/eslint-plugin": "^5.6.0",
|
|
39
|
-
"@vitest/eslint-plugin": "^1.6.20",
|
|
40
39
|
"eslint": "^10.5.0",
|
|
41
40
|
"eslint-plugin-react": "^7.37.5",
|
|
42
41
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -46,9 +45,6 @@
|
|
|
46
45
|
"@eslint-react/eslint-plugin": {
|
|
47
46
|
"optional": true
|
|
48
47
|
},
|
|
49
|
-
"@vitest/eslint-plugin": {
|
|
50
|
-
"optional": true
|
|
51
|
-
},
|
|
52
48
|
"eslint": {
|
|
53
49
|
"optional": false
|
|
54
50
|
},
|
|
@@ -71,6 +67,7 @@
|
|
|
71
67
|
"@typescript-eslint/eslint-plugin": "^8.62.1",
|
|
72
68
|
"@typescript-eslint/parser": "^8.62.1",
|
|
73
69
|
"@typescript-eslint/rule-tester": "^8.62.1",
|
|
70
|
+
"@vitest/eslint-plugin": "^1.6.20",
|
|
74
71
|
"debug": "^4.4.3",
|
|
75
72
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
76
73
|
"eslint-merge-processors": "^2.0.0",
|