@sequencemedia/eslint-config-standard 0.2.2 → 0.2.4
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/configs/recommended/merge.mjs +9 -0
- package/configs/standard/merge.mjs +9 -0
- package/configs/stylistic/merge.mjs +9 -0
- package/package.json +4 -6
- package/test/{merge/recommended.spec.mjs → configs/recommended/merge.spec.mjs} +34 -9
- package/test/configs/standard/merge.spec.mjs +88 -0
- package/test/configs/stylistic/merge.spec.mjs +88 -0
- package/test/merge.spec.mjs +56 -20
- package/merge/recommended.mjs +0 -12
- package/merge/standard.mjs +0 -12
- package/merge/stylistic.mjs +0 -12
- package/test/merge/standard.spec.mjs +0 -59
- package/test/merge/stylistic.spec.mjs +0 -59
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/eslint-config-standard",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Standard configuration for ESLint 9",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript Standard Style",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@sequencemedia/eslint-merge": "^0.0.4",
|
|
55
|
-
"@stylistic/eslint-plugin": "^2.
|
|
55
|
+
"@stylistic/eslint-plugin": "^2.12.0",
|
|
56
56
|
"eslint-plugin-import": "^2.31.0",
|
|
57
57
|
"eslint-plugin-n": "^17.14.0",
|
|
58
58
|
"eslint-plugin-promise": "^7.2.1",
|
|
@@ -72,14 +72,12 @@
|
|
|
72
72
|
"#eslint-config-standard/common": "./common/index.mjs",
|
|
73
73
|
"#eslint-config-standard/configs": "./configs/index.mjs",
|
|
74
74
|
"#eslint-config-standard/configs/*": "./configs/*.mjs",
|
|
75
|
-
"#eslint-config-standard/merge": "./merge.mjs"
|
|
76
|
-
"#eslint-config-standard/merge/*": "./merge/*.mjs"
|
|
75
|
+
"#eslint-config-standard/merge": "./merge.mjs"
|
|
77
76
|
},
|
|
78
77
|
"exports": {
|
|
79
78
|
".": "./index.mjs",
|
|
80
79
|
"./configs": "./configs/index.mjs",
|
|
81
80
|
"./configs/*": "./configs/*.mjs",
|
|
82
|
-
"./merge": "./merge.mjs"
|
|
83
|
-
"./merge/*": "./merge/*.mjs"
|
|
81
|
+
"./merge": "./merge.mjs"
|
|
84
82
|
}
|
|
85
83
|
}
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
|
|
5
5
|
import RECOMMENDED from '@sequencemedia/eslint-config-standard/configs/recommended'
|
|
6
6
|
|
|
7
|
-
import merge from '@sequencemedia/eslint-config-standard/
|
|
7
|
+
import merge from '@sequencemedia/eslint-config-standard/configs/recommended/merge'
|
|
8
8
|
|
|
9
|
-
describe('@sequencemedia/eslint-config-standard/
|
|
9
|
+
describe('@sequencemedia/eslint-config-standard/configs/recommended/merge', () => {
|
|
10
10
|
describe('`merge`', () => it('is a function', () => expect(merge).to.be.a('function')))
|
|
11
11
|
|
|
12
12
|
describe('`merge()`', () => {
|
|
@@ -20,14 +20,28 @@ describe('@sequencemedia/eslint-config-standard/merge/recommended', () => {
|
|
|
20
20
|
const MOCK_IGNORES = [
|
|
21
21
|
'MOCK IGNORES'
|
|
22
22
|
]
|
|
23
|
-
const MOCK_LANGUAGE_OPTIONS = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
23
|
+
const MOCK_LANGUAGE_OPTIONS = {
|
|
24
|
+
mockOption: 'MOCK LANGUAGE OPTIONS'
|
|
25
|
+
}
|
|
26
|
+
const MOCK_LINTER_OPTIONS = {
|
|
27
|
+
mockOption: 'MOCK LINTER OPTIONS'
|
|
28
|
+
}
|
|
29
|
+
const MOCK_PLUGINS = {
|
|
30
|
+
mockOption: 'MOCK PLUGINS'
|
|
31
|
+
}
|
|
32
|
+
const MOCK_RULES = {
|
|
33
|
+
mockOption: 'MOCK RULES'
|
|
34
|
+
}
|
|
35
|
+
const MOCK_SETTINGS = {
|
|
36
|
+
mockOption: 'MOCK SETTINGS'
|
|
37
|
+
}
|
|
27
38
|
|
|
28
39
|
const {
|
|
29
40
|
languageOptions: RECOMMENDED_LANGUAGE_OPTIONS,
|
|
30
|
-
|
|
41
|
+
linterOptions: RECOMMENDED_LINTER_OPTIONS,
|
|
42
|
+
plugins: RECOMMENDED_PLUGINS,
|
|
43
|
+
rules: RECOMMENDED_RULES,
|
|
44
|
+
settings: RECOMMENDED_SETTINGS
|
|
31
45
|
} = RECOMMENDED
|
|
32
46
|
|
|
33
47
|
return (
|
|
@@ -37,6 +51,7 @@ describe('@sequencemedia/eslint-config-standard/merge/recommended', () => {
|
|
|
37
51
|
ignores: MOCK_IGNORES,
|
|
38
52
|
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
39
53
|
linterOptions: MOCK_LINTER_OPTIONS,
|
|
54
|
+
plugins: MOCK_PLUGINS,
|
|
40
55
|
rules: MOCK_RULES,
|
|
41
56
|
settings: MOCK_SETTINGS
|
|
42
57
|
})
|
|
@@ -49,12 +64,22 @@ describe('@sequencemedia/eslint-config-standard/merge/recommended', () => {
|
|
|
49
64
|
...RECOMMENDED_LANGUAGE_OPTIONS,
|
|
50
65
|
...MOCK_LANGUAGE_OPTIONS
|
|
51
66
|
},
|
|
52
|
-
linterOptions:
|
|
67
|
+
linterOptions: {
|
|
68
|
+
...RECOMMENDED_LINTER_OPTIONS,
|
|
69
|
+
...MOCK_LINTER_OPTIONS
|
|
70
|
+
},
|
|
71
|
+
plugins: {
|
|
72
|
+
...RECOMMENDED_PLUGINS,
|
|
73
|
+
...MOCK_PLUGINS
|
|
74
|
+
},
|
|
53
75
|
rules: {
|
|
54
76
|
...RECOMMENDED_RULES,
|
|
55
77
|
...MOCK_RULES
|
|
56
78
|
},
|
|
57
|
-
settings:
|
|
79
|
+
settings: {
|
|
80
|
+
...RECOMMENDED_SETTINGS,
|
|
81
|
+
...MOCK_SETTINGS
|
|
82
|
+
}
|
|
58
83
|
})
|
|
59
84
|
)
|
|
60
85
|
})
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
expect
|
|
3
|
+
} from 'chai'
|
|
4
|
+
|
|
5
|
+
import STANDARD from '@sequencemedia/eslint-config-standard/configs/standard'
|
|
6
|
+
|
|
7
|
+
import merge from '@sequencemedia/eslint-config-standard/configs/standard/merge'
|
|
8
|
+
|
|
9
|
+
describe('@sequencemedia/eslint-config-standard/configs/standard/merge', () => {
|
|
10
|
+
describe('`merge`', () => it('is a function', () => expect(merge).to.be.a('function')))
|
|
11
|
+
|
|
12
|
+
describe('`merge()`', () => {
|
|
13
|
+
describe('Always', () => it('returns an object', () => expect(merge()).to.be.an('object')))
|
|
14
|
+
|
|
15
|
+
describe('Merges', () => {
|
|
16
|
+
it('returns an object', () => {
|
|
17
|
+
const MOCK_FILES = [
|
|
18
|
+
'MOCK FILES'
|
|
19
|
+
]
|
|
20
|
+
const MOCK_IGNORES = [
|
|
21
|
+
'MOCK IGNORES'
|
|
22
|
+
]
|
|
23
|
+
const MOCK_LANGUAGE_OPTIONS = {
|
|
24
|
+
mockOption: 'MOCK LANGUAGE OPTIONS'
|
|
25
|
+
}
|
|
26
|
+
const MOCK_LINTER_OPTIONS = {
|
|
27
|
+
mockOption: 'MOCK LINTER OPTIONS'
|
|
28
|
+
}
|
|
29
|
+
const MOCK_PLUGINS = {
|
|
30
|
+
mockOption: 'MOCK PLUGINS'
|
|
31
|
+
}
|
|
32
|
+
const MOCK_RULES = {
|
|
33
|
+
mockOption: 'MOCK RULES'
|
|
34
|
+
}
|
|
35
|
+
const MOCK_SETTINGS = {
|
|
36
|
+
mockOption: 'MOCK SETTINGS'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const {
|
|
40
|
+
languageOptions: STANDARD_LANGUAGE_OPTIONS,
|
|
41
|
+
linterOptions: STANDARD_LINTER_OPTIONS,
|
|
42
|
+
plugins: STANDARD_PLUGINS,
|
|
43
|
+
rules: STANDARD_RULES,
|
|
44
|
+
settings: STANDARD_SETTINGS
|
|
45
|
+
} = STANDARD
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
expect(
|
|
49
|
+
merge({
|
|
50
|
+
files: MOCK_FILES,
|
|
51
|
+
ignores: MOCK_IGNORES,
|
|
52
|
+
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
53
|
+
linterOptions: MOCK_LINTER_OPTIONS,
|
|
54
|
+
plugins: MOCK_PLUGINS,
|
|
55
|
+
rules: MOCK_RULES,
|
|
56
|
+
settings: MOCK_SETTINGS
|
|
57
|
+
})
|
|
58
|
+
)
|
|
59
|
+
.to.eql({
|
|
60
|
+
...STANDARD,
|
|
61
|
+
files: MOCK_FILES,
|
|
62
|
+
ignores: MOCK_IGNORES,
|
|
63
|
+
languageOptions: {
|
|
64
|
+
...STANDARD_LANGUAGE_OPTIONS,
|
|
65
|
+
...MOCK_LANGUAGE_OPTIONS
|
|
66
|
+
},
|
|
67
|
+
linterOptions: {
|
|
68
|
+
...STANDARD_LINTER_OPTIONS,
|
|
69
|
+
...MOCK_LINTER_OPTIONS
|
|
70
|
+
},
|
|
71
|
+
plugins: {
|
|
72
|
+
...STANDARD_PLUGINS,
|
|
73
|
+
...MOCK_PLUGINS
|
|
74
|
+
},
|
|
75
|
+
rules: {
|
|
76
|
+
...STANDARD_RULES,
|
|
77
|
+
...MOCK_RULES
|
|
78
|
+
},
|
|
79
|
+
settings: {
|
|
80
|
+
...STANDARD_SETTINGS,
|
|
81
|
+
...MOCK_SETTINGS
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
)
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
})
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import {
|
|
2
|
+
expect
|
|
3
|
+
} from 'chai'
|
|
4
|
+
|
|
5
|
+
import STYLISTIC from '@sequencemedia/eslint-config-standard/configs/stylistic'
|
|
6
|
+
|
|
7
|
+
import merge from '@sequencemedia/eslint-config-standard/configs/stylistic/merge'
|
|
8
|
+
|
|
9
|
+
describe('@sequencemedia/eslint-config-standard/configs/stylistic/merge', () => {
|
|
10
|
+
describe('`merge`', () => it('is a function', () => expect(merge).to.be.a('function')))
|
|
11
|
+
|
|
12
|
+
describe('`merge()`', () => {
|
|
13
|
+
describe('Always', () => it('returns an object', () => expect(merge()).to.be.an('object')))
|
|
14
|
+
|
|
15
|
+
describe('Merges', () => {
|
|
16
|
+
it('returns an object', () => {
|
|
17
|
+
const MOCK_FILES = [
|
|
18
|
+
'MOCK FILES'
|
|
19
|
+
]
|
|
20
|
+
const MOCK_IGNORES = [
|
|
21
|
+
'MOCK IGNORES'
|
|
22
|
+
]
|
|
23
|
+
const MOCK_LANGUAGE_OPTIONS = {
|
|
24
|
+
mockOption: 'MOCK LANGUAGE OPTIONS'
|
|
25
|
+
}
|
|
26
|
+
const MOCK_LINTER_OPTIONS = {
|
|
27
|
+
mockOption: 'MOCK LINTER OPTIONS'
|
|
28
|
+
}
|
|
29
|
+
const MOCK_PLUGINS = {
|
|
30
|
+
mockOption: 'MOCK PLUGINS'
|
|
31
|
+
}
|
|
32
|
+
const MOCK_RULES = {
|
|
33
|
+
mockOption: 'MOCK RULES'
|
|
34
|
+
}
|
|
35
|
+
const MOCK_SETTINGS = {
|
|
36
|
+
mockOption: 'MOCK SETTINGS'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const {
|
|
40
|
+
languageOptions: STYLISTIC_LANGUAGE_OPTIONS,
|
|
41
|
+
linterOptions: STYLISTIC_LINTER_OPTIONS,
|
|
42
|
+
plugins: STYLISTIC_PLUGINS,
|
|
43
|
+
rules: STYLISTIC_RULES,
|
|
44
|
+
settings: STYLISTIC_SETTINGS
|
|
45
|
+
} = STYLISTIC
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
expect(
|
|
49
|
+
merge({
|
|
50
|
+
files: MOCK_FILES,
|
|
51
|
+
ignores: MOCK_IGNORES,
|
|
52
|
+
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
53
|
+
linterOptions: MOCK_LINTER_OPTIONS,
|
|
54
|
+
plugins: MOCK_PLUGINS,
|
|
55
|
+
rules: MOCK_RULES,
|
|
56
|
+
settings: MOCK_SETTINGS
|
|
57
|
+
})
|
|
58
|
+
)
|
|
59
|
+
.to.eql({
|
|
60
|
+
...STYLISTIC,
|
|
61
|
+
files: MOCK_FILES,
|
|
62
|
+
ignores: MOCK_IGNORES,
|
|
63
|
+
languageOptions: {
|
|
64
|
+
...STYLISTIC_LANGUAGE_OPTIONS,
|
|
65
|
+
...MOCK_LANGUAGE_OPTIONS
|
|
66
|
+
},
|
|
67
|
+
linterOptions: {
|
|
68
|
+
...STYLISTIC_LINTER_OPTIONS,
|
|
69
|
+
...MOCK_LINTER_OPTIONS
|
|
70
|
+
},
|
|
71
|
+
plugins: {
|
|
72
|
+
...STYLISTIC_PLUGINS,
|
|
73
|
+
...MOCK_PLUGINS
|
|
74
|
+
},
|
|
75
|
+
rules: {
|
|
76
|
+
...STYLISTIC_RULES,
|
|
77
|
+
...MOCK_RULES
|
|
78
|
+
},
|
|
79
|
+
settings: {
|
|
80
|
+
...STYLISTIC_SETTINGS,
|
|
81
|
+
...MOCK_SETTINGS
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
)
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
})
|
package/test/merge.spec.mjs
CHANGED
|
@@ -2,8 +2,7 @@ import {
|
|
|
2
2
|
expect
|
|
3
3
|
} from 'chai'
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import STYLISTIC from '@sequencemedia/eslint-config-standard/configs/stylistic'
|
|
5
|
+
import eslintConfig from '@sequencemedia/eslint-config-standard'
|
|
7
6
|
|
|
8
7
|
import merge from '@sequencemedia/eslint-config-standard/merge'
|
|
9
8
|
|
|
@@ -14,6 +13,12 @@ describe('@sequencemedia/eslint-config-standard/merge', () => {
|
|
|
14
13
|
describe('Always', () => it('returns an array', () => expect(merge()).to.be.an('array')))
|
|
15
14
|
|
|
16
15
|
describe('Merges', () => {
|
|
16
|
+
const [
|
|
17
|
+
DEFAULT,
|
|
18
|
+
STANDARD,
|
|
19
|
+
STYLISTIC
|
|
20
|
+
] = eslintConfig
|
|
21
|
+
|
|
17
22
|
it('returns an array', () => {
|
|
18
23
|
const MOCK_FILES = [
|
|
19
24
|
'MOCK FILES'
|
|
@@ -27,6 +32,9 @@ describe('@sequencemedia/eslint-config-standard/merge', () => {
|
|
|
27
32
|
const MOCK_LINTER_OPTIONS = {
|
|
28
33
|
mockOption: 'MOCK LINTER OPTIONS'
|
|
29
34
|
}
|
|
35
|
+
const MOCK_PLUGINS = {
|
|
36
|
+
mockOption: 'MOCK PLUGINS'
|
|
37
|
+
}
|
|
30
38
|
const MOCK_RULES = {
|
|
31
39
|
mockOption: 'MOCK RULES'
|
|
32
40
|
}
|
|
@@ -35,11 +43,19 @@ describe('@sequencemedia/eslint-config-standard/merge', () => {
|
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
const {
|
|
38
|
-
|
|
46
|
+
languageOptions: STANDARD_LANGUAGE_OPTIONS,
|
|
47
|
+
linterOptions: STANDARD_LINTER_OPTIONS,
|
|
48
|
+
plugins: STANDARD_PLUGINS,
|
|
49
|
+
rules: STANDARD_RULES,
|
|
50
|
+
settings: STANDARD_SETTINGS
|
|
39
51
|
} = STANDARD
|
|
40
52
|
|
|
41
53
|
const {
|
|
42
|
-
|
|
54
|
+
languageOptions: STYLISTIC_LANGUAGE_OPTIONS,
|
|
55
|
+
linterOptions: STYLISTIC_LINTER_OPTIONS,
|
|
56
|
+
plugins: STYLISTIC_PLUGINS,
|
|
57
|
+
rules: STYLISTIC_RULES,
|
|
58
|
+
settings: STYLISTIC_SETTINGS
|
|
43
59
|
} = STYLISTIC
|
|
44
60
|
|
|
45
61
|
return (
|
|
@@ -49,44 +65,64 @@ describe('@sequencemedia/eslint-config-standard/merge', () => {
|
|
|
49
65
|
ignores: MOCK_IGNORES,
|
|
50
66
|
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
51
67
|
linterOptions: MOCK_LINTER_OPTIONS,
|
|
68
|
+
plugins: MOCK_PLUGINS,
|
|
52
69
|
rules: MOCK_RULES,
|
|
53
70
|
settings: MOCK_SETTINGS
|
|
54
71
|
})
|
|
55
72
|
)
|
|
56
73
|
.to.eql([
|
|
57
|
-
|
|
58
|
-
name: '@sequencemedia/eslint-config-standard',
|
|
59
|
-
languageOptions: {
|
|
60
|
-
ecmaVersion: 'latest'
|
|
61
|
-
},
|
|
62
|
-
files: [
|
|
63
|
-
'**/*.{js,mjs,cjs}'
|
|
64
|
-
]
|
|
65
|
-
},
|
|
74
|
+
DEFAULT,
|
|
66
75
|
{
|
|
67
76
|
...STANDARD,
|
|
68
77
|
files: MOCK_FILES,
|
|
69
78
|
ignores: MOCK_IGNORES,
|
|
70
|
-
languageOptions:
|
|
71
|
-
|
|
79
|
+
languageOptions: {
|
|
80
|
+
...STANDARD_LANGUAGE_OPTIONS,
|
|
81
|
+
...MOCK_LANGUAGE_OPTIONS
|
|
82
|
+
},
|
|
83
|
+
linterOptions: {
|
|
84
|
+
...STANDARD_LINTER_OPTIONS,
|
|
85
|
+
...MOCK_LINTER_OPTIONS
|
|
86
|
+
},
|
|
87
|
+
plugins: {
|
|
88
|
+
...STANDARD_PLUGINS,
|
|
89
|
+
...MOCK_PLUGINS
|
|
90
|
+
},
|
|
72
91
|
rules: {
|
|
73
92
|
...STANDARD_RULES,
|
|
74
93
|
...MOCK_RULES
|
|
75
94
|
},
|
|
76
|
-
settings:
|
|
95
|
+
settings: {
|
|
96
|
+
...STANDARD_SETTINGS,
|
|
97
|
+
...MOCK_SETTINGS
|
|
98
|
+
}
|
|
77
99
|
},
|
|
78
100
|
{
|
|
79
101
|
...STYLISTIC,
|
|
80
102
|
files: MOCK_FILES,
|
|
81
103
|
ignores: MOCK_IGNORES,
|
|
82
|
-
languageOptions:
|
|
83
|
-
|
|
104
|
+
languageOptions: {
|
|
105
|
+
...STYLISTIC_LANGUAGE_OPTIONS,
|
|
106
|
+
...MOCK_LANGUAGE_OPTIONS
|
|
107
|
+
},
|
|
108
|
+
linterOptions: {
|
|
109
|
+
...STYLISTIC_LINTER_OPTIONS,
|
|
110
|
+
...MOCK_LINTER_OPTIONS
|
|
111
|
+
},
|
|
112
|
+
plugins: {
|
|
113
|
+
...STYLISTIC_PLUGINS,
|
|
114
|
+
...MOCK_PLUGINS
|
|
115
|
+
},
|
|
84
116
|
rules: {
|
|
85
117
|
...STYLISTIC_RULES,
|
|
86
118
|
...MOCK_RULES
|
|
87
119
|
},
|
|
88
|
-
settings:
|
|
89
|
-
|
|
120
|
+
settings: {
|
|
121
|
+
...STYLISTIC_SETTINGS,
|
|
122
|
+
...MOCK_SETTINGS
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
])
|
|
90
126
|
)
|
|
91
127
|
})
|
|
92
128
|
})
|
package/merge/recommended.mjs
DELETED
package/merge/standard.mjs
DELETED
package/merge/stylistic.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
expect
|
|
3
|
-
} from 'chai'
|
|
4
|
-
|
|
5
|
-
import STANDARD from '@sequencemedia/eslint-config-standard/configs/standard'
|
|
6
|
-
|
|
7
|
-
import merge from '@sequencemedia/eslint-config-standard/merge/standard'
|
|
8
|
-
|
|
9
|
-
describe('@sequencemedia/eslint-config-standard/merge/standard', () => {
|
|
10
|
-
describe('`merge`', () => it('is a function', () => expect(merge).to.be.a('function')))
|
|
11
|
-
|
|
12
|
-
describe('`merge()`', () => {
|
|
13
|
-
describe('Always', () => it('returns an object', () => expect(merge()).to.be.an('object')))
|
|
14
|
-
|
|
15
|
-
describe('Merges', () => {
|
|
16
|
-
it('returns an object', () => {
|
|
17
|
-
const MOCK_FILES = [
|
|
18
|
-
'MOCK FILES'
|
|
19
|
-
]
|
|
20
|
-
const MOCK_IGNORES = [
|
|
21
|
-
'MOCK IGNORES'
|
|
22
|
-
]
|
|
23
|
-
const MOCK_LANGUAGE_OPTIONS = { mockOption: 'MOCK LANGUAGE OPTIONS' }
|
|
24
|
-
const MOCK_LINTER_OPTIONS = { mockOption: 'MOCK LINTER OPTIONS' }
|
|
25
|
-
const MOCK_RULES = { mockOption: 'MOCK RULES' }
|
|
26
|
-
const MOCK_SETTINGS = { mockOption: 'MOCK SETTINGS' }
|
|
27
|
-
|
|
28
|
-
const {
|
|
29
|
-
rules: STANDARD_RULES
|
|
30
|
-
} = STANDARD
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
expect(
|
|
34
|
-
merge({
|
|
35
|
-
files: MOCK_FILES,
|
|
36
|
-
ignores: MOCK_IGNORES,
|
|
37
|
-
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
38
|
-
linterOptions: MOCK_LINTER_OPTIONS,
|
|
39
|
-
rules: MOCK_RULES,
|
|
40
|
-
settings: MOCK_SETTINGS
|
|
41
|
-
})
|
|
42
|
-
)
|
|
43
|
-
.to.eql({
|
|
44
|
-
...STANDARD,
|
|
45
|
-
files: MOCK_FILES,
|
|
46
|
-
ignores: MOCK_IGNORES,
|
|
47
|
-
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
48
|
-
linterOptions: MOCK_LINTER_OPTIONS,
|
|
49
|
-
rules: {
|
|
50
|
-
...STANDARD_RULES,
|
|
51
|
-
...MOCK_RULES
|
|
52
|
-
},
|
|
53
|
-
settings: MOCK_SETTINGS
|
|
54
|
-
})
|
|
55
|
-
)
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
})
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
expect
|
|
3
|
-
} from 'chai'
|
|
4
|
-
|
|
5
|
-
import STYLISTIC from '@sequencemedia/eslint-config-standard/configs/stylistic'
|
|
6
|
-
|
|
7
|
-
import merge from '@sequencemedia/eslint-config-standard/merge/stylistic'
|
|
8
|
-
|
|
9
|
-
describe('@sequencemedia/eslint-config-standard/merge/stylistic', () => {
|
|
10
|
-
describe('`merge`', () => it('is a function', () => expect(merge).to.be.a('function')))
|
|
11
|
-
|
|
12
|
-
describe('`merge()`', () => {
|
|
13
|
-
describe('Always', () => it('returns an object', () => expect(merge()).to.be.an('object')))
|
|
14
|
-
|
|
15
|
-
describe('Merges', () => {
|
|
16
|
-
it('returns an object', () => {
|
|
17
|
-
const MOCK_FILES = [
|
|
18
|
-
'MOCK FILES'
|
|
19
|
-
]
|
|
20
|
-
const MOCK_IGNORES = [
|
|
21
|
-
'MOCK IGNORES'
|
|
22
|
-
]
|
|
23
|
-
const MOCK_LANGUAGE_OPTIONS = { mockOption: 'MOCK LANGUAGE OPTIONS' }
|
|
24
|
-
const MOCK_LINTER_OPTIONS = { mockOption: 'MOCK LINTER OPTIONS' }
|
|
25
|
-
const MOCK_RULES = { mockOption: 'MOCK RULES' }
|
|
26
|
-
const MOCK_SETTINGS = { mockOption: 'MOCK SETTINGS' }
|
|
27
|
-
|
|
28
|
-
const {
|
|
29
|
-
rules: STYLISTIC_RULES
|
|
30
|
-
} = STYLISTIC
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
expect(
|
|
34
|
-
merge({
|
|
35
|
-
files: MOCK_FILES,
|
|
36
|
-
ignores: MOCK_IGNORES,
|
|
37
|
-
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
38
|
-
linterOptions: MOCK_LINTER_OPTIONS,
|
|
39
|
-
rules: MOCK_RULES,
|
|
40
|
-
settings: MOCK_SETTINGS
|
|
41
|
-
})
|
|
42
|
-
)
|
|
43
|
-
.to.eql({
|
|
44
|
-
...STYLISTIC,
|
|
45
|
-
files: MOCK_FILES,
|
|
46
|
-
ignores: MOCK_IGNORES,
|
|
47
|
-
languageOptions: MOCK_LANGUAGE_OPTIONS,
|
|
48
|
-
linterOptions: MOCK_LINTER_OPTIONS,
|
|
49
|
-
rules: {
|
|
50
|
-
...STYLISTIC_RULES,
|
|
51
|
-
...MOCK_RULES
|
|
52
|
-
},
|
|
53
|
-
settings: MOCK_SETTINGS
|
|
54
|
-
})
|
|
55
|
-
)
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
})
|