Skip to content

Commit 799689a

Browse files
authored
chore: remove ESLint configuration files and update package.json for repository details (#253)
1 parent d3052ed commit 799689a

5 files changed

Lines changed: 21 additions & 17 deletions

File tree

.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

eslint.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
const config = require('eslint-config-hexo/eslint');
4+
const testConfig = require('eslint-config-hexo/test');
5+
6+
module.exports = [
7+
// Configurations applied globally
8+
...config,
9+
// Configurations applied only to test files
10+
...testConfig.map(config => ({
11+
...config,
12+
files: ['test/**/*.js']
13+
}))
14+
];

lib/generator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ function composeItemContent(post, feedConfig) {
8181

8282
function composeItemCategories(post) {
8383
const items = [
84-
...(post.categories ? post.categories.toArray() : []),
85-
...(post.tags ? post.tags.toArray() : [])
84+
...post.categories ? post.categories.toArray() : [],
85+
...post.tags ? post.tags.toArray() : []
8686
];
8787
return items.map(item => ({ name: item.name, domain: item.permalink }));
8888
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
},
1414
"files": [
1515
"lib/",
16-
"atom.xml",
17-
"index.js",
18-
"rss2.xml"
16+
"index.js"
1917
],
20-
"repository": "hexojs/hexo-generator-feed",
18+
"repository": {
19+
"type": "git",
20+
"url": "git+https://github.com/hexojs/hexo-generator-feed.git"
21+
},
2122
"homepage": "https://hexo.io/",
2223
"keywords": [
2324
"hexo",
@@ -36,7 +37,6 @@
3637
"hexo-util": "^4.0.0"
3738
},
3839
"devDependencies": {
39-
"babel-eslint": "^10.1.0",
4040
"camaro": "^6.2.0",
4141
"chai": "^6.2.1",
4242
"cheerio": "^1.1.2",

test/.eslintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)