@eslinted/defaults 12.10.0 → 12.11.1
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/.github/workflows/RELEASE.yml +36 -36
- package/.github/workflows/rc.yml +36 -36
- package/.markdownlint.jsonc +97 -97
- package/.mocharc.yml +15 -15
- package/LICENSE +20 -20
- package/README.md +4 -4
- package/dist/index.d.ts +99 -912
- package/dist/index.d.ts.map +1 -1
- package/dist/rules/index.d.ts +99 -492
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/scopes/enable.d.ts +0 -2
- package/dist/rules/scopes/enable.d.ts.map +1 -1
- package/dist/rules/scopes/enable.js +0 -3
- package/dist/rules/scopes/enable.js.map +1 -1
- package/dist/rules/scopes/enable.style.d.ts +24 -134
- package/dist/rules/scopes/enable.style.d.ts.map +1 -1
- package/dist/rules/scopes/enable.style.js +22 -192
- package/dist/rules/scopes/enable.style.js.map +1 -1
- package/dist/rules/scopes/index.d.ts +24 -136
- package/dist/rules/scopes/index.d.ts.map +1 -1
- package/dist/rules/scopes/json/index.d.ts +7 -20
- package/dist/rules/scopes/json/index.d.ts.map +1 -1
- package/dist/rules/scopes/json/plugin/extension.d.ts +7 -20
- package/dist/rules/scopes/json/plugin/extension.d.ts.map +1 -1
- package/dist/rules/scopes/json/plugin/extension.js +7 -41
- package/dist/rules/scopes/json/plugin/extension.js.map +1 -1
- package/dist/rules/scopes/mocha/chai/index.d.ts +0 -2
- package/dist/rules/scopes/mocha/chai/index.d.ts.map +1 -1
- package/dist/rules/scopes/mocha/chai/index.js +0 -2
- package/dist/rules/scopes/mocha/chai/index.js.map +1 -1
- package/dist/rules/scopes/mocha/enable.d.ts +3 -10
- package/dist/rules/scopes/mocha/enable.d.ts.map +1 -1
- package/dist/rules/scopes/mocha/enable.js +3 -19
- package/dist/rules/scopes/mocha/enable.js.map +1 -1
- package/dist/rules/scopes/mocha/index.d.ts +3 -12
- package/dist/rules/scopes/mocha/index.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/enable.d.ts +19 -91
- package/dist/rules/scopes/svelte/enable.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/enable.js +20 -153
- package/dist/rules/scopes/svelte/enable.js.map +1 -1
- package/dist/rules/scopes/svelte/extension/index.d.ts +2 -7
- package/dist/rules/scopes/svelte/extension/index.d.ts.map +1 -1
- package/dist/rules/scopes/svelte/extension/index.js +2 -11
- package/dist/rules/scopes/svelte/extension/index.js.map +1 -1
- package/dist/rules/scopes/svelte/index.d.ts +21 -98
- package/dist/rules/scopes/svelte/index.d.ts.map +1 -1
- package/dist/rules/scopes/ts/enable.d.ts +31 -163
- package/dist/rules/scopes/ts/enable.d.ts.map +1 -1
- package/dist/rules/scopes/ts/enable.js +32 -380
- package/dist/rules/scopes/ts/enable.js.map +1 -1
- package/dist/rules/scopes/ts/extension/index.d.ts +1 -20
- package/dist/rules/scopes/ts/extension/index.d.ts.map +1 -1
- package/dist/rules/scopes/ts/extension/index.js +2 -25
- package/dist/rules/scopes/ts/extension/index.js.map +1 -1
- package/dist/rules/scopes/ts/index.d.ts +32 -183
- package/dist/rules/scopes/ts/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/index.d.ts +12 -43
- package/dist/rules/scopes/yml/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/extension.d.ts +5 -22
- package/dist/rules/scopes/yml/plugin/extension.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/extension.js +5 -36
- package/dist/rules/scopes/yml/plugin/extension.js.map +1 -1
- package/dist/rules/scopes/yml/plugin/index.d.ts +7 -21
- package/dist/rules/scopes/yml/plugin/index.d.ts.map +1 -1
- package/dist/rules/scopes/yml/plugin/index.js +8 -44
- package/dist/rules/scopes/yml/plugin/index.js.map +1 -1
- package/eslint.config.js +3 -3
- package/package.json +56 -56
- package/src/files/_factory/index.ts +76 -76
- package/src/files/_factory/project/index.ts +2 -2
- package/src/files/_factory/project/roots.ts +4 -4
- package/src/files/_factory/project/subroots.ts +8 -8
- package/src/files/index.ts +23 -23
- package/src/files/scopes/css.ts +5 -5
- package/src/files/scopes/html.ts +5 -5
- package/src/files/scopes/js.ts +5 -5
- package/src/files/scopes/json.ts +5 -5
- package/src/files/scopes/jsonc.ts +5 -5
- package/src/files/scopes/jsoncc.ts +9 -9
- package/src/files/scopes/mocha.ts +5 -5
- package/src/files/scopes/svelte.ts +5 -5
- package/src/files/scopes/ts.ts +5 -5
- package/src/files/scopes/yml.ts +8 -8
- package/src/ignores/global.ts +5 -5
- package/src/ignores/index.ts +25 -25
- package/src/ignores/scopes/css.ts +1 -1
- package/src/ignores/scopes/html.ts +1 -1
- package/src/ignores/scopes/js.ts +1 -1
- package/src/ignores/scopes/json.ts +1 -1
- package/src/ignores/scopes/jsonc.ts +1 -1
- package/src/ignores/scopes/jsoncc.ts +1 -1
- package/src/ignores/scopes/mocha.ts +1 -1
- package/src/ignores/scopes/svelte.ts +1 -1
- package/src/ignores/scopes/ts.ts +1 -1
- package/src/ignores/scopes/yml.ts +1 -1
- package/src/index.ts +10 -10
- package/src/rules/_strings/id.ts +21 -21
- package/src/rules/_strings/index.ts +3 -3
- package/src/rules/_strings/option.ts +30 -30
- package/src/rules/_strings/state.spec.ts +64 -64
- package/src/rules/_strings/state.ts +4 -4
- package/src/rules/index.ts +23 -23
- package/src/rules/scopes/css/enable.ts +31 -31
- package/src/rules/scopes/css/index.ts +3 -3
- package/src/rules/scopes/enable.style.ts +507 -705
- package/src/rules/scopes/enable.ts +390 -401
- package/src/rules/scopes/html/index.ts +3 -3
- package/src/rules/scopes/html/plugin/index.ts +113 -113
- package/src/rules/scopes/index.ts +7 -7
- package/src/rules/scopes/json/enable.ts +18 -18
- package/src/rules/scopes/json/index.ts +9 -9
- package/src/rules/scopes/json/plugin/extension.ts +60 -98
- package/src/rules/scopes/json/plugin/index.ts +35 -35
- package/src/rules/scopes/jsonc/index.ts +3 -3
- package/src/rules/scopes/jsonc/plugin/index.ts +12 -12
- package/src/rules/scopes/jsoncc/index.ts +3 -3
- package/src/rules/scopes/jsoncc/plugin/index.ts +16 -16
- package/src/rules/scopes/mocha/chai/expect.ts +16 -16
- package/src/rules/scopes/mocha/chai/index.ts +18 -20
- package/src/rules/scopes/mocha/disable.ts +13 -13
- package/src/rules/scopes/mocha/enable.ts +36 -52
- package/src/rules/scopes/mocha/index.ts +11 -11
- package/src/rules/scopes/svelte/disable.ts +19 -19
- package/src/rules/scopes/svelte/enable.ts +157 -292
- package/src/rules/scopes/svelte/extension/disable.ts +14 -14
- package/src/rules/scopes/svelte/extension/index.ts +17 -27
- package/src/rules/scopes/svelte/index.ts +11 -11
- package/src/rules/scopes/ts/disable.ts +30 -30
- package/src/rules/scopes/ts/enable.ts +188 -578
- package/src/rules/scopes/ts/extension/disable.ts +35 -35
- package/src/rules/scopes/ts/extension/index.ts +62 -87
- package/src/rules/scopes/ts/index.ts +11 -11
- package/src/rules/scopes/yml/index.ts +7 -7
- package/src/rules/scopes/yml/plugin/extension.ts +55 -88
- package/src/rules/scopes/yml/plugin/index.ts +38 -88
- package/src/settings/global/index.ts +6 -6
- package/src/settings/index.ts +7 -7
- package/src/settings/registry/index.ts +23 -23
- package/src/settings/registry/manifests/css.ts +9 -9
- package/src/settings/registry/manifests/html.ts +10 -10
- package/src/settings/registry/manifests/js.ts +8 -8
- package/src/settings/registry/manifests/json.ts +7 -7
- package/src/settings/registry/manifests/jsonc.ts +9 -9
- package/src/settings/registry/manifests/jsoncc.ts +9 -9
- package/src/settings/registry/manifests/mocha.ts +8 -8
- package/src/settings/registry/manifests/svelte.ts +10 -10
- package/src/settings/registry/manifests/ts.ts +30 -30
- package/src/settings/registry/manifests/yml.ts +9 -9
- package/tsconfig.json +75 -156
package/eslint.config.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import linted from "linted";
|
|
2
|
-
|
|
3
|
-
export default linted();
|
|
1
|
+
import linted from "linted";
|
|
2
|
+
|
|
3
|
+
export default linted();
|
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$pkg": "2211.2.1",
|
|
3
|
-
"$schema": "https://json.schemastore.org/package",
|
|
4
|
-
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
|
5
|
-
"name": "@eslinted/defaults",
|
|
6
|
-
"version": "12.
|
|
7
|
-
"repository": "github:jimmy-zhening-luo/linted-defaults",
|
|
8
|
-
"private": false,
|
|
9
|
-
"engineStrict": true,
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": "^22",
|
|
12
|
-
"npm": "^10 || ^11"
|
|
13
|
-
},
|
|
14
|
-
"type": "module",
|
|
15
|
-
"peerDependenciesMeta": {},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@types/chai": "^5.2.2",
|
|
18
|
-
"@types/mocha": "^10.0.10",
|
|
19
|
-
"chai": "^5.2.1",
|
|
20
|
-
"mocha": "^11.7.1",
|
|
21
|
-
"ts-add-js-extension": "^1.6.6",
|
|
22
|
-
"typescript": "^5.9.2"
|
|
23
|
-
},
|
|
24
|
-
"main": "dist/index.js",
|
|
25
|
-
"types": "dist/index.d.ts",
|
|
26
|
-
"scripts": {
|
|
27
|
-
"clean": "cmd --% /c \"(if exist dist rmdir /s /q dist) & (if exist build rmdir /s /q build) & (if exist .svelte-kit rmdir /s /q .svelte-kit) & (if exist .eslintcache del /f /q .eslintcache)\" || rm -rf dist build .svelte-kit .eslintcache",
|
|
28
|
-
"prebuild": "npm run clean",
|
|
29
|
-
"build": "cmd --% /c \"(if exist svelte.config.js (npm run build:svelte) else (npm run build:ts))\" || npm run build-unix",
|
|
30
|
-
"build-unix": "if [ -f svelte.config.js ]; then npm run build:svelte; else npm run build:ts; fi",
|
|
31
|
-
"build:ts": "tsc && ts-add-js-extension --dir=dist",
|
|
32
|
-
"build:svelte": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && vite build",
|
|
33
|
-
"postbuild": "npm run lint || echo \"Lint failed. Continuing...\"",
|
|
34
|
-
"lint": "eslint --cache --fix",
|
|
35
|
-
"pretest": "npm run build",
|
|
36
|
-
"test": "npm run --if-present test:mocha",
|
|
37
|
-
"test:mocha": "mocha",
|
|
38
|
-
"prestart": "npm test",
|
|
39
|
-
"start": "cmd --% /c \"(if exist svelte.config.js (npm run start:svelte) else (npm run start:ts))\" || npm run start-unix",
|
|
40
|
-
"start-unix": "if [ -f svelte.config.js ]; then npm run start:svelte; else npm run start:ts; fi",
|
|
41
|
-
"start:ts": "node .",
|
|
42
|
-
"start:svelte": "vite preview --open",
|
|
43
|
-
"prepublishOnly": "npm test",
|
|
44
|
-
"postpublish": "cmd --% /c \"for /f \"delims=-\" %a in (\"%npm_package_version%\") do if \"%a\" == \"%npm_package_version%\" npm dist-tag add \"%npm_package_name%@%npm_package_version%\" latest\" || npm run postpublish-unix",
|
|
45
|
-
"postpublish-unix": "if [ \"${npm_package_version#*-}\" = \"${npm_package_version}\" ]; then npm dist-tag add \"$npm_package_name@$npm_package_version\" latest; fi",
|
|
46
|
-
"predeploy": "npm test",
|
|
47
|
-
"deploy": ""
|
|
48
|
-
},
|
|
49
|
-
"publishConfig": {
|
|
50
|
-
"tag": "next"
|
|
51
|
-
},
|
|
52
|
-
"license": "MIT",
|
|
53
|
-
"description": "Default scopes for `linted`",
|
|
54
|
-
"keywords": [],
|
|
55
|
-
"author": "Jimmy Zhening Luo <jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
|
56
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$pkg": "2211.2.1",
|
|
3
|
+
"$schema": "https://json.schemastore.org/package",
|
|
4
|
+
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
|
5
|
+
"name": "@eslinted/defaults",
|
|
6
|
+
"version": "12.11.1",
|
|
7
|
+
"repository": "github:jimmy-zhening-luo/linted-defaults",
|
|
8
|
+
"private": false,
|
|
9
|
+
"engineStrict": true,
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": "^22",
|
|
12
|
+
"npm": "^10 || ^11"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"peerDependenciesMeta": {},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/chai": "^5.2.2",
|
|
18
|
+
"@types/mocha": "^10.0.10",
|
|
19
|
+
"chai": "^5.2.1",
|
|
20
|
+
"mocha": "^11.7.1",
|
|
21
|
+
"ts-add-js-extension": "^1.6.6",
|
|
22
|
+
"typescript": "^5.9.2"
|
|
23
|
+
},
|
|
24
|
+
"main": "dist/index.js",
|
|
25
|
+
"types": "dist/index.d.ts",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"clean": "cmd --% /c \"(if exist dist rmdir /s /q dist) & (if exist build rmdir /s /q build) & (if exist .svelte-kit rmdir /s /q .svelte-kit) & (if exist .eslintcache del /f /q .eslintcache)\" || rm -rf dist build .svelte-kit .eslintcache",
|
|
28
|
+
"prebuild": "npm run clean",
|
|
29
|
+
"build": "cmd --% /c \"(if exist svelte.config.js (npm run build:svelte) else (npm run build:ts))\" || npm run build-unix",
|
|
30
|
+
"build-unix": "if [ -f svelte.config.js ]; then npm run build:svelte; else npm run build:ts; fi",
|
|
31
|
+
"build:ts": "tsc && ts-add-js-extension --dir=dist",
|
|
32
|
+
"build:svelte": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json && vite build",
|
|
33
|
+
"postbuild": "npm run lint || echo \"Lint failed. Continuing...\"",
|
|
34
|
+
"lint": "eslint --cache --fix",
|
|
35
|
+
"pretest": "npm run build",
|
|
36
|
+
"test": "npm run --if-present test:mocha",
|
|
37
|
+
"test:mocha": "mocha",
|
|
38
|
+
"prestart": "npm test",
|
|
39
|
+
"start": "cmd --% /c \"(if exist svelte.config.js (npm run start:svelte) else (npm run start:ts))\" || npm run start-unix",
|
|
40
|
+
"start-unix": "if [ -f svelte.config.js ]; then npm run start:svelte; else npm run start:ts; fi",
|
|
41
|
+
"start:ts": "node .",
|
|
42
|
+
"start:svelte": "vite preview --open",
|
|
43
|
+
"prepublishOnly": "npm test",
|
|
44
|
+
"postpublish": "cmd --% /c \"for /f \"delims=-\" %a in (\"%npm_package_version%\") do if \"%a\" == \"%npm_package_version%\" npm dist-tag add \"%npm_package_name%@%npm_package_version%\" latest\" || npm run postpublish-unix",
|
|
45
|
+
"postpublish-unix": "if [ \"${npm_package_version#*-}\" = \"${npm_package_version}\" ]; then npm dist-tag add \"$npm_package_name@$npm_package_version\" latest; fi",
|
|
46
|
+
"predeploy": "npm test",
|
|
47
|
+
"deploy": ""
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"tag": "next"
|
|
51
|
+
},
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"description": "Default scopes for `linted`",
|
|
54
|
+
"keywords": [],
|
|
55
|
+
"author": "Jimmy Zhening Luo <jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
|
56
|
+
}
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
import * as PROJECT from "./project";
|
|
2
|
-
|
|
3
|
-
export function Scope(
|
|
4
|
-
extension: string,
|
|
5
|
-
{
|
|
6
|
-
files = [],
|
|
7
|
-
folders = [],
|
|
8
|
-
unbound = [],
|
|
9
|
-
}: Partial<
|
|
10
|
-
Record<
|
|
11
|
-
| "files"
|
|
12
|
-
| "folders"
|
|
13
|
-
| "unbound",
|
|
14
|
-
string[]
|
|
15
|
-
>
|
|
16
|
-
> = {},
|
|
17
|
-
) {
|
|
18
|
-
function glob(
|
|
19
|
-
items: string[],
|
|
20
|
-
{
|
|
21
|
-
prepend = "",
|
|
22
|
-
append = "",
|
|
23
|
-
} = {},
|
|
24
|
-
) {
|
|
25
|
-
const set = new Set(items),
|
|
26
|
-
predicate = [...set]
|
|
27
|
-
.join(",");
|
|
28
|
-
|
|
29
|
-
return prepend
|
|
30
|
-
+ (
|
|
31
|
-
set.size <= 1
|
|
32
|
-
? predicate
|
|
33
|
-
: `{${predicate}}`
|
|
34
|
-
)
|
|
35
|
-
+ append;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (extension === "")
|
|
39
|
-
return [];
|
|
40
|
-
else {
|
|
41
|
-
const roots = glob(
|
|
42
|
-
PROJECT.ROOTS,
|
|
43
|
-
),
|
|
44
|
-
branches = glob(
|
|
45
|
-
[
|
|
46
|
-
"",
|
|
47
|
-
glob(
|
|
48
|
-
[
|
|
49
|
-
...PROJECT.SUBROOTS,
|
|
50
|
-
...folders,
|
|
51
|
-
],
|
|
52
|
-
{
|
|
53
|
-
append: "/**/",
|
|
54
|
-
},
|
|
55
|
-
),
|
|
56
|
-
],
|
|
57
|
-
),
|
|
58
|
-
leaves = glob(
|
|
59
|
-
[
|
|
60
|
-
"*." + extension,
|
|
61
|
-
...files,
|
|
62
|
-
],
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
return [
|
|
66
|
-
glob(
|
|
67
|
-
[
|
|
68
|
-
...unbound.length === 0
|
|
69
|
-
? [""]
|
|
70
|
-
: unbound,
|
|
71
|
-
roots + branches + leaves,
|
|
72
|
-
],
|
|
73
|
-
),
|
|
74
|
-
];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
1
|
+
import * as PROJECT from "./project";
|
|
2
|
+
|
|
3
|
+
export function Scope(
|
|
4
|
+
extension: string,
|
|
5
|
+
{
|
|
6
|
+
files = [],
|
|
7
|
+
folders = [],
|
|
8
|
+
unbound = [],
|
|
9
|
+
}: Partial<
|
|
10
|
+
Record<
|
|
11
|
+
| "files"
|
|
12
|
+
| "folders"
|
|
13
|
+
| "unbound",
|
|
14
|
+
string[]
|
|
15
|
+
>
|
|
16
|
+
> = {},
|
|
17
|
+
) {
|
|
18
|
+
function glob(
|
|
19
|
+
items: string[],
|
|
20
|
+
{
|
|
21
|
+
prepend = "",
|
|
22
|
+
append = "",
|
|
23
|
+
} = {},
|
|
24
|
+
) {
|
|
25
|
+
const set = new Set(items),
|
|
26
|
+
predicate = [...set]
|
|
27
|
+
.join(",");
|
|
28
|
+
|
|
29
|
+
return prepend
|
|
30
|
+
+ (
|
|
31
|
+
set.size <= 1
|
|
32
|
+
? predicate
|
|
33
|
+
: `{${predicate}}`
|
|
34
|
+
)
|
|
35
|
+
+ append;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (extension === "")
|
|
39
|
+
return [];
|
|
40
|
+
else {
|
|
41
|
+
const roots = glob(
|
|
42
|
+
PROJECT.ROOTS,
|
|
43
|
+
),
|
|
44
|
+
branches = glob(
|
|
45
|
+
[
|
|
46
|
+
"",
|
|
47
|
+
glob(
|
|
48
|
+
[
|
|
49
|
+
...PROJECT.SUBROOTS,
|
|
50
|
+
...folders,
|
|
51
|
+
],
|
|
52
|
+
{
|
|
53
|
+
append: "/**/",
|
|
54
|
+
},
|
|
55
|
+
),
|
|
56
|
+
],
|
|
57
|
+
),
|
|
58
|
+
leaves = glob(
|
|
59
|
+
[
|
|
60
|
+
"*." + extension,
|
|
61
|
+
...files,
|
|
62
|
+
],
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return [
|
|
66
|
+
glob(
|
|
67
|
+
[
|
|
68
|
+
...unbound.length === 0
|
|
69
|
+
? [""]
|
|
70
|
+
: unbound,
|
|
71
|
+
roots + branches + leaves,
|
|
72
|
+
],
|
|
73
|
+
),
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ROOTS } from "./roots";
|
|
2
|
-
export { SUBROOTS } from "./subroots";
|
|
1
|
+
export { ROOTS } from "./roots";
|
|
2
|
+
export { SUBROOTS } from "./subroots";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const ROOTS = [
|
|
2
|
-
"",
|
|
3
|
-
"code/*/",
|
|
4
|
-
];
|
|
1
|
+
export const ROOTS = [
|
|
2
|
+
"",
|
|
3
|
+
"code/*/",
|
|
4
|
+
];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export const SUBROOTS = [
|
|
2
|
-
"src",
|
|
3
|
-
"tests",
|
|
4
|
-
"static",
|
|
5
|
-
"typings",
|
|
6
|
-
"public",
|
|
7
|
-
"tools",
|
|
8
|
-
];
|
|
1
|
+
export const SUBROOTS = [
|
|
2
|
+
"src",
|
|
3
|
+
"tests",
|
|
4
|
+
"static",
|
|
5
|
+
"typings",
|
|
6
|
+
"public",
|
|
7
|
+
"tools",
|
|
8
|
+
];
|
package/src/files/index.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import js from "./scopes/js";
|
|
2
|
-
import ts from "./scopes/ts";
|
|
3
|
-
import mocha from "./scopes/mocha";
|
|
4
|
-
import svelte from "./scopes/svelte";
|
|
5
|
-
import html from "./scopes/html";
|
|
6
|
-
import css from "./scopes/css";
|
|
7
|
-
import json from "./scopes/json";
|
|
8
|
-
import jsonc from "./scopes/jsonc";
|
|
9
|
-
import jsoncc from "./scopes/jsoncc";
|
|
10
|
-
import yml from "./scopes/yml";
|
|
11
|
-
|
|
12
|
-
export const files = {
|
|
13
|
-
js,
|
|
14
|
-
ts,
|
|
15
|
-
mocha,
|
|
16
|
-
svelte,
|
|
17
|
-
html,
|
|
18
|
-
css,
|
|
19
|
-
json,
|
|
20
|
-
jsonc,
|
|
21
|
-
jsoncc,
|
|
22
|
-
yml,
|
|
23
|
-
};
|
|
1
|
+
import js from "./scopes/js";
|
|
2
|
+
import ts from "./scopes/ts";
|
|
3
|
+
import mocha from "./scopes/mocha";
|
|
4
|
+
import svelte from "./scopes/svelte";
|
|
5
|
+
import html from "./scopes/html";
|
|
6
|
+
import css from "./scopes/css";
|
|
7
|
+
import json from "./scopes/json";
|
|
8
|
+
import jsonc from "./scopes/jsonc";
|
|
9
|
+
import jsoncc from "./scopes/jsoncc";
|
|
10
|
+
import yml from "./scopes/yml";
|
|
11
|
+
|
|
12
|
+
export const files = {
|
|
13
|
+
js,
|
|
14
|
+
ts,
|
|
15
|
+
mocha,
|
|
16
|
+
svelte,
|
|
17
|
+
html,
|
|
18
|
+
css,
|
|
19
|
+
json,
|
|
20
|
+
jsonc,
|
|
21
|
+
jsoncc,
|
|
22
|
+
yml,
|
|
23
|
+
};
|
package/src/files/scopes/css.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"css",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"css",
|
|
5
|
+
);
|
package/src/files/scopes/html.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"html",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"html",
|
|
5
|
+
);
|
package/src/files/scopes/js.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"{,[cm]}js",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"{,[cm]}js",
|
|
5
|
+
);
|
package/src/files/scopes/json.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"json",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"json",
|
|
5
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"jsonc",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"jsonc",
|
|
5
|
+
);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"{jsonc,code-snippets}",
|
|
5
|
-
{
|
|
6
|
-
files: ["{tsconfig,.vscode/**/*}.json"],
|
|
7
|
-
folders: [".vscode"],
|
|
8
|
-
},
|
|
9
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"{jsonc,code-snippets}",
|
|
5
|
+
{
|
|
6
|
+
files: ["{tsconfig,.vscode/**/*}.json"],
|
|
7
|
+
folders: [".vscode"],
|
|
8
|
+
},
|
|
9
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"{spec,test}.{,[cm]}ts",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"{spec,test}.{,[cm]}ts",
|
|
5
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"svelte",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"svelte",
|
|
5
|
+
);
|
package/src/files/scopes/ts.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"{,[cm]}ts",
|
|
5
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"{,[cm]}ts",
|
|
5
|
+
);
|
package/src/files/scopes/yml.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Scope } from "../_factory";
|
|
2
|
-
|
|
3
|
-
export default Scope(
|
|
4
|
-
"y{,a}ml",
|
|
5
|
-
{
|
|
6
|
-
folders: [".github"],
|
|
7
|
-
},
|
|
8
|
-
);
|
|
1
|
+
import { Scope } from "../_factory";
|
|
2
|
+
|
|
3
|
+
export default Scope(
|
|
4
|
+
"y{,a}ml",
|
|
5
|
+
{
|
|
6
|
+
folders: [".github"],
|
|
7
|
+
},
|
|
8
|
+
);
|
package/src/ignores/global.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
// "**/node_modules/" /* ESLint @default */,
|
|
3
|
-
// ".git/" /* ESLint @default */,
|
|
4
|
-
"{,code/*/}{.git,.svelte-kit,dist,buil[dt],bundle{,d},pack{,ed},{in,out}{,put},.Trash}/",
|
|
5
|
-
];
|
|
1
|
+
export default [
|
|
2
|
+
// "**/node_modules/" /* ESLint @default */,
|
|
3
|
+
// ".git/" /* ESLint @default */,
|
|
4
|
+
"{,code/*/}{.git,.svelte-kit,dist,buil[dt],bundle{,d},pack{,ed},{in,out}{,put},.Trash}/",
|
|
5
|
+
];
|
package/src/ignores/index.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import global from "./global";
|
|
2
|
-
import js from "./scopes/js";
|
|
3
|
-
import ts from "./scopes/ts";
|
|
4
|
-
import mocha from "./scopes/mocha";
|
|
5
|
-
import svelte from "./scopes/svelte";
|
|
6
|
-
import html from "./scopes/html";
|
|
7
|
-
import css from "./scopes/css";
|
|
8
|
-
import json from "./scopes/json";
|
|
9
|
-
import jsonc from "./scopes/jsonc";
|
|
10
|
-
import jsoncc from "./scopes/jsoncc";
|
|
11
|
-
import yml from "./scopes/yml";
|
|
12
|
-
|
|
13
|
-
export const ignores = {
|
|
14
|
-
"*": global,
|
|
15
|
-
js,
|
|
16
|
-
ts,
|
|
17
|
-
mocha,
|
|
18
|
-
svelte,
|
|
19
|
-
html,
|
|
20
|
-
css,
|
|
21
|
-
json,
|
|
22
|
-
jsonc,
|
|
23
|
-
jsoncc,
|
|
24
|
-
yml,
|
|
25
|
-
};
|
|
1
|
+
import global from "./global";
|
|
2
|
+
import js from "./scopes/js";
|
|
3
|
+
import ts from "./scopes/ts";
|
|
4
|
+
import mocha from "./scopes/mocha";
|
|
5
|
+
import svelte from "./scopes/svelte";
|
|
6
|
+
import html from "./scopes/html";
|
|
7
|
+
import css from "./scopes/css";
|
|
8
|
+
import json from "./scopes/json";
|
|
9
|
+
import jsonc from "./scopes/jsonc";
|
|
10
|
+
import jsoncc from "./scopes/jsoncc";
|
|
11
|
+
import yml from "./scopes/yml";
|
|
12
|
+
|
|
13
|
+
export const ignores = {
|
|
14
|
+
"*": global,
|
|
15
|
+
js,
|
|
16
|
+
ts,
|
|
17
|
+
mocha,
|
|
18
|
+
svelte,
|
|
19
|
+
html,
|
|
20
|
+
css,
|
|
21
|
+
json,
|
|
22
|
+
jsonc,
|
|
23
|
+
jsoncc,
|
|
24
|
+
yml,
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
package/src/ignores/scopes/js.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ["**/{.clasprc,package-lock}.json"];
|
|
1
|
+
export default ["**/{.clasprc,package-lock}.json"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
package/src/ignores/scopes/ts.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default [];
|
|
1
|
+
export default [];
|
package/src/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { files } from "./files";
|
|
2
|
-
import { ignores } from "./ignores";
|
|
3
|
-
import { rules } from "./rules";
|
|
4
|
-
|
|
5
|
-
export { settings } from "./settings";
|
|
6
|
-
export const defaults = {
|
|
7
|
-
files,
|
|
8
|
-
ignores,
|
|
9
|
-
rules,
|
|
10
|
-
};
|
|
1
|
+
import { files } from "./files";
|
|
2
|
+
import { ignores } from "./ignores";
|
|
3
|
+
import { rules } from "./rules";
|
|
4
|
+
|
|
5
|
+
export { settings } from "./settings";
|
|
6
|
+
export const defaults = {
|
|
7
|
+
files,
|
|
8
|
+
ignores,
|
|
9
|
+
rules,
|
|
10
|
+
};
|