Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
const config = require('eslint-config-hexo/ts');
const testConfig = require('eslint-config-hexo/test');
const testConfig = require('eslint-config-hexo/ts-test');

module.exports = [
// Configurations applied globally
...config,
{
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-require-imports': 0,
'n/no-missing-require': 0,
'n/no-missing-import': 0,
'n/no-missing-require': 0,
'@typescript-eslint/no-unused-vars': [
'error', {
'argsIgnorePattern': '^_'
Expand All @@ -19,15 +18,15 @@ module.exports = [
}
},
// Configurations applied only to test files
{
files: [
'test/**/*.ts'
],
languageOptions: {
...testConfig.languageOptions
},
...testConfig.map(config => ({
...config,
files: ['test/**/*.ts'],
rules: {
...testConfig.rules,
...config.rules,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-require-imports': 0,
'n/no-missing-require': 0,
'n/no-missing-import': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-unused-vars': [
Expand All @@ -38,5 +37,5 @@ module.exports = [
}
]
}
}
}))
];
1 change: 0 additions & 1 deletion lib/box/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class File {
/**
* File type. The value can be create, update, skip, delete.
*/
// eslint-disable-next-line no-use-before-define
public type: typeof File.TYPE_CREATE | typeof File.TYPE_UPDATE | typeof File.TYPE_SKIP | typeof File.TYPE_DELETE;
static TYPE_CREATE: 'create';
static TYPE_UPDATE: 'update';
Expand Down
2 changes: 0 additions & 2 deletions lib/hexo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const routeCache = new WeakMap();

const castArray = (obj: any) => { return Array.isArray(obj) ? obj : [obj]; };

// eslint-disable-next-line no-use-before-define
const mergeCtxThemeConfig = (ctx: Hexo) => {
// Merge hexo.config.theme_config into hexo.theme.config before post rendering & generating
// config.theme_config has "_config.[theme].yml" merged in load_theme_config.js
Expand All @@ -60,7 +59,6 @@ const mergeCtxThemeConfig = (ctx: Hexo) => {
}
};

// eslint-disable-next-line no-use-before-define
const createLoadThemeRoute = function(generatorResult: BaseGeneratorReturn, locals: LocalsType, ctx: Hexo) {
const { log, theme } = ctx;
const { path, cache: useCache } = locals;
Expand Down
Loading