Skip to content

Commit 663b484

Browse files
committed
👕 refactor: rules and configs exporting
1 parent 3dee7c4 commit 663b484

File tree

5 files changed

+31
-16
lines changed

5 files changed

+31
-16
lines changed

lib/configs.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** DON'T EDIT THIS FILE; was created by scripts. */
2+
'use strict'
3+
4+
module.exports = {
5+
'recommended': require('./configs/recommended')
6+
}

lib/configs/recommended.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/** DON'T EDIT THIS FILE; was created by scripts. */
2+
'use strict'
3+
4+
module.exports = {
5+
plugins: ['vue-i18n'],
6+
rules: {
7+
'vue-i18n/no-missing-key': 'error'
8+
}
9+
}

lib/index.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,8 @@
44
*/
55
'use strict'
66

7-
// ------------------------------------------------------------------------------
8-
// Requirements
9-
// ------------------------------------------------------------------------------
10-
11-
// ------------------------------------------------------------------------------
12-
// Plugin Definition
13-
// ------------------------------------------------------------------------------
14-
15-
// import all rules in lib/rules
16-
module.exports.rules = {
17-
'no-missing-key': require('./rules/no-missing-key')
18-
}
19-
20-
// import processors
21-
module.exports.processors = {
22-
// add your processors here
7+
module.exports = {
8+
configs: require('./configs'),
9+
rules: require('./rules'),
10+
processors: {}
2311
}

lib/rules.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** DON'T EDIT THIS FILE; was created by scripts. */
2+
'use strict'
3+
4+
module.exports = {
5+
'no-missing-key': require('./rules/no-missing-key')
6+
}

lib/utils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** DON'T EDIT THIS FILE; was created by scripts. */
2+
'use strict'
3+
4+
module.exports = {
5+
'index': require('./utils/index')
6+
}

0 commit comments

Comments
 (0)