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
78 changes: 37 additions & 41 deletions packages/kg-default-nodes/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,45 +1,41 @@
import {fixupPluginRules} from '@eslint/compat';
import eslint from '@eslint/js';
import {defineConfig} from 'eslint/config';
import ghostPlugin from 'eslint-plugin-ghost';
import globals from 'globals';
import tseslint from 'typescript-eslint';

const ghost = fixupPluginRules(ghostPlugin);

export default [
{ignores: ['build/**', 'cjs/**', 'es/**']},
eslint.configs.recommended,
{
files: ['**/*.{js,mjs}'],
plugins: {ghost},
languageOptions: {
globals: {
...globals.node,
...globals.browser
}
},
rules: {
...ghostPlugin.configs.node.rules,
// match ESLint 8 behavior for catch clause variables
'no-unused-vars': ['error', {caughtErrors: 'none'}],
// disable rules incompatible with ESLint 9 flat config
'ghost/filenames/match-exported-class': 'off',
'ghost/filenames/match-exported': 'off',
'ghost/filenames/match-regex': 'off'
}
export default defineConfig([
{ ignores: ['build/**'] },
{
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
tseslint.configs.recommended,
],
languageOptions: {
parserOptions: { ecmaVersion: 2022, sourceType: 'module' },
},
plugins: { ghost: ghostPlugin },
rules: {
...ghostPlugin.configs.ts.rules,
'@typescript-eslint/no-explicit-any': 'error',
},
},
{
files: ['src/**/*.ts'],
rules: {
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
},
{
files: ['test/**/*.ts'],
rules: {
...ghostPlugin.configs['ts-test'].rules,
'ghost/mocha/no-global-tests': 'off',
'ghost/mocha/handle-done-callback': 'off',
'ghost/mocha/no-mocha-arrows': 'off',
'ghost/mocha/max-top-level-suites': 'off',
'ghost/mocha/no-setup-in-describe': 'off',
},
{
files: ['test/**/*.{js,mjs}'],
plugins: {ghost},
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
should: true,
sinon: true
}
},
rules: {
...ghostPlugin.configs.test.rules
}
}
];
},
]);
1 change: 0 additions & 1 deletion packages/kg-default-nodes/index.js

This file was deleted.

127 changes: 0 additions & 127 deletions packages/kg-default-nodes/lib/kg-default-nodes.js

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kg-default-nodes/lib/nodes/at-link/index.js

This file was deleted.

63 changes: 0 additions & 63 deletions packages/kg-default-nodes/lib/nodes/codeblock/codeblock-parser.js

This file was deleted.

This file was deleted.

This file was deleted.

47 changes: 0 additions & 47 deletions packages/kg-default-nodes/lib/nodes/html/html-parser.js

This file was deleted.

16 changes: 0 additions & 16 deletions packages/kg-default-nodes/lib/nodes/markdown/markdown-renderer.js

This file was deleted.

16 changes: 0 additions & 16 deletions packages/kg-default-nodes/lib/nodes/paywall/paywall-parser.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/kg-default-nodes/lib/utils/is-unsplash-image.js

This file was deleted.

Loading