@sequencemedia/eslint-config-standard 0.0.90 → 0.1.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/common/merge.mjs +21 -1
- package/package.json +3 -6
package/common/merge.mjs
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
function hasLanguageOptionsParser ({ languageOptions: { parser = null } = {} }) {
|
|
2
|
+
return Boolean(parser)
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
function getLanguageOptionsParser ({ languageOptions: { parser = null } = {} }) {
|
|
6
|
+
return parser
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function filterLanguageOptionsEntriesbyKey ([key]) {
|
|
10
|
+
return key !== 'parser'
|
|
11
|
+
}
|
|
12
|
+
|
|
1
13
|
export function getLanguageOptions ({ languageOptions = {} }) {
|
|
2
|
-
|
|
14
|
+
const entries = Object.entries(languageOptions)
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
Object.fromEntries(
|
|
18
|
+
entries.filter(filterLanguageOptionsEntriesbyKey)
|
|
19
|
+
)
|
|
20
|
+
)
|
|
3
21
|
}
|
|
4
22
|
|
|
5
23
|
export function getLinterOptions ({ linterOptions = {} }) {
|
|
@@ -22,7 +40,9 @@ export function mergeLanguageOptions (alpha = {}, omega = {}) {
|
|
|
22
40
|
return (
|
|
23
41
|
Object
|
|
24
42
|
.assign(
|
|
43
|
+
hasLanguageOptionsParser(alpha) ? { parser: getLanguageOptionsParser(alpha) } : {},
|
|
25
44
|
structuredClone(getLanguageOptions(alpha)),
|
|
45
|
+
hasLanguageOptionsParser(omega) ? { parser: getLanguageOptionsParser(omega) } : {},
|
|
26
46
|
getLanguageOptions(omega)
|
|
27
47
|
)
|
|
28
48
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/eslint-config-standard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Standard configuration for ESLint 9",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript Standard Style",
|
|
@@ -51,12 +51,9 @@
|
|
|
51
51
|
"test": "mocha test --recursive --verbose --color"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@stylistic/eslint-plugin": "2.
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.34",
|
|
56
|
-
"@typescript-eslint/utils": "8.0.0-alpha.34",
|
|
54
|
+
"@stylistic/eslint-plugin": "^2.11.0",
|
|
57
55
|
"eslint-plugin-n": "^17.14.0",
|
|
58
|
-
"globals": "^15.13.0"
|
|
59
|
-
"typescript-eslint": "8.0.0-alpha.34"
|
|
56
|
+
"globals": "^15.13.0"
|
|
60
57
|
},
|
|
61
58
|
"devDependencies": {
|
|
62
59
|
"chai": "^5.1.2",
|