🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

eslint-config-hexo

Package Overview
Dependencies
Maintainers
8
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-hexo - npm Package Compare versions

Comparing version

to
6.0.0

28

eslint.js

@@ -1,4 +0,12 @@

module.exports = {
extends: ['eslint:recommended', 'plugin:node/recommended'],
plugins: ['node'],
const nodePlugin = require('eslint-plugin-n');
const eslintJs = require('@eslint/js');
const globals = require('globals');
const commonConfig = {
languageOptions: {
globals: {
...globals.node,
...globals.es6,
},
},
rules: {

@@ -135,11 +143,9 @@ // override recommended

'yield-star-spacing': 'error',
// Node 8 compatibility
'node/no-deprecated-api': ['error', {
'ignoreModuleItems': ['url.parse', 'url.resolve']
}]
},
env: {
node: true,
es6: true
}
};
module.exports = [
eslintJs.configs.recommended,
nodePlugin.configs["flat/recommended-script"],
commonConfig,
];
{
"name": "eslint-config-hexo",
"version": "5.0.0",
"version": "6.0.0",
"description": "ESLint config for Hexo projects",

@@ -18,2 +18,8 @@ "repository": "hexojs/eslint-config-hexo",

],
"exports": {
"./eslint": "./eslint.js",
"./test": "./test.js",
"./ts": "./ts.js",
"./ts-test": "./ts-test.js"
},
"author": "Tommy Chen <tommy351@gmail.com> (http://zespia.tw)",

@@ -25,12 +31,14 @@ "maintainers": [

"peerDependencies": {
"eslint": ">= 8.1.0"
"eslint": ">= 9.17.0"
},
"dependencies": {
"eslint-plugin-node": "^11.1.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0"
"@eslint/js": "^9.17.0",
"eslint-plugin-n": "^17.15.1",
"globals": "^15.14.0",
"typescript-eslint": "^8.19.0",
"eslint-plugin-mocha": "^10.5.0"
},
"engines": {
"node": ">=12.22.0"
"node": ">=18"
}
}

@@ -15,8 +15,20 @@ # eslint-config-hexo

In `.eslintrc`
In `eslint.config.js`
``` js
{
"extends": "hexo"
}
const hexoTsLintConfig = require('eslint-config-hexo/ts');
module.exports = [
...hexoTsLintConfig,
{
languageOptions: {
ecmaVersion: 2020,
},
rules: {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-this-alias": 0
}
}
];
```

@@ -23,0 +35,0 @@

@@ -1,9 +0,23 @@

module.exports = {
extends: './eslint.js',
const jsConfig = require('./eslint.js');
const globals = require('globals');
const mochaPlugin = require('eslint-plugin-mocha');
const testConfig = {
...mochaPlugin.configs.flat.recommended,
languageOptions: {
globals: {
...globals.mocha
},
},
rules: {
'no-unused-expressions': 'off'
'no-unused-expressions': 0,
"mocha/no-mocha-arrows": 0,
"mocha/handle-done-callback": 0,
"mocha/max-top-level-suites": 0,
},
env: {
mocha: true
}
};
module.exports = [
...jsConfig,
testConfig
];

@@ -1,9 +0,18 @@

module.exports = {
extends: './ts.js',
const tsConfig = require('./ts.js');
const globals = require('globals');
const tsTestConfig = {
languageOptions: {
globals: {
...globals.mocha
},
},
rules: {
'no-unused-expressions': 'off'
},
env: {
mocha: true
}
};
module.exports = [
...tsConfig,
tsTestConfig,
];

@@ -1,12 +0,17 @@

module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'./eslint.js',
'plugin:@typescript-eslint/recommended'
],
const tsEslint = require('typescript-eslint');
const nodePlugin = require('eslint-plugin-n');
const jsConfig = require('./eslint.js');
const nodeConfig = {
rules: {
'node/no-unsupported-features/es-syntax': ['error', { 'ignores': ['modules'] }],
'node/no-missing-import': ['error', { 'tryExtensions': ['.js', '.ts'] }]
}
};
'n/no-unsupported-features/es-syntax': ['error', { 'ignores': ['modules'] }],
'n/no-missing-import': ['error', { 'tryExtensions': ['.js', '.ts'] }]
},
}
module.exports = [].concat(
jsConfig,
nodePlugin.configs["flat/mixed-esm-and-cjs"],
...tsEslint.configs.recommended,
nodeConfig,
);