@enormora/eslint-config-base-with-prettier 0.0.29 → 0.0.30
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 +0 -3
- package/constants.js.map +1 -1
- package/package.json +2 -2
- package/presets/base/cspell-config.js +1 -17
- package/presets/base/cspell-config.js.map +1 -1
- package/presets/base/markdown-lint-rules.js +3 -102
- package/presets/base/markdown-lint-rules.js.map +1 -1
- package/presets/base/package-json.js +3 -111
- package/presets/base/package-json.js.map +1 -1
- package/presets/base/plain-text-language.js +1 -57
- package/presets/base/plain-text-language.js.map +1 -1
- package/rule-sets/best-practices.js +6 -724
- package/rule-sets/best-practices.js.map +1 -1
- package/rule-sets/restricted-syntax.js +0 -20
- package/rule-sets/restricted-syntax.js.map +1 -1
- package/rule-sets/stylistic.js +3 -228
- package/rule-sets/stylistic.js.map +1 -1
- package/sbom.cdx.json +10 -10
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":""}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@cspell/eslint-plugin": "10.0
|
|
10
|
+
"@cspell/eslint-plugin": "10.1.0",
|
|
11
11
|
"@eslint-community/eslint-plugin-eslint-comments": "4.7.2",
|
|
12
12
|
"@eslint/markdown": "8.0.3",
|
|
13
13
|
"@eslint/plugin-kit": "0.7.2",
|
|
@@ -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.30"
|
|
58
58
|
}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import
|
|
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
|
-
}
|
|
1
|
+
import "./base-shared.js";
|
|
18
2
|
//# 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,OAA0C,kBAAkB,CAAC"}
|
|
@@ -1,103 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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
|
-
};
|
|
1
|
+
import '@eslint/markdown';
|
|
2
|
+
import 'eslint-plugin-markdown-links';
|
|
3
|
+
import 'eslint-plugin-markdown-preferences';
|
|
103
4
|
//# 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,OAA2B,kBAAkB,CAAC;AAE9C,OAAgC,8BAA8B,CAAC;AAC/D,OAAsC,oCAAoC,CAAC"}
|
|
@@ -1,112 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
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/require-attribution': 'off',
|
|
67
|
-
'package-json/require-author': 'off',
|
|
68
|
-
'package-json/require-bin': 'off',
|
|
69
|
-
'package-json/require-browser': 'off',
|
|
70
|
-
'package-json/require-bugs': 'off',
|
|
71
|
-
'package-json/require-bundleDependencies': 'off',
|
|
72
|
-
'package-json/require-config': 'off',
|
|
73
|
-
'package-json/require-contributors': 'off',
|
|
74
|
-
'package-json/require-cpu': 'off',
|
|
75
|
-
'package-json/require-dependencies': 'off',
|
|
76
|
-
'package-json/require-description': 'off',
|
|
77
|
-
'package-json/require-devDependencies': 'off',
|
|
78
|
-
'package-json/require-devEngines': 'off',
|
|
79
|
-
'package-json/require-directories': 'off',
|
|
80
|
-
'package-json/require-engines': 'off',
|
|
81
|
-
'package-json/require-exports': 'off',
|
|
82
|
-
'package-json/require-files': 'off',
|
|
83
|
-
'package-json/require-funding': 'off',
|
|
84
|
-
'package-json/require-gypfile': 'off',
|
|
85
|
-
'package-json/require-homepage': 'off',
|
|
86
|
-
'package-json/require-keywords': 'off',
|
|
87
|
-
'package-json/require-libc': 'off',
|
|
88
|
-
'package-json/require-license': 'off',
|
|
89
|
-
'package-json/require-main': 'off',
|
|
90
|
-
'package-json/require-man': 'off',
|
|
91
|
-
'package-json/require-module': 'off',
|
|
92
|
-
'package-json/require-name': 'off',
|
|
93
|
-
'package-json/require-optionalDependencies': 'off',
|
|
94
|
-
'package-json/require-os': 'off',
|
|
95
|
-
'package-json/require-packageManager': 'off',
|
|
96
|
-
'package-json/require-peerDependencies': 'off',
|
|
97
|
-
'package-json/require-peerDependenciesMeta': 'off',
|
|
98
|
-
'package-json/require-private': 'off',
|
|
99
|
-
'package-json/require-publishConfig': 'off',
|
|
100
|
-
'package-json/require-repository': 'off',
|
|
101
|
-
'package-json/require-scripts': 'off',
|
|
102
|
-
'package-json/require-sideEffects': 'off',
|
|
103
|
-
'package-json/require-type': 'off',
|
|
104
|
-
'package-json/require-types': 'off',
|
|
105
|
-
'package-json/require-version': 'off',
|
|
106
|
-
'package-json/restrict-dependency-ranges': 'off',
|
|
107
|
-
'package-json/restrict-top-level-properties': 'off',
|
|
108
|
-
'package-json/specify-peers-locally': 'off',
|
|
109
|
-
'json-schema-validator/no-invalid': 'error'
|
|
110
|
-
}
|
|
111
|
-
};
|
|
1
|
+
import 'eslint-plugin-json-schema-validator';
|
|
2
|
+
import 'eslint-plugin-package-json';
|
|
3
|
+
import 'jsonc-eslint-parser';
|
|
112
4
|
//# 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,OAAsC,qCAAqC,CAAC;AAC5E,OAA8B,4BAA4B,CAAC;AAC3D,OAA6B,qBAAqB,CAAC"}
|
|
@@ -1,58 +1,2 @@
|
|
|
1
|
-
import
|
|
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
|
-
};
|
|
1
|
+
import '@eslint/plugin-kit';
|
|
58
2
|
//# 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,OAAkD,oBAAoB,CAAC;AAiB7C"}
|