Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Dec 30, 2024
1 parent d873c98 commit 759e694
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

5 changes: 1 addition & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
{
"extends": "hexo",
"root": true
}
const config = require("eslint-config-hexo"); module.exports = config;
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const config = require('eslint-config-hexo/eslint');

module.exports = config;
2 changes: 1 addition & 1 deletion lib/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const renderer = {

try {
out += encodeURL(href);
} catch (e) {
} catch {
out += href;
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Markdown renderer plugin for Hexo",
"main": "index",
"scripts": {
"eslint": "eslint .",
"eslint": "eslint --flag unstable_config_lookup_from_file lib/ test/ index.js",
"test": "mocha test/index.js",
"test-cov": "c8 --reporter=lcovonly npm run test"
},
Expand Down Expand Up @@ -40,7 +40,7 @@
"c8": "^10.1.2",
"chai": "^4.3.7",
"eslint": "^9.17.0",
"eslint-config-hexo": "^5.0.0",
"eslint-config-hexo": "github:yoshinorin/eslint-config-hexo#chore/migrate-to-flatconfig",
"hexo": "^7.1.1",
"mocha": "^10.4.0"
},
Expand Down
3 changes: 0 additions & 3 deletions test/.eslintrc

This file was deleted.

5 changes: 5 additions & 0 deletions test/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

const config = require('eslint-config-hexo/test');

module.exports = config;

0 comments on commit 759e694

Please sign in to comment.