@enormora/eslint-config-base-with-prettier 0.0.31 → 0.0.33
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/constants.js +3 -0
- package/constants.js.map +1 -1
- package/package.json +7 -7
- package/presets/base/cspell-config.js +17 -1
- package/presets/base/cspell-config.js.map +1 -1
- package/presets/base/markdown-lint-rules.js +102 -3
- package/presets/base/markdown-lint-rules.js.map +1 -1
- package/presets/base/package-json.js +112 -3
- package/presets/base/package-json.js.map +1 -1
- package/presets/base/plain-text-language.js +57 -1
- package/presets/base/plain-text-language.js.map +1 -1
- package/rule-sets/best-practices.js +724 -6
- package/rule-sets/best-practices.js.map +1 -1
- package/rule-sets/restricted-syntax.js +20 -0
- package/rule-sets/restricted-syntax.js.map +1 -1
- package/rule-sets/stylistic.js +228 -3
- package/rule-sets/stylistic.js.map +1 -1
- package/sbom.cdx.json +35 -35
package/constants.js
CHANGED
package/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../configs/constants.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../configs/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC;AAC5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@cspell/eslint-plugin": "10.
|
|
11
|
-
"@eslint-community/eslint-plugin-eslint-comments": "4.
|
|
10
|
+
"@cspell/eslint-plugin": "10.3.0",
|
|
11
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
|
|
12
12
|
"@eslint/markdown": "8.0.3",
|
|
13
|
-
"@eslint/plugin-kit": "0.7.
|
|
13
|
+
"@eslint/plugin-kit": "0.7.3",
|
|
14
14
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
15
|
-
"@typescript-eslint/utils": "8.
|
|
15
|
+
"@typescript-eslint/utils": "8.69.0",
|
|
16
16
|
"eslint-plugin-array-func": "5.1.1",
|
|
17
17
|
"eslint-plugin-destructuring": "2.2.1",
|
|
18
18
|
"eslint-plugin-import-x": "4.17.1",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"eslint-plugin-markdown-preferences": "0.42.0",
|
|
22
22
|
"eslint-plugin-no-barrel-files": "2.2.0",
|
|
23
23
|
"eslint-plugin-no-secrets": "2.3.3",
|
|
24
|
-
"eslint-plugin-package-json": "1.
|
|
24
|
+
"eslint-plugin-package-json": "1.8.0",
|
|
25
25
|
"eslint-plugin-prettier": "5.5.6",
|
|
26
26
|
"eslint-plugin-promise": "7.3.0",
|
|
27
|
-
"eslint-plugin-regexp": "3.
|
|
27
|
+
"eslint-plugin-regexp": "3.3.0",
|
|
28
28
|
"eslint-plugin-sonarjs": "4.2.0",
|
|
29
29
|
"eslint-plugin-unicorn": "74.0.0",
|
|
30
30
|
"jsonc-eslint-parser": "3.3.0"
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"./rule-sets/restricted-syntax.js"
|
|
55
55
|
],
|
|
56
56
|
"type": "module",
|
|
57
|
-
"version": "0.0.
|
|
57
|
+
"version": "0.0.33"
|
|
58
58
|
}
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
import "./base-shared.js";
|
|
1
|
+
import { cspellSpellcheckerOptions } from "./base-shared.js";
|
|
2
|
+
export function withCspellWords(words) {
|
|
3
|
+
return {
|
|
4
|
+
rules: {
|
|
5
|
+
'@cspell/spellchecker': [
|
|
6
|
+
'error',
|
|
7
|
+
{
|
|
8
|
+
...cspellSpellcheckerOptions,
|
|
9
|
+
cspell: {
|
|
10
|
+
...cspellSpellcheckerOptions.cspell,
|
|
11
|
+
words: [...cspellSpellcheckerOptions.cspell.words, ...words]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
2
18
|
//# sourceMappingURL=cspell-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cspell-config.js","sourceRoot":"","sources":["../../../../../configs/presets/base/cspell-config.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"cspell-config.js","sourceRoot":"","sources":["../../../../../configs/presets/base/cspell-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAU7D,MAAM,UAAU,eAAe,CAAC,KAAwB;IACpD,OAAO;QACH,KAAK,EAAE;YACH,sBAAsB,EAAE;gBACpB,OAAO;gBACP;oBACI,GAAG,yBAAyB;oBAC5B,MAAM,EAAE;wBACJ,GAAG,yBAAyB,CAAC,MAAM;wBACnC,KAAK,EAAE,CAAE,GAAG,yBAAyB,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,KAAK,CAAE;qBACjE;iBACJ;aACJ;SACJ;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,103 @@
|
|
|
1
|
-
import '@eslint/markdown';
|
|
2
|
-
import 'eslint-plugin-markdown-links';
|
|
3
|
-
import 'eslint-plugin-markdown-preferences';
|
|
1
|
+
import markdownPlugin from '@eslint/markdown';
|
|
2
|
+
import markdownLinksPlugin from 'eslint-plugin-markdown-links';
|
|
3
|
+
import markdownPreferencesPlugin from 'eslint-plugin-markdown-preferences';
|
|
4
|
+
export const markdownLintPlugins = {
|
|
5
|
+
markdown: markdownPlugin,
|
|
6
|
+
'markdown-links': markdownLinksPlugin,
|
|
7
|
+
'markdown-preferences': markdownPreferencesPlugin
|
|
8
|
+
};
|
|
9
|
+
export const markdownLintRules = {
|
|
10
|
+
'markdown/fenced-code-language': 'error',
|
|
11
|
+
'markdown/fenced-code-meta': 'off',
|
|
12
|
+
'markdown/heading-increment': 'error',
|
|
13
|
+
'markdown/no-bare-urls': 'error',
|
|
14
|
+
'markdown/no-duplicate-definitions': 'error',
|
|
15
|
+
'markdown/no-duplicate-headings': 'error',
|
|
16
|
+
'markdown/no-empty-definitions': 'error',
|
|
17
|
+
'markdown/no-empty-images': 'error',
|
|
18
|
+
'markdown/no-empty-links': 'error',
|
|
19
|
+
'markdown/no-html': 'error',
|
|
20
|
+
'markdown/no-invalid-label-refs': 'error',
|
|
21
|
+
'markdown/no-missing-atx-heading-space': 'error',
|
|
22
|
+
// Allow the three GFM task-list checkbox markers (`[ ]`, `[x]`, `[X]`). The commonmark
|
|
23
|
+
// language has no concept of task lists, so the rule otherwise reports the checkbox content
|
|
24
|
+
// as a missing label reference.
|
|
25
|
+
'markdown/no-missing-label-refs': ['error', { allowLabels: ['', 'x', 'X'] }],
|
|
26
|
+
'markdown/no-missing-link-fragments': 'error',
|
|
27
|
+
'markdown/no-multiple-h1': 'error',
|
|
28
|
+
'markdown/no-reference-like-urls': 'error',
|
|
29
|
+
'markdown/no-reversed-media-syntax': 'error',
|
|
30
|
+
'markdown/no-space-in-emphasis': 'error',
|
|
31
|
+
'markdown/no-unused-definitions': 'error',
|
|
32
|
+
'markdown/require-alt-text': 'error',
|
|
33
|
+
'markdown/table-column-count': 'error',
|
|
34
|
+
// markdown-links: external network check is opt-in to keep CI deterministic;
|
|
35
|
+
// local-path and fragment checks are pure wins.
|
|
36
|
+
'markdown-links/no-dead-urls': 'off',
|
|
37
|
+
'markdown-links/no-missing-fragments': 'error',
|
|
38
|
+
'markdown-links/no-missing-path': 'error',
|
|
39
|
+
'markdown-links/no-self-destination': 'error',
|
|
40
|
+
// markdown-preferences: many rules overlap with the active markdown formatter (dprint or
|
|
41
|
+
// prettier, depending on which base preset is used). We enable only 7 rules from this
|
|
42
|
+
// plugin's `recommended` config (none of which fight either formatter) and explicitly turn
|
|
43
|
+
// the other 46 off. Override individually if a stricter style is desired.
|
|
44
|
+
//
|
|
45
|
+
// `prefer-autolinks` is intentionally disabled even though it is in `recommended`: its
|
|
46
|
+
// autofix rewrites any `[x](x)` to `<x>` without checking whether the URL has a scheme.
|
|
47
|
+
// CommonMark autolinks require an absolute URI, so a relative link like `[foo.md](foo.md)`
|
|
48
|
+
// becomes `<foo.md>`, which GitHub renders as an empty HTML tag (the link disappears).
|
|
49
|
+
'markdown-preferences/atx-heading-closing-sequence': 'off',
|
|
50
|
+
'markdown-preferences/atx-heading-closing-sequence-length': 'off',
|
|
51
|
+
'markdown-preferences/blockquote-marker-alignment': 'error',
|
|
52
|
+
'markdown-preferences/bullet-list-marker-style': 'off',
|
|
53
|
+
'markdown-preferences/canonical-code-block-language': 'off',
|
|
54
|
+
'markdown-preferences/code-fence-length': 'off',
|
|
55
|
+
'markdown-preferences/code-fence-spacing': 'off',
|
|
56
|
+
'markdown-preferences/code-fence-style': 'off',
|
|
57
|
+
'markdown-preferences/custom-container-marker-spacing': 'off',
|
|
58
|
+
'markdown-preferences/definitions-last': 'off',
|
|
59
|
+
'markdown-preferences/emoji-notation': 'off',
|
|
60
|
+
'markdown-preferences/emphasis-delimiters-style': 'off',
|
|
61
|
+
'markdown-preferences/hard-linebreak-style': 'error',
|
|
62
|
+
'markdown-preferences/heading-casing': 'off',
|
|
63
|
+
'markdown-preferences/indent': 'off',
|
|
64
|
+
'markdown-preferences/level1-heading-style': 'off',
|
|
65
|
+
'markdown-preferences/level2-heading-style': 'off',
|
|
66
|
+
'markdown-preferences/link-bracket-newline': 'off',
|
|
67
|
+
'markdown-preferences/link-bracket-spacing': 'off',
|
|
68
|
+
'markdown-preferences/link-destination-style': 'off',
|
|
69
|
+
'markdown-preferences/link-paren-newline': 'off',
|
|
70
|
+
'markdown-preferences/link-paren-spacing': 'off',
|
|
71
|
+
'markdown-preferences/link-title-style': 'off',
|
|
72
|
+
'markdown-preferences/list-marker-alignment': 'error',
|
|
73
|
+
'markdown-preferences/max-len': 'off',
|
|
74
|
+
'markdown-preferences/no-heading-trailing-punctuation': 'off',
|
|
75
|
+
'markdown-preferences/no-implicit-block-closing': 'error',
|
|
76
|
+
'markdown-preferences/no-laziness-blockquotes': 'error',
|
|
77
|
+
'markdown-preferences/no-multi-spaces': 'off',
|
|
78
|
+
'markdown-preferences/no-multiple-empty-lines': 'off',
|
|
79
|
+
'markdown-preferences/no-tabs': 'off',
|
|
80
|
+
'markdown-preferences/no-text-backslash-linebreak': 'error',
|
|
81
|
+
'markdown-preferences/no-trailing-spaces': 'off',
|
|
82
|
+
'markdown-preferences/ordered-list-marker-sequence': 'off',
|
|
83
|
+
'markdown-preferences/ordered-list-marker-start': 'off',
|
|
84
|
+
'markdown-preferences/ordered-list-marker-style': 'off',
|
|
85
|
+
'markdown-preferences/padded-custom-containers': 'off',
|
|
86
|
+
'markdown-preferences/padding-line-between-blocks': 'off',
|
|
87
|
+
'markdown-preferences/prefer-autolinks': 'off',
|
|
88
|
+
'markdown-preferences/prefer-fenced-code-blocks': 'error',
|
|
89
|
+
'markdown-preferences/prefer-inline-code-words': 'off',
|
|
90
|
+
'markdown-preferences/prefer-link-reference-definitions': 'off',
|
|
91
|
+
'markdown-preferences/prefer-linked-words': 'off',
|
|
92
|
+
'markdown-preferences/setext-heading-underline-length': 'off',
|
|
93
|
+
'markdown-preferences/sort-definitions': 'off',
|
|
94
|
+
'markdown-preferences/strikethrough-delimiters-style': 'off',
|
|
95
|
+
'markdown-preferences/table-header-casing': 'off',
|
|
96
|
+
'markdown-preferences/table-leading-trailing-pipes': 'off',
|
|
97
|
+
'markdown-preferences/table-pipe-alignment': 'off',
|
|
98
|
+
'markdown-preferences/table-pipe-spacing': 'off',
|
|
99
|
+
'markdown-preferences/thematic-break-character-style': 'off',
|
|
100
|
+
'markdown-preferences/thematic-break-length': 'off',
|
|
101
|
+
'markdown-preferences/thematic-break-sequence-pattern': 'off'
|
|
102
|
+
};
|
|
4
103
|
//# sourceMappingURL=markdown-lint-rules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-lint-rules.js","sourceRoot":"","sources":["../../../../../configs/presets/base/markdown-lint-rules.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"markdown-lint-rules.js","sourceRoot":"","sources":["../../../../../configs/presets/base/markdown-lint-rules.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,yBAAyB,MAAM,oCAAoC,CAAC;AAE3E,MAAM,CAAC,MAAM,mBAAmB,GAAkC;IAC9D,QAAQ,EAAE,cAAc;IACxB,gBAAgB,EAAE,mBAAmB;IACrC,sBAAsB,EAAE,yBAAyB;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,+BAA+B,EAAE,OAAO;IACxC,2BAA2B,EAAE,KAAK;IAClC,4BAA4B,EAAE,OAAO;IACrC,uBAAuB,EAAE,OAAO;IAChC,mCAAmC,EAAE,OAAO;IAC5C,gCAAgC,EAAE,OAAO;IACzC,+BAA+B,EAAE,OAAO;IACxC,0BAA0B,EAAE,OAAO;IACnC,yBAAyB,EAAE,OAAO;IAClC,kBAAkB,EAAE,OAAO;IAC3B,gCAAgC,EAAE,OAAO;IACzC,uCAAuC,EAAE,OAAO;IAChD,uFAAuF;IACvF,4FAA4F;IAC5F,gCAAgC;IAChC,gCAAgC,EAAE,CAAE,OAAO,EAAE,EAAE,WAAW,EAAE,CAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAE,EAAE,CAAE;IAChF,oCAAoC,EAAE,OAAO;IAC7C,yBAAyB,EAAE,OAAO;IAClC,iCAAiC,EAAE,OAAO;IAC1C,mCAAmC,EAAE,OAAO;IAC5C,+BAA+B,EAAE,OAAO;IACxC,gCAAgC,EAAE,OAAO;IACzC,2BAA2B,EAAE,OAAO;IACpC,6BAA6B,E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AAgD,EAAE,KAAK;IACvD,+CAA+C,EAAE,KAAK;IACtD,kDAAkD,EAAE,KAAK;IACzD,uCAAuC,EAAE,KAAK;IAC9C,gDAAgD,EAAE,OAAO;IACzD,+CAA+C,EAAE,KAAK;IACtD,wDAAwD,EAAE,KAAK;IAC/D,0CAA0C,EAAE,KAAK;IACjD,sDAAsD,EAAE,KAAK;IAC7D,uCAAuC,EAAE,KAAK;IAC9C,qDAAqD,EAAE,KAAK;IAC5D,0CAA0C,EAAE,KAAK;IACjD,mDAAmD,EAAE,KAAK;IAC1D,2CAA2C,EAAE,KAAK;IAClD,yCAAyC,EAAE,KAAK;IAChD,qDAAqD,EAAE,KAAK;IAC5D,4CAA4C,EAAE,KAAK;IACnD,sDAAsD,EAAE,KAAK;CAChE,CAAC"}
|
|
@@ -1,4 +1,113 @@
|
|
|
1
|
-
import 'eslint-plugin-json-schema-validator';
|
|
2
|
-
import 'eslint-plugin-package-json';
|
|
3
|
-
import 'jsonc-eslint-parser';
|
|
1
|
+
import jsonSchemaValidatorPlugin from 'eslint-plugin-json-schema-validator';
|
|
2
|
+
import packageJsonPlugin from 'eslint-plugin-package-json';
|
|
3
|
+
import * as jsoncParser from 'jsonc-eslint-parser';
|
|
4
|
+
export const packageJsonConfig = {
|
|
5
|
+
files: ['**/package.json'],
|
|
6
|
+
languageOptions: { parser: jsoncParser },
|
|
7
|
+
plugins: {
|
|
8
|
+
'package-json': packageJsonPlugin,
|
|
9
|
+
'json-schema-validator': jsonSchemaValidatorPlugin
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
'package-json/no-empty-fields': 'error',
|
|
13
|
+
'package-json/no-redundant-files': 'error',
|
|
14
|
+
'package-json/no-redundant-publishConfig': 'error',
|
|
15
|
+
'package-json/repository-shorthand': 'error',
|
|
16
|
+
'package-json/restrict-private-properties': 'error',
|
|
17
|
+
'package-json/scripts-name-casing': 'error',
|
|
18
|
+
'package-json/sort-collections': 'error',
|
|
19
|
+
'package-json/unique-dependencies': 'error',
|
|
20
|
+
'package-json/valid-author': 'error',
|
|
21
|
+
'package-json/valid-bin': 'error',
|
|
22
|
+
'package-json/valid-browser': 'error',
|
|
23
|
+
'package-json/valid-bugs': 'error',
|
|
24
|
+
'package-json/valid-bundleDependencies': 'error',
|
|
25
|
+
'package-json/valid-config': 'error',
|
|
26
|
+
'package-json/valid-contributors': 'error',
|
|
27
|
+
'package-json/valid-cpu': 'error',
|
|
28
|
+
'package-json/valid-dependencies': 'error',
|
|
29
|
+
'package-json/valid-description': 'error',
|
|
30
|
+
'package-json/valid-devDependencies': 'error',
|
|
31
|
+
'package-json/valid-devEngines': 'error',
|
|
32
|
+
'package-json/valid-directories': 'error',
|
|
33
|
+
'package-json/valid-engines': 'error',
|
|
34
|
+
'package-json/valid-exports': 'error',
|
|
35
|
+
'package-json/valid-files': 'error',
|
|
36
|
+
'package-json/valid-funding': 'error',
|
|
37
|
+
'package-json/valid-gypfile': 'error',
|
|
38
|
+
'package-json/valid-homepage': 'error',
|
|
39
|
+
'package-json/valid-keywords': 'error',
|
|
40
|
+
'package-json/valid-libc': 'error',
|
|
41
|
+
'package-json/valid-license': 'error',
|
|
42
|
+
'package-json/valid-main': 'error',
|
|
43
|
+
'package-json/valid-man': 'error',
|
|
44
|
+
'package-json/valid-module': 'error',
|
|
45
|
+
'package-json/valid-name': 'error',
|
|
46
|
+
'package-json/valid-optionalDependencies': 'error',
|
|
47
|
+
'package-json/valid-os': 'error',
|
|
48
|
+
'package-json/valid-packageManager': 'error',
|
|
49
|
+
'package-json/valid-peerDependencies': 'error',
|
|
50
|
+
'package-json/valid-peerDependenciesMeta': 'error',
|
|
51
|
+
'package-json/valid-peerDependenciesMeta-relationship': 'error',
|
|
52
|
+
'package-json/valid-private': 'error',
|
|
53
|
+
'package-json/valid-publishConfig': 'error',
|
|
54
|
+
'package-json/valid-repository': 'error',
|
|
55
|
+
'package-json/valid-repository-directory': 'error',
|
|
56
|
+
'package-json/valid-scripts': 'error',
|
|
57
|
+
'package-json/valid-sideEffects': 'error',
|
|
58
|
+
'package-json/valid-type': 'error',
|
|
59
|
+
'package-json/valid-version': 'error',
|
|
60
|
+
'package-json/valid-workspaces': 'error',
|
|
61
|
+
// Too opinionated for a base preset — consumers can opt in.
|
|
62
|
+
'package-json/bin-name-casing': 'off',
|
|
63
|
+
'package-json/exports-subpaths-style': 'off',
|
|
64
|
+
'package-json/no-local-dependencies': 'off',
|
|
65
|
+
'package-json/order-properties': 'off',
|
|
66
|
+
'package-json/prefer-rolling-workspace-spec': 'off',
|
|
67
|
+
'package-json/require-attribution': 'off',
|
|
68
|
+
'package-json/require-author': 'off',
|
|
69
|
+
'package-json/require-bin': 'off',
|
|
70
|
+
'package-json/require-browser': 'off',
|
|
71
|
+
'package-json/require-bugs': 'off',
|
|
72
|
+
'package-json/require-bundleDependencies': 'off',
|
|
73
|
+
'package-json/require-config': 'off',
|
|
74
|
+
'package-json/require-contributors': 'off',
|
|
75
|
+
'package-json/require-cpu': 'off',
|
|
76
|
+
'package-json/require-dependencies': 'off',
|
|
77
|
+
'package-json/require-description': 'off',
|
|
78
|
+
'package-json/require-devDependencies': 'off',
|
|
79
|
+
'package-json/require-devEngines': 'off',
|
|
80
|
+
'package-json/require-directories': 'off',
|
|
81
|
+
'package-json/require-engines': 'off',
|
|
82
|
+
'package-json/require-exports': 'off',
|
|
83
|
+
'package-json/require-files': 'off',
|
|
84
|
+
'package-json/require-funding': 'off',
|
|
85
|
+
'package-json/require-gypfile': 'off',
|
|
86
|
+
'package-json/require-homepage': 'off',
|
|
87
|
+
'package-json/require-keywords': 'off',
|
|
88
|
+
'package-json/require-libc': 'off',
|
|
89
|
+
'package-json/require-license': 'off',
|
|
90
|
+
'package-json/require-main': 'off',
|
|
91
|
+
'package-json/require-man': 'off',
|
|
92
|
+
'package-json/require-module': 'off',
|
|
93
|
+
'package-json/require-name': 'off',
|
|
94
|
+
'package-json/require-optionalDependencies': 'off',
|
|
95
|
+
'package-json/require-os': 'off',
|
|
96
|
+
'package-json/require-packageManager': 'off',
|
|
97
|
+
'package-json/require-peerDependencies': 'off',
|
|
98
|
+
'package-json/require-peerDependenciesMeta': 'off',
|
|
99
|
+
'package-json/require-private': 'off',
|
|
100
|
+
'package-json/require-publishConfig': 'off',
|
|
101
|
+
'package-json/require-repository': 'off',
|
|
102
|
+
'package-json/require-scripts': 'off',
|
|
103
|
+
'package-json/require-sideEffects': 'off',
|
|
104
|
+
'package-json/require-type': 'off',
|
|
105
|
+
'package-json/require-types': 'off',
|
|
106
|
+
'package-json/require-version': 'off',
|
|
107
|
+
'package-json/restrict-dependency-ranges': 'off',
|
|
108
|
+
'package-json/restrict-top-level-properties': 'off',
|
|
109
|
+
'package-json/specify-peers-locally': 'off',
|
|
110
|
+
'json-schema-validator/no-invalid': 'error'
|
|
111
|
+
}
|
|
112
|
+
};
|
|
4
113
|
//# sourceMappingURL=package-json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["../../../../../configs/presets/base/package-json.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"package-json.js","sourceRoot":"","sources":["../../../../../configs/presets/base/package-json.ts"],"names":[],"mappings":"AACA,OAAO,yBAAyB,MAAM,qCAAqC,CAAC;AAC5E,OAAO,iBAAiB,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,KAAK,EAAE,CAAE,iBAAiB,CAAE;IAC5B,eAAe,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACxC,OAAO,EAAE;QACL,cAAc,EAAE,iBAAiB;QACjC,uBAAuB,EAAE,yBAAyB;KACrD;IACD,KAAK,EAAE;QACH,8BAA8B,EAAE,OAAO;QACvC,iCAAiC,EAAE,OAAO;QAC1C,yCAAyC,EAAE,OAAO;QAClD,mCAAmC,EAAE,OAAO;QAC5C,0CAA0C,EAA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oC,EAAE,KAAK;QAE3C,kCAAkC,EAAE,OAAO;KAC9C;CACwB,CAAC"}
|
|
@@ -1,2 +1,58 @@
|
|
|
1
|
-
import '@eslint/plugin-kit';
|
|
1
|
+
import { TextSourceCodeBase, VisitNodeStep } from '@eslint/plugin-kit';
|
|
2
|
+
const lineEndingPattern = /\r\n|\n|\r/u;
|
|
3
|
+
function buildProgramNode(text) {
|
|
4
|
+
const lines = text.split(lineEndingPattern);
|
|
5
|
+
const lastLine = lines.at(-1) ?? '';
|
|
6
|
+
return {
|
|
7
|
+
type: 'Program',
|
|
8
|
+
body: [],
|
|
9
|
+
comments: [],
|
|
10
|
+
tokens: [],
|
|
11
|
+
range: [0, text.length],
|
|
12
|
+
loc: {
|
|
13
|
+
start: { line: 1, column: 0 },
|
|
14
|
+
end: { line: lines.length, column: lastLine.length }
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function* traverseProgram(ast) {
|
|
19
|
+
yield new VisitNodeStep({ target: ast, phase: 1, args: [ast] });
|
|
20
|
+
yield new VisitNodeStep({ target: ast, phase: 2, args: [ast] });
|
|
21
|
+
}
|
|
22
|
+
function createPlainTextSourceCode(file, parseResult) {
|
|
23
|
+
const sourceCode = new TextSourceCodeBase({ text: file.body, ast: parseResult.ast });
|
|
24
|
+
Object.assign(sourceCode, {
|
|
25
|
+
getLoc(node) {
|
|
26
|
+
return node.loc;
|
|
27
|
+
},
|
|
28
|
+
getRange(node) {
|
|
29
|
+
return node.range;
|
|
30
|
+
},
|
|
31
|
+
traverse() {
|
|
32
|
+
return traverseProgram(parseResult.ast);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return sourceCode;
|
|
36
|
+
}
|
|
37
|
+
function noopValidateLanguageOptions() {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
function parsePlainText(file) {
|
|
41
|
+
return { ok: true, ast: buildProgramNode(file.body) };
|
|
42
|
+
}
|
|
43
|
+
const plainTextLanguage = {
|
|
44
|
+
fileType: 'text',
|
|
45
|
+
lineStart: 1,
|
|
46
|
+
columnStart: 0,
|
|
47
|
+
nodeTypeKey: 'type',
|
|
48
|
+
visitorKeys: { Program: [] },
|
|
49
|
+
defaultLanguageOptions: {},
|
|
50
|
+
validateLanguageOptions: noopValidateLanguageOptions,
|
|
51
|
+
parse: parsePlainText,
|
|
52
|
+
createSourceCode: createPlainTextSourceCode
|
|
53
|
+
};
|
|
54
|
+
export const plainTextLanguagePlugin = {
|
|
55
|
+
meta: { name: '@enormora/eslint-config-plain-text-language', version: '1.0.0' },
|
|
56
|
+
languages: { any: plainTextLanguage }
|
|
57
|
+
};
|
|
2
58
|
//# sourceMappingURL=plain-text-language.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain-text-language.js","sourceRoot":"","sources":["../../../../../configs/presets/base/plain-text-language.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"plain-text-language.js","sourceRoot":"","sources":["../../../../../configs/presets/base/plain-text-language.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAiBvE,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAExC,SAAS,gBAAgB,CAAC,IAAY;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC5C,MAAM,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACpC,OAAO;QACH,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,CAAE,CAAC,EAAE,IAAI,CAAC,MAAM,CAAE;QACzB,GAAG,EAAE;YACD,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YAC7B,GAAG,EAAE,EA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